summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.base')
-rw-r--r--testsuite/systemtap.base/sdt.c2
-rw-r--r--testsuite/systemtap.base/sdt.exp25
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"
}
}