diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/buildok/eleven.stp | 17 | ||||
-rwxr-xr-x | testsuite/buildok/ten.stp | 14 | ||||
-rwxr-xr-x | testsuite/parseko/six.stp | 1 | ||||
-rwxr-xr-x | testsuite/parseok/six.stp | 12 | ||||
-rwxr-xr-x | testsuite/transok/one.stp | 20 |
5 files changed, 50 insertions, 14 deletions
diff --git a/testsuite/buildok/eleven.stp b/testsuite/buildok/eleven.stp new file mode 100755 index 00000000..66d4a318 --- /dev/null +++ b/testsuite/buildok/eleven.stp @@ -0,0 +1,17 @@ +#! stap -p4 + +probe begin +{ + a = -1 / -1; + b = 2147483647; + c = 4294967295 / a; + d = (-2147483647-1) % c; + e = 9223372036854775807 * b; + d /= b % e; + b %= 0 / f; + x = 1 / 0; +} +probe end +{ + y %= 0; +} diff --git a/testsuite/buildok/ten.stp b/testsuite/buildok/ten.stp new file mode 100755 index 00000000..6015fbb9 --- /dev/null +++ b/testsuite/buildok/ten.stp @@ -0,0 +1,14 @@ +#! stap -p4 + +probe begin +{ + a = 1+01+0x1-1-01-0x1; + + long_max = 2147483647; + ulong_max = 4294967295; + long_min = -2147483647-1; + + llong_max = 9223372036854775807; + ullong_max = 18446744073709551615; + llong_min = -9223372036854775807-1; +} diff --git a/testsuite/parseko/six.stp b/testsuite/parseko/six.stp index f37cd034..803d864c 100755 --- a/testsuite/parseko/six.stp +++ b/testsuite/parseko/six.stp @@ -5,4 +5,5 @@ probe foo { b = 0xzoopoo; c = 00011122233344455566677788; d = 07777777777777777777777777; + e = 18446744073709551616; # ULLONG_MAX+1 } diff --git a/testsuite/parseok/six.stp b/testsuite/parseok/six.stp index bc16a336..5c3d7866 100755 --- a/testsuite/parseok/six.stp +++ b/testsuite/parseok/six.stp @@ -1,8 +1,14 @@ #! stap -p1 -probe one +probe nothing { a = 1+01+0x1-1-01-0x1; - b = 2147483647; - c = -2147483647-1; + + long_max = 2147483647; + ulong_max = 4294967295; + long_min = -2147483647-1; + + llong_max = 9223372036854775807; + ullong_max = 18446744073709551615; + llong_min = -9223372036854775807-1; } diff --git a/testsuite/transok/one.stp b/testsuite/transok/one.stp index 6c624f14..7da27549 100755 --- a/testsuite/transok/one.stp +++ b/testsuite/transok/one.stp @@ -42,15 +42,13 @@ probe begin a / b a % b - # all unary operators - a ++ - a -- - -- a - -- b - ~ a - ! a - ; # grammar glitch - + a - ; # grammar glitch - - a + # all unary operators; use explicit ";" to avoid grammar ambiguities + a ++ ; + a -- ; + ++ a ; + -- b ; + ~ a ; + ! a ; + + a ; + - a ; } |