public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Add eu-strip/eu-unstrip test-cases
       [not found] ` <bug-24249-7128-fjVmrWDsgH@http.sourceware.org/bugzilla/>
@ 2019-01-01  0:00   ` Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-01-01  0:00 UTC (permalink / raw)
  To: Mark Wielaard, Jakub Jelinek; +Cc: dwz

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

[ was: Re: [Bug default/24249] Section offsets not monotonically
increasing ]

On 22-02-19 14:40, mark at klomp dot org wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=24249
> 
> Mark Wielaard <mark at klomp dot org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |mark at klomp dot org
> 
> --- Comment #11 from Mark Wielaard <mark at klomp dot org> ---
> (In reply to Tom de Vries from comment #10)
>> (In reply to Jakub Jelinek from comment #9)
>>> e.g. if we process *.debug files stripped into file
>>> by objcopy or eu-strip, won't this shdr reordering then break the matching
>>> between original binary and *.debug file?
>>
>> Indeed the ordering of entries in the section table in the original binary
>> and the .debug file will not be the same.
>>
>> I'm not aware though of a tool that relies on this ordering to be the same.
> 
> I think eu-unstrip does deal with differences in ordering, but you might want
> to test whether it still works correctly.
> 

I did not know eu-unstrip, thanks for letting me know.

Committed two test-cases using dwz in combination with eu-strip and
eu-unstrip.

Thanks,
- Tom

[-- Attachment #2: 0001-Add-eu-strip-eu-unstrip-test-cases.patch --]
[-- Type: text/x-patch, Size: 1973 bytes --]

Add eu-strip/eu-unstrip test-cases

Add regular and multifile test-cases that:
- use eu-strip to split off the debuginfo into a seperate file,
- dwz the debuginfo, and
- merge the debuginfo back into the original file using eu-unstrip.

2019-03-08  Tom de Vries  <tdevries@suse.de>

	* testsuite/dwz.tests/eu-strip-unstrip-multifile.sh: New test.
	* testsuite/dwz.tests/eu-strip-unstrip.sh: New test.

---
 testsuite/dwz.tests/eu-strip-unstrip-multifile.sh | 26 +++++++++++++++++++++++
 testsuite/dwz.tests/eu-strip-unstrip.sh           | 19 +++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/testsuite/dwz.tests/eu-strip-unstrip-multifile.sh b/testsuite/dwz.tests/eu-strip-unstrip-multifile.sh
new file mode 100755
index 0000000..a49666f
--- /dev/null
+++ b/testsuite/dwz.tests/eu-strip-unstrip-multifile.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+cp ../hello 1
+cp ../hello 2
+
+eu-strip 1 -o 1.stripped -f 1.debug
+eu-strip 2 -o 2.stripped -f 2.debug
+
+dwz -m 3 1.debug 2.debug
+
+eu-unstrip 1.stripped 1.debug -o 1.unstripped
+eu-unstrip 2.stripped 2.debug -o 2.unstripped
+
+smaller-than.sh 1.unstripped 1
+smaller-than.sh 2.unstripped 2
+
+[ $(gnu-debugaltlink-name.sh 1.unstripped) = "3" ]
+[ $(gnu-debugaltlink-name.sh 2.unstripped) = "3" ]
+
+ls=$(ls)
+ls=$(echo $ls)
+[ "$ls" = "1 1.debug 1.stripped 1.unstripped 2 2.debug 2.stripped 2.unstripped 3" ]
+
+rm -f 1 1.debug 1.stripped 1.unstripped 2 2.debug 2.stripped 2.unstripped 3
diff --git a/testsuite/dwz.tests/eu-strip-unstrip.sh b/testsuite/dwz.tests/eu-strip-unstrip.sh
new file mode 100755
index 0000000..9ecb3fe
--- /dev/null
+++ b/testsuite/dwz.tests/eu-strip-unstrip.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+cp ../hello 1
+
+eu-strip 1 -o 1.stripped -f 1.debug
+
+dwz 1.debug
+
+eu-unstrip 1.stripped 1.debug -o 1.unstripped
+
+smaller-than.sh 1.unstripped 1
+
+ls=$(ls)
+ls=$(echo $ls)
+[ "$ls" = "1 1.debug 1.stripped 1.unstripped" ]
+
+rm -f 1 1.debugged 1.stripped 1.unstripped

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-08 14:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24249-7128@http.sourceware.org/bugzilla/>
     [not found] ` <bug-24249-7128-fjVmrWDsgH@http.sourceware.org/bugzilla/>
2019-01-01  0:00   ` [committed] Add eu-strip/eu-unstrip test-cases Tom de Vries

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).