diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-03-06 23:48:21 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-03-11 03:08:22 +0100 |
| commit | 6e42c573ee706720a91a19ab6461aff63fc6999b (patch) | |
| tree | 8d2a3ba0a2a2320f852f9044843f7fc59b6631c5 | |
| parent | 7f9145f334c94fa29f4911b5a9d6d83538181f4f (diff) | |
| download | sparse-dev-6e42c573ee706720a91a19ab6461aff63fc6999b.tar.gz | |
testsuite: fix problem with double-escaping in patterns
Since the patterns in the testcases are evaluated in the shell
script, the backslash used to escape characters special to the
pattern need itself to be escaped. Theer is a few cases where
it wasn't done so, partly because 'format -l' gave a single
escape in its template.
Fix all occurences neededing this double-escape as well as the
'format -l' template.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | validation/c11-alignas.c | 2 | ||||
| -rw-r--r-- | validation/c11-alignof.c | 2 | ||||
| -rw-r--r-- | validation/linear/bitfield-expand-deref.c | 4 | ||||
| -rw-r--r-- | validation/linear/call-builtin.c | 2 | ||||
| -rw-r--r-- | validation/linear/call-casted-pointer.c | 4 | ||||
| -rw-r--r-- | validation/linear/call-direct.c | 2 | ||||
| -rw-r--r-- | validation/linear/call-indirect.c | 2 | ||||
| -rw-r--r-- | validation/linear/call-inline.c | 2 | ||||
| -rw-r--r-- | validation/linear/deref-ptr-ptr.c | 4 | ||||
| -rw-r--r-- | validation/linear/unexamined-base-type.c | 2 | ||||
| -rw-r--r-- | validation/mem2reg/killed-insn.c | 2 | ||||
| -rw-r--r-- | validation/optim/call-complex-pointer.c | 4 | ||||
| -rw-r--r-- | validation/optim/canonical-add.c | 4 | ||||
| -rw-r--r-- | validation/optim/canonical-cmp.c | 2 | ||||
| -rw-r--r-- | validation/optim/canonical-fcmp.c | 2 | ||||
| -rw-r--r-- | validation/optim/canonical-mul.c | 6 | ||||
| -rw-r--r-- | validation/optim/load-converted.c | 2 | ||||
| -rw-r--r-- | validation/optim/store-dominated.c | 2 | ||||
| -rwxr-xr-x | validation/test-suite | 8 |
19 files changed, 29 insertions, 29 deletions
diff --git a/validation/c11-alignas.c b/validation/c11-alignas.c index 4b264a5d..b7ae2abc 100644 --- a/validation/c11-alignas.c +++ b/validation/c11-alignas.c @@ -36,5 +36,5 @@ c11-alignas.c:10:17: error: Syntax error in unary expression * check-error-end * * check-output-ignore - * check-output-contains: ret\\.32 *\$0 + * check-output-contains: ret\\.32 *\\$0 */ diff --git a/validation/c11-alignof.c b/validation/c11-alignof.c index 238ef994..83c0e70d 100644 --- a/validation/c11-alignof.c +++ b/validation/c11-alignof.c @@ -8,5 +8,5 @@ static int foo(void) * check-command: test-linearize -std=c11 $file * * check-output-ignore - * check-output-contains: ret\\.32 *\$2 + * check-output-contains: ret\\.32 *\\$2 */ diff --git a/validation/linear/bitfield-expand-deref.c b/validation/linear/bitfield-expand-deref.c index 7748725f..43e1078d 100644 --- a/validation/linear/bitfield-expand-deref.c +++ b/validation/linear/bitfield-expand-deref.c @@ -22,6 +22,6 @@ int bar(int a) * check-command: test-linearize -Wno-decl $file * * check-output-ignore - * check-output-excludes: ret\..*\$12 - * check-output-contains: ret\..*\$34 + * check-output-excludes: ret\\..*\\$12 + * check-output-contains: ret\\..*\\$34 */ diff --git a/validation/linear/call-builtin.c b/validation/linear/call-builtin.c index b1511359..43e254f6 100644 --- a/validation/linear/call-builtin.c +++ b/validation/linear/call-builtin.c @@ -13,5 +13,5 @@ u32 f3(u32 a) { return (***__builtin_popcount)(a); } // C99,C11 6.5.3.2p4 * * check-output-ignore * check-output-excludes: load - * check-output-pattern(5): call\..*__builtin_.*, %arg1 + * check-output-pattern(5): call\\..*__builtin_.*, %arg1 */ diff --git a/validation/linear/call-casted-pointer.c b/validation/linear/call-casted-pointer.c index 610d6748..60f53605 100644 --- a/validation/linear/call-casted-pointer.c +++ b/validation/linear/call-casted-pointer.c @@ -26,6 +26,6 @@ int quz(void *a, void *fun) * * check-output-ignore * check-output-excludes: load - * check-output-pattern(4): ptrcast\..* %arg2 - * check-output-pattern(4): call\..* %arg1 + * check-output-pattern(4): ptrcast\\..* %arg2 + * check-output-pattern(4): call\\..* %arg1 */ diff --git a/validation/linear/call-direct.c b/validation/linear/call-direct.c index 52f86306..c3761cc5 100644 --- a/validation/linear/call-direct.c +++ b/validation/linear/call-direct.c @@ -13,5 +13,5 @@ int f3(void) { return (***fun)(); } // C99,C11 6.5.3.2p4 * * check-output-ignore * check-output-excludes: load - * check-output-pattern(5): call\..* fun + * check-output-pattern(5): call\\..* fun */ diff --git a/validation/linear/call-indirect.c b/validation/linear/call-indirect.c index 1275910c..40085568 100644 --- a/validation/linear/call-indirect.c +++ b/validation/linear/call-indirect.c @@ -11,5 +11,5 @@ int g3(int (*fun)(void)) { return (***fun)(); } // C99,C11 6.5.3.2p4 * * check-output-ignore * check-output-excludes: load - * check-output-pattern(5): call\..* %arg1 + * check-output-pattern(5): call\\..* %arg1 */ diff --git a/validation/linear/call-inline.c b/validation/linear/call-inline.c index a33f0a1c..dfd49b62 100644 --- a/validation/linear/call-inline.c +++ b/validation/linear/call-inline.c @@ -14,5 +14,5 @@ int i3(void) { return (***fun)(); } // C99,C11 6.5.3.2p4 * check-output-ignore * check-output-excludes: load * check-output-excludes: call - * check-output-pattern(5): ret\..* \\$42 + * check-output-pattern(5): ret\\..* \\$42 */ diff --git a/validation/linear/deref-ptr-ptr.c b/validation/linear/deref-ptr-ptr.c index 963acd36..531d3637 100644 --- a/validation/linear/deref-ptr-ptr.c +++ b/validation/linear/deref-ptr-ptr.c @@ -8,9 +8,9 @@ char *foo(char **pfmt) * check-command: test-linearize -m64 -Wno-decl $file * * check-output-excludes: load[^.] - * check-output-contains: load\. + * check-output-contains: load\\. * check-output-excludes: store[^.] - * check-output-contains: store\. + * check-output-contains: store\\. * * check-output-start foo: diff --git a/validation/linear/unexamined-base-type.c b/validation/linear/unexamined-base-type.c index 96aee3f0..142139a2 100644 --- a/validation/linear/unexamined-base-type.c +++ b/validation/linear/unexamined-base-type.c @@ -31,6 +31,6 @@ static void bar(struct s *d, struct s *s1, struct s *s2) * * check-output-ignore * check-output-excludes: load[^.] - * check-output-excludes: cast\..*(0) + * check-output-excludes: cast\\..*(0) * check-output-excludes: store[^.] */ diff --git a/validation/mem2reg/killed-insn.c b/validation/mem2reg/killed-insn.c index 641525d3..adbef980 100644 --- a/validation/mem2reg/killed-insn.c +++ b/validation/mem2reg/killed-insn.c @@ -11,5 +11,5 @@ static void foo(void) * check-command: test-linearize -fdump-ir=mem2reg $file * * check-output-ignore - * check-output-excludes: store\. + * check-output-excludes: store\\. */ diff --git a/validation/optim/call-complex-pointer.c b/validation/optim/call-complex-pointer.c index 6cfeb6ab..d1b68fb1 100644 --- a/validation/optim/call-complex-pointer.c +++ b/validation/optim/call-complex-pointer.c @@ -8,6 +8,6 @@ int foo(int p, int (*f0)(int), int (*f1)(int), int arg) * check-known-to-fail * * check-output-ignore - * check-output-excludes: ptrcast\. - * check-output-contains: select\. + * check-output-excludes: ptrcast\\. + * check-output-contains: select\\. */ diff --git a/validation/optim/canonical-add.c b/validation/optim/canonical-add.c index b7035e4c..6f32a61e 100644 --- a/validation/optim/canonical-add.c +++ b/validation/optim/canonical-add.c @@ -50,6 +50,6 @@ int xmc_sub_ymc(int x, int y) * check-known-to-fail * check-output-ignore - * check-output-excludes: \$1 - * check-output-excludes: \$-1 + * check-output-excludes: \\$1 + * check-output-excludes: \\$-1 */ diff --git a/validation/optim/canonical-cmp.c b/validation/optim/canonical-cmp.c index 6f3b5180..0fc531e9 100644 --- a/validation/optim/canonical-cmp.c +++ b/validation/optim/canonical-cmp.c @@ -21,7 +21,7 @@ uint uat(uint p, uint a) { return (123 < p) ? a : 0; } * check-name: canonical-cmp * check-command: test-linearize -Wno-decl $file * - * check-output-excludes: \$123, + * check-output-excludes: \\$123, * * check-output-start seq: diff --git a/validation/optim/canonical-fcmp.c b/validation/optim/canonical-fcmp.c index d098da64..b919a55f 100644 --- a/validation/optim/canonical-fcmp.c +++ b/validation/optim/canonical-fcmp.c @@ -20,7 +20,7 @@ int nfcmp_ge(double a) { return !(g < a); } * check-name: canonical-cmp * check-command: test-linearize -Wno-decl $file * - * check-output-excludes: \$123, + * check-output-excludes: \\$123, * * check-output-start fcmp_eq: diff --git a/validation/optim/canonical-mul.c b/validation/optim/canonical-mul.c index 90d59f2e..3ae9e3a6 100644 --- a/validation/optim/canonical-mul.c +++ b/validation/optim/canonical-mul.c @@ -18,7 +18,7 @@ uint xtc_umul_ytc(uint x, uint y) { return (x * 3) * (y * 2); } * check-known-to-fail * check-output-ignore * - * check-output-excludes: \$3 - * check-output-excludes: \$2 - * check-output-contains: \$6 + * check-output-excludes: \\$3 + * check-output-excludes: \\$2 + * check-output-contains: \\$6 */ diff --git a/validation/optim/load-converted.c b/validation/optim/load-converted.c index 7cbb53cf..91e04af4 100644 --- a/validation/optim/load-converted.c +++ b/validation/optim/load-converted.c @@ -10,5 +10,5 @@ static int foo(int *p, int i) * check-command: test-linearize -Wno-decl $file * * check-output-ignore - * check-output-excludes: add\. + * check-output-excludes: add\\. */ diff --git a/validation/optim/store-dominated.c b/validation/optim/store-dominated.c index d74db779..5780ba6b 100644 --- a/validation/optim/store-dominated.c +++ b/validation/optim/store-dominated.c @@ -11,5 +11,5 @@ static void foo(void) * check-command: test-linearize $file * * check-output-ignore - * check-output-excludes: add\. + * check-output-excludes: add\\. */ diff --git a/validation/test-suite b/validation/test-suite index e1552ed4..4fdc9e9f 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -490,10 +490,10 @@ _EOF echo " * check-known-to-fail" fi if [ $linear != 0 ]; then - echo " *" - echo " * check-output-ignore" - echo " * check-output-contains: xyz\\\\." - echo " * check-output-excludes: \\\\." + echo ' *' + echo ' * check-output-ignore' + echo ' * check-output-contains: xyz\\\\.' + echo ' * check-output-excludes: \\\\.' fi for stream in output error; do if [ -s "$file.$stream.got" ]; then |
