diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-03-11 22:11:09 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-03-11 22:11:09 -0400 |
commit | ec80b3969d33e4d54e97ead4286bdb018e2f1f97 (patch) | |
tree | 88c3403a2ec79e106c3d618d03b1b589990acd1d /testsuite | |
parent | 3bd0d4df7ccfd9afe7771441b26d8baaaf180e29 (diff) | |
download | systemtap-steved-ec80b3969d33e4d54e97ead4286bdb018e2f1f97.tar.gz systemtap-steved-ec80b3969d33e4d54e97ead4286bdb018e2f1f97.tar.xz systemtap-steved-ec80b3969d33e4d54e97ead4286bdb018e2f1f97.zip |
improve sdt.h compatibility and test suite
Replaced cpp VA_ARGS in sdt.h with explicit enumeration of arguments
(since with -pedantic, cpp has no varargs), and added a few more
cflags variants to the sdt.exp test case.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/systemtap.base/sdt.c | 2 | ||||
-rw-r--r-- | testsuite/systemtap.base/sdt.exp | 25 |
2 files changed, 16 insertions, 11 deletions
diff --git a/testsuite/systemtap.base/sdt.c b/testsuite/systemtap.base/sdt.c index 46f68664..7c7398e5 100644 --- a/testsuite/systemtap.base/sdt.c +++ b/testsuite/systemtap.base/sdt.c @@ -65,5 +65,7 @@ main (int argc, char **argv) call8(a, b, c, d, e, f, g, h); call9(a, b, c, d, e, f, g, h, i); call10(a, b, c, d, e, f, g, h, i, j); + (void) argv; + (void) argc; return 0; } diff --git a/testsuite/systemtap.base/sdt.exp b/testsuite/systemtap.base/sdt.exp index 09aaaf8d..74818beb 100644 --- a/testsuite/systemtap.base/sdt.exp +++ b/testsuite/systemtap.base/sdt.exp @@ -10,31 +10,33 @@ set ::result_string {1 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10} -set extra_flags {{""} {additional_flags=-ansi}} +set extra_flags {{""} {additional_flags=-std=gnu89} {additional_flags=-ansi} {additional_flags=-pedantic}} # Iterate extra_flags, trying each with C and C++ for {set i 0} {$i < [llength $extra_flags]} {incr i} { +set extra_flag [lindex $extra_flags $i] + # C set test_flags "additional_flags=-g" set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys" -set test_flags "$test_flags additional_flags=-std=gnu89" set test_flags "$test_flags additional_flags=-Wall" -set test_flags "$test_flags additional_flags=-Wdeclaration-after-statement" +set test_flags "$test_flags additional_flags=-Wextra" set test_flags "$test_flags additional_flags=-Werror" -set res [target_compile $srcdir/$subdir/$test.c $test.prog executable [concat $test_flags " " [lindex $extra_flags $i]]] +set res [target_compile $srcdir/$subdir/$test.c $test.prog executable "$test_flags $extra_flag"] if { $res != "" } { verbose "target_compile failed: $res" 2 - fail "compiling $test.c" + fail "compiling $test.c $extra_flag" return } else { - pass "compiling $test.c" + pass "compiling $test.c $extra_flag" } if {[installtest_p]} { +# XXX: we need distinct test names for these stap_run2 $srcdir/$subdir/$test.stp -c ./$test.prog } else { - untested "$test" + untested "$test $extra_flag" } # C++ @@ -44,19 +46,20 @@ set test_flags "$test_flags additional_flags=-Wall" set test_flags "$test_flags additional_flags=-Werror" set test_flags "$test_flags additional_flags=-x additional_flags=c++" -set res [target_compile $srcdir/$subdir/$test.c $test.prog executable [concat $test_flags [lindex $extra_flags $i]]] +set res [target_compile $srcdir/$subdir/$test.c $test.prog executable "$test_flags $extra_flag"] if { $res != "" } { verbose "target_compile failed: $res" 2 - fail "compiling $test.c" + fail "compiling $test.c c++ $extra_flag" return } else { - pass "compiling $test.c" + pass "compiling $test.c c++ $extra_flag" } if {[installtest_p]} { +# XXX: we need distinct test names for these stap_run2 $srcdir/$subdir/$test.stp -c ./$test.prog } else { - untested "$test" + untested "$test c++ $extra_flag" } } |