159 lines
4.6 KiB
Diff
159 lines
4.6 KiB
Diff
|
|
From 785f451a1b05f89c3b24eb5550f35488b80152b7 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Mark Wielaard <mark@klomp.org>
|
||
|
|
Date: Wed, 6 Nov 2024 00:28:40 +0100
|
||
|
|
Subject: [PATCH] tests: Ignore stderr output of readelf in debugedit.at
|
||
|
|
|
||
|
|
readelf might produce some warning messages that don't matter for the
|
||
|
|
specific tests in debugedit.at. So ignore stderr output and just check
|
||
|
|
stdout output is as expected.
|
||
|
|
|
||
|
|
https://sourceware.org/bugzilla/show_bug.cgi?id=31653
|
||
|
|
|
||
|
|
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
||
|
|
---
|
||
|
|
tests/debugedit.at | 40 ++++++++++++++++++++--------------------
|
||
|
|
1 file changed, 20 insertions(+), 20 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/tests/debugedit.at b/tests/debugedit.at
|
||
|
|
index 1c59e86..fa38416 100644
|
||
|
|
--- a/tests/debugedit.at
|
||
|
|
+++ b/tests/debugedit.at
|
||
|
|
@@ -308,7 +308,7 @@ AT_CHECK([[
|
||
|
|
readelf --debug-dump=info foo.o subdir_bar/bar.o baz.o \
|
||
|
|
| grep -E 'DW_AT_(name|comp_dir)' \
|
||
|
|
| rev | cut -d: -f1 | rev | cut -c2- | grep ^/foo/bar/baz | sort -u
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -331,7 +331,7 @@ AT_CHECK([[
|
||
|
|
readelf --debug-dump=info ./foobarbaz.part.o \
|
||
|
|
| grep -E 'DW_AT_(name|comp_dir)' \
|
||
|
|
| rev | cut -d: -f1 | rev | cut -c2- | grep ^/foo/bar/baz | sort -u
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -353,7 +353,7 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.exe]])
|
||
|
|
AT_CHECK([[
|
||
|
|
readelf --debug-dump=info ./foobarbaz.exe | grep -E 'DW_AT_(name|comp_dir)' \
|
||
|
|
| rev | cut -d: -f1 | rev | cut -c2- | grep ^/foo/bar/baz | sort -u
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -390,7 +390,7 @@ for i in ./foo.o ./subdir_bar/bar.o ./baz.o;do \
|
||
|
|
| sed -n 's/^.*> *DW_AT_name *:.* \(stringp[^ ]*\|st.\)$/\1/p' \
|
||
|
|
| sort;
|
||
|
|
done
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -419,7 +419,7 @@ readelf --debug-dump=info ./foobarbaz.part.o \
|
||
|
|
| awk '/Abbrev Number:.*DW_TAG_type_unit/{p=1}{if(p)print}/^$/{p=0}' \
|
||
|
|
| sed -n 's/^.*> *DW_AT_name *:.* \(stringp[^ ]*\|st.\)$/\1/p' \
|
||
|
|
| sort
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -448,7 +448,7 @@ readelf --debug-dump=info ./foobarbaz.exe \
|
||
|
|
| awk '/Abbrev Number:.*DW_TAG_type_unit/{p=1}{if(p)print}/^$/{p=0}' \
|
||
|
|
| sed -n 's/^.*> *DW_AT_name *:.* \(stringp[^ ]*\|st.\)$/\1/p' \
|
||
|
|
| sort
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -477,7 +477,7 @@ AT_CHECK([[
|
||
|
|
readelf --debug-dump=line foo.o subdir_bar/bar.o baz.o \
|
||
|
|
| grep -A3 "The Directory Table" | grep "^ [123]" \
|
||
|
|
| grep /foo/ | cut -c5- | sort
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -504,7 +504,7 @@ AT_CHECK([[
|
||
|
|
readelf --debug-dump=line foo.o subdir_bar/bar.o baz.o \
|
||
|
|
| grep -A5 "The Directory Table" | grep "^ [0123]" \
|
||
|
|
| cut -f2- -d/ | grep ^foo/ | sort -u
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -526,7 +526,7 @@ AT_CHECK([[
|
||
|
|
readelf --debug-dump=line ./foobarbaz.part.o \
|
||
|
|
| grep -A3 "The Directory Table" | grep "^ [123]" \
|
||
|
|
| grep /foo/ | cut -c5- | sort
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -551,7 +551,7 @@ AT_CHECK([[
|
||
|
|
readelf --debug-dump=line ./foobarbaz.part.o \
|
||
|
|
| grep -A5 "The Directory Table" | grep "^ [0123]" \
|
||
|
|
| cut -f2- -d/ | grep ^foo/ | sort -u
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -573,7 +573,7 @@ AT_CHECK([[
|
||
|
|
readelf --debug-dump=line ./foobarbaz.exe \
|
||
|
|
| grep -A3 "The Directory Table" | grep "^ [123]" \
|
||
|
|
| grep /foo/ | cut -c5- | sort
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -598,7 +598,7 @@ AT_CHECK([[
|
||
|
|
readelf --debug-dump=line ./foobarbaz.exe \
|
||
|
|
| grep -A5 "The Directory Table" | grep "^ [0123]" \
|
||
|
|
| cut -f2- -d/ | grep ^foo/ | sort -u
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -623,7 +623,7 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
|
||
|
|
AT_CHECK([[
|
||
|
|
readelf --debug-dump=macro foo.o subdir_bar/bar.o baz.o \
|
||
|
|
| grep NUMBER | rev | cut -d: -f1 | rev | cut -c2-
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -646,7 +646,7 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
|
||
|
|
AT_CHECK([[
|
||
|
|
readelf --debug-dump=macro ./foobarbaz.part.o \
|
||
|
|
| grep NUMBER | rev | cut -d: -f1 | rev | cut -c2-
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
@@ -669,7 +669,7 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.exe]])
|
||
|
|
AT_CHECK([[
|
||
|
|
readelf --debug-dump=macro ./foobarbaz.exe \
|
||
|
|
| grep NUMBER | rev | cut -d: -f1 | rev | cut -c2-
|
||
|
|
-]],[0],[expout])
|
||
|
|
+]],[0],[expout],[ignore])
|
||
|
|
|
||
|
|
AT_CLEANUP
|
||
|
|
|
||
|
|
--
|
||
|
|
2.39.5
|
||
|
|
|