public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applied] test-annotate: Don't emit architecture data
Date: Tue, 20 Sep 2022 09:40:50 +0200	[thread overview]
Message-ID: <87a66u7at9.fsf@redhat.com> (raw)

Hello,

When running runtestannotate on different architectures, some spurious
test failures can happen because the resulting abixml contains the
architecture of the original binary.  This can be a problem for tests
where the binary is compiled on the fly.  We don't yet have those, but
I was playing with some of these while debugging something else and
stumbled across that issue.

This patch thus removes mentions of the architecture of the binary,
just like what runtestreaddwarf does.

	* tests/test-annotate.cc (main): Add the --no-architecture option
	to abidw.
	* tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi:
	Adjust.
	* tests/data/test-annotate/libtest23.so.abi: Likewise.
	* tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
	* tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
	* tests/data/test-annotate/test-anonymous-members-0.o.abi:
	Likewise.
	* tests/data/test-annotate/test0.abi: Likewise.
	* tests/data/test-annotate/test1.abi: Likewise.
	* tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
	* tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
	* tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
	* tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
	* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
	Likewise.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-annotate/test2.so.abi: Likewise.
	* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Likewise.
	* tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
	* tests/data/test-annotate/test3.so.abi: Likewise.
	* tests/data/test-annotate/test4.so.abi: Likewise.
	* tests/data/test-annotate/test5.o.abi: Likewise.
	* tests/data/test-annotate/test6.so.abi: Likewise.
	* tests/data/test-annotate/test7.so.abi: Likewise.
	* tests/data/test-annotate/test8-qualified-this-pointer.so.abi:
	Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi     | 2 +-
 tests/data/test-annotate/libtest23.so.abi                       | 2 +-
 tests/data/test-annotate/libtest24-drop-fns-2.so.abi            | 2 +-
 tests/data/test-annotate/libtest24-drop-fns.so.abi              | 2 +-
 tests/data/test-annotate/test-anonymous-members-0.o.abi         | 2 +-
 tests/data/test-annotate/test0.abi                              | 2 +-
 tests/data/test-annotate/test1.abi                              | 2 +-
 tests/data/test-annotate/test13-pr18894.so.abi                  | 2 +-
 tests/data/test-annotate/test14-pr18893.so.abi                  | 2 +-
 tests/data/test-annotate/test15-pr18892.so.abi                  | 2 +-
 tests/data/test-annotate/test17-pr19027.so.abi                  | 2 +-
 .../test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi  | 2 +-
 .../test19-pr19023-libtcmalloc_and_profiler.so.abi              | 2 +-
 tests/data/test-annotate/test2.so.abi                           | 2 +-
 .../test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi  | 2 +-
 tests/data/test-annotate/test21-pr19092.so.abi                  | 2 +-
 tests/data/test-annotate/test3.so.abi                           | 2 +-
 tests/data/test-annotate/test4.so.abi                           | 2 +-
 tests/data/test-annotate/test5.o.abi                            | 2 +-
 tests/data/test-annotate/test6.so.abi                           | 2 +-
 tests/data/test-annotate/test7.so.abi                           | 2 +-
 tests/data/test-annotate/test8-qualified-this-pointer.so.abi    | 2 +-
 tests/test-annotate.cc                                          | 2 +-
 23 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi b/tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi
index dde6a745..74d33acb 100644
--- a/tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi
+++ b/tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-variable-symbols>
     <!-- signed char -->
     <elf-symbol name='a' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-annotate/libtest23.so.abi b/tests/data/test-annotate/libtest23.so.abi
index 1b7424e2..102fafad 100644
--- a/tests/data/test-annotate/libtest23.so.abi
+++ b/tests/data/test-annotate/libtest23.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/libtest24-drop-fns-2.so.abi b/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
index 11f8a916..84b2c57b 100644
--- a/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
+++ b/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libgcc_s.so.1'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/data/test-annotate/libtest24-drop-fns.so.abi b/tests/data/test-annotate/libtest24-drop-fns.so.abi
index 11f8a916..84b2c57b 100644
--- a/tests/data/test-annotate/libtest24-drop-fns.so.abi
+++ b/tests/data/test-annotate/libtest24-drop-fns.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libgcc_s.so.1'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/data/test-annotate/test-anonymous-members-0.o.abi b/tests/data/test-annotate/test-anonymous-members-0.o.abi
index ae3ae917..91d309c8 100644
--- a/tests/data/test-annotate/test-anonymous-members-0.o.abi
+++ b/tests/data/test-annotate/test-anonymous-members-0.o.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-function-symbols>
     <!-- foo(S&) -->
     <elf-symbol name='_Z3fooR1S' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-annotate/test0.abi b/tests/data/test-annotate/test0.abi
index aed6b1ea..34bc8047 100644
--- a/tests/data/test-annotate/test0.abi
+++ b/tests/data/test-annotate/test0.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test1.abi b/tests/data/test-annotate/test1.abi
index 52a87250..54e66179 100644
--- a/tests/data/test-annotate/test1.abi
+++ b/tests/data/test-annotate/test1.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test13-pr18894.so.abi b/tests/data/test-annotate/test13-pr18894.so.abi
index addb886e..98c91663 100644
--- a/tests/data/test-annotate/test13-pr18894.so.abi
+++ b/tests/data/test-annotate/test13-pr18894.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64' soname='libdbus-1.so.3'>
+<abi-corpus version='2.1' soname='libdbus-1.so.3'>
   <elf-needed>
     <dependency name='librt.so.1'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-annotate/test14-pr18893.so.abi b/tests/data/test-annotate/test14-pr18893.so.abi
index 919ae082..2481d592 100644
--- a/tests/data/test-annotate/test14-pr18893.so.abi
+++ b/tests/data/test-annotate/test14-pr18893.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64' soname='libGLU.so.1'>
+<abi-corpus version='2.1' soname='libGLU.so.1'>
   <elf-needed>
     <dependency name='libGL.so.1'/>
     <dependency name='libstdc++.so.6'/>
diff --git a/tests/data/test-annotate/test15-pr18892.so.abi b/tests/data/test-annotate/test15-pr18892.so.abi
index 6d71ed97..5f53943e 100644
--- a/tests/data/test-annotate/test15-pr18892.so.abi
+++ b/tests/data/test-annotate/test15-pr18892.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64' soname='libtsan.so.0'>
+<abi-corpus version='2.1' soname='libtsan.so.0'>
   <elf-needed>
     <dependency name='librt.so.1'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-annotate/test17-pr19027.so.abi b/tests/data/test-annotate/test17-pr19027.so.abi
index 2f855f6e..f1f22a58 100644
--- a/tests/data/test-annotate/test17-pr19027.so.abi
+++ b/tests/data/test-annotate/test17-pr19027.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64' soname='libharfbuzz.so.0'>
+<abi-corpus version='2.1' soname='libharfbuzz.so.0'>
   <elf-needed>
     <dependency name='libglib-2.0.so.0'/>
     <dependency name='libfreetype.so.6'/>
diff --git a/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi b/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
index a04af5d6..328c8d7a 100644
--- a/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
+++ b/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64' soname='libvtkRenderingLIC-6.1.so.1'>
+<abi-corpus version='2.1' soname='libvtkRenderingLIC-6.1.so.1'>
   <elf-needed>
     <dependency name='libvtkIOLegacy-6.1.so.1'/>
     <dependency name='libvtkIOXML-6.1.so.1'/>
diff --git a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
index 363a32d1..a52f9f7e 100644
--- a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
+++ b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64' soname='libtcmalloc_and_profiler.so.4'>
+<abi-corpus version='2.1' soname='libtcmalloc_and_profiler.so.4'>
   <elf-needed>
     <dependency name='libunwind.so.8'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-annotate/test2.so.abi b/tests/data/test-annotate/test2.so.abi
index ba5e8a3f..3dc09be8 100644
--- a/tests/data/test-annotate/test2.so.abi
+++ b/tests/data/test-annotate/test2.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi b/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
index b2016e79..a17ecc39 100644
--- a/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
+++ b/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64' soname='libvtkParallelCore-6.1.so.1'>
+<abi-corpus version='2.1' soname='libvtkParallelCore-6.1.so.1'>
   <elf-needed>
     <dependency name='libvtkIOLegacy-6.1.so.1'/>
     <dependency name='libvtkIOCore-6.1.so.1'/>
diff --git a/tests/data/test-annotate/test21-pr19092.so.abi b/tests/data/test-annotate/test21-pr19092.so.abi
index befbb376..c6266871 100644
--- a/tests/data/test-annotate/test21-pr19092.so.abi
+++ b/tests/data/test-annotate/test21-pr19092.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test3.so.abi b/tests/data/test-annotate/test3.so.abi
index 37ee0e47..3da43791 100644
--- a/tests/data/test-annotate/test3.so.abi
+++ b/tests/data/test-annotate/test3.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64' soname='test3.so.1'>
+<abi-corpus version='2.1' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-annotate/test4.so.abi b/tests/data/test-annotate/test4.so.abi
index 7913e324..2e7a47f4 100644
--- a/tests/data/test-annotate/test4.so.abi
+++ b/tests/data/test-annotate/test4.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-annotate/test5.o.abi b/tests/data/test-annotate/test5.o.abi
index 86bcf937..38655f74 100644
--- a/tests/data/test-annotate/test5.o.abi
+++ b/tests/data/test-annotate/test5.o.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-function-symbols>
     <!-- bar(void*) -->
     <elf-symbol name='_Z3barPv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-annotate/test6.so.abi b/tests/data/test-annotate/test6.so.abi
index e4ee3be4..aa22f841 100644
--- a/tests/data/test-annotate/test6.so.abi
+++ b/tests/data/test-annotate/test6.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test7.so.abi b/tests/data/test-annotate/test7.so.abi
index a33fdd73..ea7ee86c 100644
--- a/tests/data/test-annotate/test7.so.abi
+++ b/tests/data/test-annotate/test7.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-function-symbols>
     <!-- foo(S&) -->
     <elf-symbol name='_Z3fooR1S' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-annotate/test8-qualified-this-pointer.so.abi b/tests/data/test-annotate/test8-qualified-this-pointer.so.abi
index 0e763405..117451c4 100644
--- a/tests/data/test-annotate/test8-qualified-this-pointer.so.abi
+++ b/tests/data/test-annotate/test8-qualified-this-pointer.so.abi
@@ -1,4 +1,4 @@
-<abi-corpus version='2.1' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.1'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/test-annotate.cc b/tests/test-annotate.cc
index b8a1ee75..f01fe6db 100644
--- a/tests/test-annotate.cc
+++ b/tests/test-annotate.cc
@@ -153,7 +153,7 @@ main()
   string abidw;
 
   abidw = string(get_build_dir()) + "/tools/abidw "
-    "--annotate --no-corpus-path";
+    "--annotate --no-corpus-path --no-architecture";
   for (InOutSpec* s = in_out_specs; s->in_elf_path; ++s)
     {
       bool is_ok = true;
-- 
2.37.2


-- 
		Dodji


                 reply	other threads:[~2022-09-20  7:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a66u7at9.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).