public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Workaround binutils readelf following and printing alt file.
@ 2022-06-30 12:09 Mark Wielaard
  2022-06-30 12:15 ` Jakub Jelinek
  2022-06-30 12:39 ` Nick Clifton
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Wielaard @ 2022-06-30 12:09 UTC (permalink / raw)
  To: dwz; +Cc: nickc, Mark Wielaard

Even with -wN readelf 2.38-15.fc37 follows and prints the
contents of the alt file. Workaround that by removing the
alt file in tests when we are done with it. This should be
fine even when binutils readelf gets fixed to not do that
with -wN (but maybe this is by design?) This fixes the
testsuite on Fedora rawhide.

	* testsuite/dwz.tests/cycle.sh: Remove 3 (alt) file
	when done testing.
	* testsuite/dwz.tests/odr-struct-multifile.sh:
	Likewise.
---

https://code.wildebeest.org/git/user/mjw/dwz/commit/?h=readelf-binutils-alt

 testsuite/dwz.tests/cycle.sh                | 4 ++++
 testsuite/dwz.tests/odr-struct-multifile.sh | 3 +++
 2 files changed, 7 insertions(+)
 mode change 100644 => 100755 testsuite/dwz.tests/odr-struct-multifile.sh

diff --git a/testsuite/dwz.tests/cycle.sh b/testsuite/dwz.tests/cycle.sh
index 17f8eb5..ce42521 100644
--- a/testsuite/dwz.tests/cycle.sh
+++ b/testsuite/dwz.tests/cycle.sh
@@ -26,6 +26,10 @@ $execs/dwz-for-test -m 3 1 2 --devel-no-checksum-cycle-opt --devel-ignore-size
 cnt=$(readelf -wi 3 | grep -c "DW_AT_name.*: s$")
 [ $cnt -eq 1 ]
 
+# Even with -wN readelf 2.38-15.fc37 follows and prints the contents
+# of the alt file. So make sure it cannot do that by removing it.
+rm 3
+
 cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*: s$" || true)
 [ $cnt -eq 0 ]
 
diff --git a/testsuite/dwz.tests/odr-struct-multifile.sh b/testsuite/dwz.tests/odr-struct-multifile.sh
old mode 100644
new mode 100755
index 159cbc3..5961abf
--- a/testsuite/dwz.tests/odr-struct-multifile.sh
+++ b/testsuite/dwz.tests/odr-struct-multifile.sh
@@ -44,6 +44,9 @@ for name in member_one member_two member_three member_four; do
     [ $cnt -eq 1 ]
 done
 
+# Even with -wN readelf 2.38-15.fc37 follows and prints the contents
+# of the alt file. So make sure it cannot do that by removing it.
+rm 3
 
 for name in aaa bbb ccc; do
     cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*:.*$name" || true)
-- 
2.18.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Workaround binutils readelf following and printing alt file.
  2022-06-30 12:09 [PATCH] Workaround binutils readelf following and printing alt file Mark Wielaard
@ 2022-06-30 12:15 ` Jakub Jelinek
  2022-06-30 12:39 ` Nick Clifton
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2022-06-30 12:15 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: dwz, nickc

On Thu, Jun 30, 2022 at 02:09:59PM +0200, Mark Wielaard wrote:
> Even with -wN readelf 2.38-15.fc37 follows and prints the
> contents of the alt file. Workaround that by removing the
> alt file in tests when we are done with it. This should be
> fine even when binutils readelf gets fixed to not do that
> with -wN (but maybe this is by design?) This fixes the
> testsuite on Fedora rawhide.
> 
> 	* testsuite/dwz.tests/cycle.sh: Remove 3 (alt) file
> 	when done testing.
> 	* testsuite/dwz.tests/odr-struct-multifile.sh:
> 	Likewise.

LGTM>
> ---
> 
> https://code.wildebeest.org/git/user/mjw/dwz/commit/?h=readelf-binutils-alt
> 
>  testsuite/dwz.tests/cycle.sh                | 4 ++++
>  testsuite/dwz.tests/odr-struct-multifile.sh | 3 +++
>  2 files changed, 7 insertions(+)
>  mode change 100644 => 100755 testsuite/dwz.tests/odr-struct-multifile.sh
> 
> diff --git a/testsuite/dwz.tests/cycle.sh b/testsuite/dwz.tests/cycle.sh
> index 17f8eb5..ce42521 100644
> --- a/testsuite/dwz.tests/cycle.sh
> +++ b/testsuite/dwz.tests/cycle.sh
> @@ -26,6 +26,10 @@ $execs/dwz-for-test -m 3 1 2 --devel-no-checksum-cycle-opt --devel-ignore-size
>  cnt=$(readelf -wi 3 | grep -c "DW_AT_name.*: s$")
>  [ $cnt -eq 1 ]
>  
> +# Even with -wN readelf 2.38-15.fc37 follows and prints the contents
> +# of the alt file. So make sure it cannot do that by removing it.
> +rm 3
> +
>  cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*: s$" || true)
>  [ $cnt -eq 0 ]
>  
> diff --git a/testsuite/dwz.tests/odr-struct-multifile.sh b/testsuite/dwz.tests/odr-struct-multifile.sh
> old mode 100644
> new mode 100755
> index 159cbc3..5961abf
> --- a/testsuite/dwz.tests/odr-struct-multifile.sh
> +++ b/testsuite/dwz.tests/odr-struct-multifile.sh
> @@ -44,6 +44,9 @@ for name in member_one member_two member_three member_four; do
>      [ $cnt -eq 1 ]
>  done
>  
> +# Even with -wN readelf 2.38-15.fc37 follows and prints the contents
> +# of the alt file. So make sure it cannot do that by removing it.
> +rm 3
>  
>  for name in aaa bbb ccc; do
>      cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*:.*$name" || true)
> -- 
> 2.18.4

	Jakub


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Workaround binutils readelf following and printing alt file.
  2022-06-30 12:09 [PATCH] Workaround binutils readelf following and printing alt file Mark Wielaard
  2022-06-30 12:15 ` Jakub Jelinek
@ 2022-06-30 12:39 ` Nick Clifton
  1 sibling, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2022-06-30 12:39 UTC (permalink / raw)
  To: Mark Wielaard, dwz

Hi Mark,

> Even with -wN readelf 2.38-15.fc37 follows and prints the
> contents of the alt file. 

Bug in the argument processing code.  I am checking a fix now...

Cheers
   Nick


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-30 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 12:09 [PATCH] Workaround binutils readelf following and printing alt file Mark Wielaard
2022-06-30 12:15 ` Jakub Jelinek
2022-06-30 12:39 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).