test-annotate: Don't emit architecture data
authorDodji Seketeli <dodji@redhat.com>
Mon, 19 Sep 2022 15:35:41 +0000 (17:35 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 20 Sep 2022 06:58:09 +0000 (08:58 +0200)
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>
23 files changed:
tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi
tests/data/test-annotate/libtest23.so.abi
tests/data/test-annotate/libtest24-drop-fns-2.so.abi
tests/data/test-annotate/libtest24-drop-fns.so.abi
tests/data/test-annotate/test-anonymous-members-0.o.abi
tests/data/test-annotate/test0.abi
tests/data/test-annotate/test1.abi
tests/data/test-annotate/test13-pr18894.so.abi
tests/data/test-annotate/test14-pr18893.so.abi
tests/data/test-annotate/test15-pr18892.so.abi
tests/data/test-annotate/test17-pr19027.so.abi
tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
tests/data/test-annotate/test2.so.abi
tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
tests/data/test-annotate/test21-pr19092.so.abi
tests/data/test-annotate/test3.so.abi
tests/data/test-annotate/test4.so.abi
tests/data/test-annotate/test5.o.abi
tests/data/test-annotate/test6.so.abi
tests/data/test-annotate/test7.so.abi
tests/data/test-annotate/test8-qualified-this-pointer.so.abi
tests/test-annotate.cc

index dde6a745124ddd615cccdec12b75a4006916c4a6..74d33acb1e228c720d454df8aa29af20e2144755 100644 (file)
@@ -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'/>
index 1b7424e2c4209374b1ae5b438d7c950f7f2d1b8d..102fafadc69588c3b29c5bc0a2e8d92b9947b15f 100644 (file)
@@ -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'/>
index 11f8a91669d6a81524d096c9b020e76ea1ade785..84b2c57b552e796610f7366a5628a8b60f329d0e 100644 (file)
@@ -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'/>
index 11f8a91669d6a81524d096c9b020e76ea1ade785..84b2c57b552e796610f7366a5628a8b60f329d0e 100644 (file)
@@ -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'/>
index ae3ae917d0175de042ec4c5e5b717bdf764d18e3..91d309c81b62bb83fa6a9b29251ffc64723a1408 100644 (file)
@@ -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'/>
index aed6b1ea80c066c8c2bfce75831457e9fd8d52b9..34bc8047393482892fe9c7c537761d7fb01bad5d 100644 (file)
@@ -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'/>
index 52a8725029377ec39b075f263d168952991fed08..54e6617991a664d93e54d50960d2c04853da424b 100644 (file)
@@ -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'/>
index addb886e72b7413ca4cdd5d0b18cc3df984ee4b2..98c916633610cc1470584b8205964919dc9881e1 100644 (file)
@@ -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'/>
index 919ae0828cf2664a445f7f9b6e1f6adda1fcbe2e..2481d592c743e22dd294638cc5bd62757c74db7b 100644 (file)
@@ -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'/>
index 6d71ed97b003e52fb3c16a865e2d3a9be0979fe0..5f53943ee203b4745e70f55357b6b73212e97513 100644 (file)
@@ -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'/>
index 2f855f6e9ed6a1e85964ef02455208db56a88eb1..f1f22a588e7801915ec217a802c19d798ab9a685 100644 (file)
@@ -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'/>
index a04af5d63b641f4e7a45a6ef498a8e6f72dbe1ec..328c8d7aa560749d2352bb23e0076f47a6f496f3 100644 (file)
@@ -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'/>
index 363a32d14cc140c69c032ed8e1a5df47b22ec754..a52f9f7e51870969535ed03b00d41960bf4e02d8 100644 (file)
@@ -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'/>
index ba5e8a3f7c3726778cb561c0bd20cba0c182bbce..3dc09be8b5b24a111a8b607377227bbb34e77b83 100644 (file)
@@ -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'/>
index b2016e79347ba8feeb0df36c78c16297f6b86a5e..a17ecc393e6232691fb4ef6d85d3c0af9b0fbdcf 100644 (file)
@@ -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'/>
index befbb3764fad8749f6f8dadfd0ed6be456a900df..c6266871eac9a97dbe552946894c3114b4389199 100644 (file)
@@ -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'/>
index 37ee0e4706661977e2aaf96dfe229f48a651d49e..3da437913cb3d1894f098d3ea7218e090deb1748 100644 (file)
@@ -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>
index 7913e3249df20fe8054c50be6aa41bc2dfa1c4bf..2e7a47f4d321ee4961b9ecd1155ddc1036859d1e 100644 (file)
@@ -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>
index 86bcf937c8c465ed3054e41423f30337e5a9b99f..38655f74b6b2d798ce4231842c1110ff274b99ff 100644 (file)
@@ -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'/>
index e4ee3be457e11d4cb035f125124efb4e31fd5a25..aa22f8410803300da03e1d7c77e07f07a4e1c080 100644 (file)
@@ -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'/>
index a33fdd733a55337f0122fe725ca0dd49f7e760e4..ea7ee86c91289ba3942f033196e20bb7bdd0881f 100644 (file)
@@ -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'/>
index 0e76340548d06c2620c43968ea0347266a3b5f12..117451c416723851620a53b63462113572d923e4 100644 (file)
@@ -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'/>
index b8a1ee755629202e239ec4b30a2a5192418bc7b5..f01fe6db3087a67ea8b64fb12cbf9e092511de85 100644 (file)
@@ -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;