diff mbox series

[2/3] test-diff-suppr.cc: Add missing tests.

Message ID 20200329170121.188147-2-gprocida@google.com
State Committed
Headers show
Series [1/3] abidiff: Remove blank line after typedef changes. | expand

Commit Message

Giuliano Procida March 29, 2020, 5:01 p.m. UTC
Commit 79383f937ca5cd8b3b0cd9e8a5c28871172e7bf1 added many tests but
didn't actually execute three of them.

Commit fe9fa7a05f88cf73b3f53c188a7682467901d12d added many tests but
didn't actually execute one of them.

This patch corrects these issues.

	* tests/test-diff-suppr.cc: Add stanzas for
	test6-fn-suppr-report-4, test16-suppr-removed-fn-report-5 and
	test22-suppr-removed-var-sym-report-5 and
	test23-alias-filter-report-4 tests.
	* tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt:
	Number parameters from 1 and update expected output to current
	formatting.
	* tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt:
	Update expected output to current formatting.
	* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt:
	Update expected output to current formatting.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 .../test16-suppr-removed-fn-report-5.txt      |  4 +-
 .../test22-suppr-removed-var-sym-report-5.txt |  1 -
 .../test6-fn-suppr-report-4.txt               | 13 +++---
 tests/test-diff-suppr.cc                      | 40 +++++++++++++++++++
 4 files changed, 47 insertions(+), 11 deletions(-)

Comments

Matthias Maennich March 29, 2020, 5:30 p.m. UTC | #1
On Sun, Mar 29, 2020 at 06:01:20PM +0100, Giuliano Procida wrote:
>Commit 79383f937ca5cd8b3b0cd9e8a5c28871172e7bf1 added many tests but
>didn't actually execute three of them.
>
>Commit fe9fa7a05f88cf73b3f53c188a7682467901d12d added many tests but
>didn't actually execute one of them.
>
>This patch corrects these issues.
>
>	* tests/test-diff-suppr.cc: Add stanzas for
>	test6-fn-suppr-report-4, test16-suppr-removed-fn-report-5 and
>	test22-suppr-removed-var-sym-report-5 and
>	test23-alias-filter-report-4 tests.
>	* tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt:
>	Number parameters from 1 and update expected output to current
>	formatting.
>	* tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt:
>	Update expected output to current formatting.
>	* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt:
>	Update expected output to current formatting.
>
>Signed-off-by: Giuliano Procida <gprocida@google.com>

Reviewed-by: Matthias Maennich <maennich@google.com>

Cheers,
Matthias

>---
> .../test16-suppr-removed-fn-report-5.txt      |  4 +-
> .../test22-suppr-removed-var-sym-report-5.txt |  1 -
> .../test6-fn-suppr-report-4.txt               | 13 +++---
> tests/test-diff-suppr.cc                      | 40 +++++++++++++++++++
> 4 files changed, 47 insertions(+), 11 deletions(-)
>
>diff --git a/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt b/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt
>index e12412dc..b28fbd16 100644
>--- a/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt
>+++ b/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt
>@@ -10,9 +10,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
>   [C] 'function void bar(S*)' has some indirect sub-type changes:
>     parameter 1 of type 'S*' has sub-type changes:
>       in pointed to type 'struct S':
>-        type size changed from 32 to 64 bits
>+        type size changed from 32 to 64 (in bits)
>         1 data member insertion:
>           'unsigned int S::bar', at offset 32 (in bits)
>
>-
>-
>diff --git a/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt b/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt
>index 174f1b93..5549648d 100644
>--- a/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt
>+++ b/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt
>@@ -3,7 +3,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
> Function symbols changes summary: 0 Removed, 0 Added function symbol not referenced by debug info
> Variable symbols changes summary: 0 Removed (2 filtered out), 1 Added variable symbols not referenced by debug info
>
>-
> 1 Added variable symbol not referenced by debug info:
>
>   [A] global_var3
>diff --git a/tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt b/tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt
>index 5633bed5..094b4903 100644
>--- a/tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt
>+++ b/tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt
>@@ -4,21 +4,20 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
> 2 functions with some indirect sub-type change:
>
>   [C] 'function void bar(S1*)' has some indirect sub-type changes:
>-    parameter 0 of type 'S1*' has sub-type changes:
>+    parameter 1 of type 'S1*' has sub-type changes:
>       in pointed to type 'struct S1':
>-        size changed from 32 to 64 bits
>+        type size changed from 32 to 64 (in bits)
>         1 base class insertion:
>           struct base
>         1 data member change:
>-         'int S1::m0' offset changed from 0 to 32
>+          'int S1::m0' offset changed from 0 to 32 (in bits) (by +32 bits)
>
>   [C] 'function int bar(S&)' has some indirect sub-type changes:
>-    parameter 0 of type 'S&' has sub-type changes:
>+    parameter 1 of type 'S&' has sub-type changes:
>       in referenced type 'struct S':
>-        size changed from 32 to 64 bits
>+        type size changed from 32 to 64 (in bits)
>         1 base class insertion:
>           struct base
>         1 data member change:
>-         'int S::m0' offset changed from 0 to 32
>-
>+          'int S::m0' offset changed from 0 to 32 (in bits) (by +32 bits)
>
>diff --git a/tests/test-diff-suppr.cc b/tests/test-diff-suppr.cc
>index 6b6a748c..abc1b3d7 100644
>--- a/tests/test-diff-suppr.cc
>+++ b/tests/test-diff-suppr.cc
>@@ -348,6 +348,16 @@ InOutSpec in_out_specs[] =
>     "data/test-diff-suppr/test6-fn-suppr-report-3.txt",
>     "output/test-diff-suppr/test6-fn-suppr-report-3.txt",
>   },
>+  {
>+    "data/test-diff-suppr/libtest6-fn-suppr-v0.so",
>+    "data/test-diff-suppr/libtest6-fn-suppr-v1.so",
>+    "",
>+    "",
>+    "data/test-diff-suppr/test6-fn-suppr-3.suppr",
>+    "--no-default-suppression --no-show-locs --no-redundant",
>+    "data/test-diff-suppr/test6-fn-suppr-report-4.txt",
>+    "output/test-diff-suppr/test6-fn-suppr-report-4.txt",
>+  },
>   {
>     "data/test-diff-suppr/libtest7-var-suppr-v0.so",
>     "data/test-diff-suppr/libtest7-var-suppr-v1.so",
>@@ -738,6 +748,16 @@ InOutSpec in_out_specs[] =
>     "data/test-diff-suppr/test16-suppr-removed-fn-report-4.txt",
>     "output/test-diff-suppr/test16-suppr-removed-fn-report-4.txt"
>   },
>+  {
>+    "data/test-diff-suppr/test16-suppr-removed-fn-v0.o",
>+    "data/test-diff-suppr/test16-suppr-removed-fn-v1.o",
>+    "",
>+    "",
>+    "data/test-diff-suppr/test16-suppr-removed-fn-4.suppr",
>+    "--no-default-suppression --no-show-locs --no-redundant",
>+    "data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt",
>+    "output/test-diff-suppr/test16-suppr-removed-fn-report-5.txt"
>+  },
>   {
>     "data/test-diff-suppr/test17-suppr-added-var-v0.o",
>     "data/test-diff-suppr/test17-suppr-added-var-v1.o",
>@@ -1088,6 +1108,16 @@ InOutSpec in_out_specs[] =
>     "data/test-diff-suppr/test22-suppr-removed-var-sym-report-4.txt",
>     "output/test-diff-suppr/test22-suppr-removed-var-sym-report-4.txt"
>   },
>+  {
>+    "data/test-diff-suppr/test22-suppr-removed-var-sym-v0.o",
>+    "data/test-diff-suppr/test22-suppr-removed-var-sym-v1.o",
>+    "",
>+    "",
>+    "data/test-diff-suppr/test22-suppr-removed-var-sym-4.suppr",
>+    "--no-default-suppression --no-show-locs --no-redundant",
>+    "data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt",
>+    "output/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt"
>+  },
>   {
>     "data/test-diff-suppr/libtest23-alias-filter-v0.so",
>     "data/test-diff-suppr/libtest23-alias-filter-v1.so ",
>@@ -1128,6 +1158,16 @@ InOutSpec in_out_specs[] =
>     "data/test-diff-suppr/test23-alias-filter-report-3.txt",
>     "output/test-diff-suppr/test23-alias-filter-report-3.txt"
>   },
>+  {
>+    "data/test-diff-suppr/libtest23-alias-filter-v0.so",
>+    "data/test-diff-suppr/libtest23-alias-filter-v1.so ",
>+    "",
>+    "",
>+    "data/test-diff-suppr/test23-alias-filter-3.suppr",
>+    "--no-default-suppression --no-show-locs --no-redundant",
>+    "data/test-diff-suppr/test23-alias-filter-report-4.txt",
>+    "output/test-diff-suppr/test23-alias-filter-report-4.txt"
>+  },
>   {
>     "data/test-diff-suppr/libtest23-alias-filter-v0.so",
>     "data/test-diff-suppr/libtest23-alias-filter-v1.so ",
>-- 
>2.26.0.rc2.310.g2932bb562d-goog
>
Dodji Seketeli April 1, 2020, 4:46 p.m. UTC | #2
Giuliano Procida <gprocida@google.com> a ?crit:

> Commit 79383f937ca5cd8b3b0cd9e8a5c28871172e7bf1 added many tests but
> didn't actually execute three of them.
>
> Commit fe9fa7a05f88cf73b3f53c188a7682467901d12d added many tests but
> didn't actually execute one of them.
>
> This patch corrects these issues.
>
> 	* tests/test-diff-suppr.cc: Add stanzas for
> 	test6-fn-suppr-report-4, test16-suppr-removed-fn-report-5 and
> 	test22-suppr-removed-var-sym-report-5 and
> 	test23-alias-filter-report-4 tests.
> 	* tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt:
> 	Number parameters from 1 and update expected output to current
> 	formatting.
> 	* tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt:
> 	Update expected output to current formatting.
> 	* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt:
> 	Update expected output to current formatting.

Applied to master, thanks!

Cheers,
diff mbox series

Patch

diff --git a/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt b/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt
index e12412dc..b28fbd16 100644
--- a/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt
+++ b/tests/data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt
@@ -10,9 +10,7 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
   [C] 'function void bar(S*)' has some indirect sub-type changes:
     parameter 1 of type 'S*' has sub-type changes:
       in pointed to type 'struct S':
-        type size changed from 32 to 64 bits
+        type size changed from 32 to 64 (in bits)
         1 data member insertion:
           'unsigned int S::bar', at offset 32 (in bits)
 
-
-
diff --git a/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt b/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt
index 174f1b93..5549648d 100644
--- a/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt
+++ b/tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt
@@ -3,7 +3,6 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 Function symbols changes summary: 0 Removed, 0 Added function symbol not referenced by debug info
 Variable symbols changes summary: 0 Removed (2 filtered out), 1 Added variable symbols not referenced by debug info
 
-
 1 Added variable symbol not referenced by debug info:
 
   [A] global_var3
diff --git a/tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt b/tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt
index 5633bed5..094b4903 100644
--- a/tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt
+++ b/tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt
@@ -4,21 +4,20 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
 2 functions with some indirect sub-type change:
 
   [C] 'function void bar(S1*)' has some indirect sub-type changes:
-    parameter 0 of type 'S1*' has sub-type changes:
+    parameter 1 of type 'S1*' has sub-type changes:
       in pointed to type 'struct S1':
-        size changed from 32 to 64 bits
+        type size changed from 32 to 64 (in bits)
         1 base class insertion:
           struct base
         1 data member change:
-         'int S1::m0' offset changed from 0 to 32
+          'int S1::m0' offset changed from 0 to 32 (in bits) (by +32 bits)
 
   [C] 'function int bar(S&)' has some indirect sub-type changes:
-    parameter 0 of type 'S&' has sub-type changes:
+    parameter 1 of type 'S&' has sub-type changes:
       in referenced type 'struct S':
-        size changed from 32 to 64 bits
+        type size changed from 32 to 64 (in bits)
         1 base class insertion:
           struct base
         1 data member change:
-         'int S::m0' offset changed from 0 to 32
-
+          'int S::m0' offset changed from 0 to 32 (in bits) (by +32 bits)
 
diff --git a/tests/test-diff-suppr.cc b/tests/test-diff-suppr.cc
index 6b6a748c..abc1b3d7 100644
--- a/tests/test-diff-suppr.cc
+++ b/tests/test-diff-suppr.cc
@@ -348,6 +348,16 @@  InOutSpec in_out_specs[] =
     "data/test-diff-suppr/test6-fn-suppr-report-3.txt",
     "output/test-diff-suppr/test6-fn-suppr-report-3.txt",
   },
+  {
+    "data/test-diff-suppr/libtest6-fn-suppr-v0.so",
+    "data/test-diff-suppr/libtest6-fn-suppr-v1.so",
+    "",
+    "",
+    "data/test-diff-suppr/test6-fn-suppr-3.suppr",
+    "--no-default-suppression --no-show-locs --no-redundant",
+    "data/test-diff-suppr/test6-fn-suppr-report-4.txt",
+    "output/test-diff-suppr/test6-fn-suppr-report-4.txt",
+  },
   {
     "data/test-diff-suppr/libtest7-var-suppr-v0.so",
     "data/test-diff-suppr/libtest7-var-suppr-v1.so",
@@ -738,6 +748,16 @@  InOutSpec in_out_specs[] =
     "data/test-diff-suppr/test16-suppr-removed-fn-report-4.txt",
     "output/test-diff-suppr/test16-suppr-removed-fn-report-4.txt"
   },
+  {
+    "data/test-diff-suppr/test16-suppr-removed-fn-v0.o",
+    "data/test-diff-suppr/test16-suppr-removed-fn-v1.o",
+    "",
+    "",
+    "data/test-diff-suppr/test16-suppr-removed-fn-4.suppr",
+    "--no-default-suppression --no-show-locs --no-redundant",
+    "data/test-diff-suppr/test16-suppr-removed-fn-report-5.txt",
+    "output/test-diff-suppr/test16-suppr-removed-fn-report-5.txt"
+  },
   {
     "data/test-diff-suppr/test17-suppr-added-var-v0.o",
     "data/test-diff-suppr/test17-suppr-added-var-v1.o",
@@ -1088,6 +1108,16 @@  InOutSpec in_out_specs[] =
     "data/test-diff-suppr/test22-suppr-removed-var-sym-report-4.txt",
     "output/test-diff-suppr/test22-suppr-removed-var-sym-report-4.txt"
   },
+  {
+    "data/test-diff-suppr/test22-suppr-removed-var-sym-v0.o",
+    "data/test-diff-suppr/test22-suppr-removed-var-sym-v1.o",
+    "",
+    "",
+    "data/test-diff-suppr/test22-suppr-removed-var-sym-4.suppr",
+    "--no-default-suppression --no-show-locs --no-redundant",
+    "data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt",
+    "output/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt"
+  },
   {
     "data/test-diff-suppr/libtest23-alias-filter-v0.so",
     "data/test-diff-suppr/libtest23-alias-filter-v1.so ",
@@ -1128,6 +1158,16 @@  InOutSpec in_out_specs[] =
     "data/test-diff-suppr/test23-alias-filter-report-3.txt",
     "output/test-diff-suppr/test23-alias-filter-report-3.txt"
   },
+  {
+    "data/test-diff-suppr/libtest23-alias-filter-v0.so",
+    "data/test-diff-suppr/libtest23-alias-filter-v1.so ",
+    "",
+    "",
+    "data/test-diff-suppr/test23-alias-filter-3.suppr",
+    "--no-default-suppression --no-show-locs --no-redundant",
+    "data/test-diff-suppr/test23-alias-filter-report-4.txt",
+    "output/test-diff-suppr/test23-alias-filter-report-4.txt"
+  },
   {
     "data/test-diff-suppr/libtest23-alias-filter-v0.so",
     "data/test-diff-suppr/libtest23-alias-filter-v1.so ",