diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/buildok/thirtyone.stp | 4 | ||||
-rwxr-xr-x | testsuite/configure | 20 | ||||
-rw-r--r-- | testsuite/configure.ac | 2 | ||||
-rw-r--r-- | testsuite/systemtap.base/badkprobe.exp | 32 | ||||
-rw-r--r-- | testsuite/systemtap.printf/char1.exp | 2 | ||||
-rw-r--r-- | testsuite/systemtap.printf/char1.stp | 1 | ||||
-rw-r--r-- | testsuite/systemtap.printf/memory1.stp | 14 |
7 files changed, 54 insertions, 21 deletions
diff --git a/testsuite/buildok/thirtyone.stp b/testsuite/buildok/thirtyone.stp new file mode 100755 index 00000000..8a97d84f --- /dev/null +++ b/testsuite/buildok/thirtyone.stp @@ -0,0 +1,4 @@ +#! stap -p4 + +probe kprobe.function("sys_open") {} +probe kernel.function("sys_close") {} diff --git a/testsuite/configure b/testsuite/configure index 828f8006..cc73571a 100755 --- a/testsuite/configure +++ b/testsuite/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for systemtap 0.9.5. +# Generated by GNU Autoconf 2.61 for systemtap 0.9.7. # # Report bugs to <systemtap@sources.redhat.com>. # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='systemtap' PACKAGE_TARNAME='systemtap' -PACKAGE_VERSION='0.9.5' -PACKAGE_STRING='systemtap 0.9.5' +PACKAGE_VERSION='0.9.7' +PACKAGE_STRING='systemtap 0.9.7' PACKAGE_BUGREPORT='systemtap@sources.redhat.com' ac_subst_vars='SHELL @@ -1149,7 +1149,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures systemtap 0.9.5 to adapt to many kinds of systems. +\`configure' configures systemtap 0.9.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1215,7 +1215,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of systemtap 0.9.5:";; + short | recursive ) echo "Configuration of systemtap 0.9.7:";; esac cat <<\_ACEOF @@ -1291,7 +1291,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -systemtap configure 0.9.5 +systemtap configure 0.9.7 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1305,7 +1305,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by systemtap $as_me 0.9.5, which was +It was created by systemtap $as_me 0.9.7, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1997,7 +1997,7 @@ fi # Define the identity of the package. PACKAGE='systemtap' - VERSION='0.9.5' + VERSION='0.9.7' cat >>confdefs.h <<_ACEOF @@ -2617,7 +2617,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by systemtap $as_me 0.9.5, which was +This file was extended by systemtap $as_me 0.9.7, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2660,7 +2660,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -systemtap config.status 0.9.5 +systemtap config.status 0.9.7 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/testsuite/configure.ac b/testsuite/configure.ac index 03ce3f61..1a82fe36 100644 --- a/testsuite/configure.ac +++ b/testsuite/configure.ac @@ -1,7 +1,7 @@ dnl configure.ac --- autoconf input file for systemtap testsuite dnl Process this file with autoconf to produce a configure script. -AC_INIT([systemtap], 0.9.5, systemtap@sources.redhat.com, systemtap) +AC_INIT([systemtap], 0.9.7, systemtap@sources.redhat.com, systemtap) AC_PREREQ(2.59) AC_CONFIG_AUX_DIR(..) diff --git a/testsuite/systemtap.base/badkprobe.exp b/testsuite/systemtap.base/badkprobe.exp index efc06695..c0815fbe 100644 --- a/testsuite/systemtap.base/badkprobe.exp +++ b/testsuite/systemtap.base/badkprobe.exp @@ -1,14 +1,28 @@ -set script "probe kernel.statement(-1).absolute {} probe timer.s(1) { exit() }" set test "bad kprobe registration" +set script { + probe $1 {} + probe timer.s(1) { exit() } + probe end { println("cleanup ok") } +} if {! [installtest_p]} { untested $test; return } -spawn stap -g -w -e "$script" -expect { - -timeout 60 - -re "^WARNING: probe .*registration error.*" { pass $test } - eof { fail "$test (eof)" } - timeout { fail "$test (timeout)" } +set bad_kprobes { + kernel.statement(-1).absolute + kprobe.statement(-1).absolute + kprobe.function("no_such_function") + kprobe.function("no_such_function").return +} + +foreach bk $bad_kprobes { + set test "bad kprobe registration: $bk" + spawn stap -g -w -e "$script" "$bk" + expect { + -timeout 60 + -re "^WARNING: probe .*registration error.*\r\ncleanup ok" { pass $test } + eof { fail "$test (eof)" } + timeout { fail "$test (timeout)" } + } + catch {close} + catch {wait} } -catch {close} -catch {wait} diff --git a/testsuite/systemtap.printf/char1.exp b/testsuite/systemtap.printf/char1.exp index 35aa479f..f9343c0e 100644 --- a/testsuite/systemtap.printf/char1.exp +++ b/testsuite/systemtap.printf/char1.exp @@ -1,3 +1,3 @@ set test "char1" -set ::result_string {stap} +set ::result_string {stapok} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/char1.stp b/testsuite/systemtap.printf/char1.stp index 207d1bc5..564c416b 100644 --- a/testsuite/systemtap.printf/char1.stp +++ b/testsuite/systemtap.printf/char1.stp @@ -3,6 +3,7 @@ probe begin printf("%c", 115) printf("%c", 116) printf("%c%c", 97, 112) + printf("%c%c", stringat("ok", 0), stringat("ok", 1)) print("\n") exit() } diff --git a/testsuite/systemtap.printf/memory1.stp b/testsuite/systemtap.printf/memory1.stp index f9cbf60b..15aa565b 100644 --- a/testsuite/systemtap.printf/memory1.stp +++ b/testsuite/systemtap.printf/memory1.stp @@ -113,6 +113,20 @@ probe syscall.open { success = 0; } + expected_16_actual = sprintf (" %02x%02x%02x%02x%02x%02x", + stringat(filename, 0), + stringat(filename, 1), + stringat(filename, 2), + stringat(filename, 3), + stringat(filename, 4), + stringat(filename, 5)); + testName = "%M dynamic width larger than dynamic precision"; + result = sprintf ("%*.*M", 14, 6, $filename); + if (result != expected_16_actual) { + printf ("Test %s failed\n", testName); + success = 0; + } + if (success) print ("Test passed\n"); |