summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/lib/stap_run2.exp2
-rw-r--r--testsuite/systemtap.base/sdt.exp14
-rw-r--r--testsuite/systemtap.base/sdt.stp20
3 files changed, 20 insertions, 16 deletions
diff --git a/testsuite/lib/stap_run2.exp b/testsuite/lib/stap_run2.exp
index b734a1e7..d1f02c83 100644
--- a/testsuite/lib/stap_run2.exp
+++ b/testsuite/lib/stap_run2.exp
@@ -29,7 +29,7 @@ proc stap_run2 { TEST_NAME args } {
proc stap_run3 { TEST_NAME TEST_FILE args } {
if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return }
- set cmd [concat stap $args $TEST_FILE]
+ set cmd [concat stap $TEST_FILE $args]
send_log "executing: $cmd\n"
catch {eval exec $cmd} res
diff --git a/testsuite/systemtap.base/sdt.exp b/testsuite/systemtap.base/sdt.exp
index a398d795..46fa5a28 100644
--- a/testsuite/systemtap.base/sdt.exp
+++ b/testsuite/systemtap.base/sdt.exp
@@ -15,6 +15,7 @@ set extra_flags {{""} {additional_flags=-std=gnu89} {additional_flags=-ansi} {ad
# 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]
+set testprog "sdt.c.exe.$i"
# C
set test_flags "additional_flags=-g"
@@ -23,7 +24,9 @@ set test_flags "$test_flags additional_flags=-Wall"
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 "$test_flags $extra_flag"]
+set saveidx 0
+
+set res [target_compile $srcdir/$subdir/$test.c $testprog executable "$test_flags $extra_flag"]
if { $res != "" } {
verbose "target_compile failed: $res" 2
fail "compiling $test.c $extra_flag"
@@ -34,19 +37,21 @@ if { $res != "" } {
}
if {[installtest_p]} {
- stap_run3 "$test $extra_flag" $srcdir/$subdir/$test.stp -c ./$test.prog
+ stap_run3 "$test $extra_flag" $srcdir/$subdir/$test.stp $testprog -c ./$testprog
} else {
untested "$test $extra_flag"
}
# C++
+set testprog "sdt.cxx.exe.$i"
+
set test_flags "additional_flags=-g"
set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys"
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 "$test_flags $extra_flag"]
+set res [target_compile $srcdir/$subdir/$test.c $testprog executable "$test_flags $extra_flag"]
if { $res != "" } {
verbose "target_compile failed: $res" 2
fail "compiling $test.c c++ $extra_flag"
@@ -57,10 +62,9 @@ if { $res != "" } {
}
if {[installtest_p]} {
- stap_run3 "$test c++ $extra_flag" $srcdir/$subdir/$test.stp -c ./$test.prog
+ stap_run3 "$test c++ $extra_flag" $srcdir/$subdir/$test.stp $testprog -c ./$testprog
} else {
untested "$test c++ $extra_flag"
}
}
-catch {exec rm -f $test.prog}
diff --git a/testsuite/systemtap.base/sdt.stp b/testsuite/systemtap.base/sdt.stp
index 1f075bca..5df1fdc9 100644
--- a/testsuite/systemtap.base/sdt.stp
+++ b/testsuite/systemtap.base/sdt.stp
@@ -1,49 +1,49 @@
-probe process("sdt.prog").mark("mark_a")
+probe process(@1).mark("mark_a")
{
printf("%d\n", $arg1);
}
-probe process("sdt.prog").mark("mark_b")
+probe process(@1).mark("mark_b")
{
printf("%d %d\n", $arg1, $arg2);
}
-probe process("sdt.prog").mark("mark_c")
+probe process(@1).mark("mark_c")
{
printf("%d %d %d\n", $arg1, $arg2, $arg3);
}
-probe process("sdt.prog").mark("mark_d")
+probe process(@1).mark("mark_d")
{
printf("%d %d %d %d\n", $arg1, $arg2, $arg3, $arg4);
}
-probe process("sdt.prog").mark("mark_e")
+probe process(@1).mark("mark_e")
{
printf("%d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5);
}
-probe process("sdt.prog").mark("mark_f")
+probe process(@1).mark("mark_f")
{
printf("%d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
}
-probe process("sdt.prog").mark("mark_g")
+probe process(@1).mark("mark_g")
{
printf("%d %d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7);
}
-probe process("sdt.prog").mark("mark_h")
+probe process(@1).mark("mark_h")
{
printf("%d %d %d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8);
}
-probe process("sdt.prog").mark("mark_i")
+probe process(@1).mark("mark_i")
{
printf("%d %d %d %d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8, $arg9);
}
-probe process("sdt.prog").mark("mark_j")
+probe process(@1).mark("mark_j")
{
printf("%d %d %d %d %d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8, $arg9, $arg10);
}