summaryrefslogtreecommitdiffstats
path: root/testsuite/semok
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semok')
-rwxr-xr-xtestsuite/semok/args.stp2
-rwxr-xr-xtestsuite/semok/eleven.stp10
-rwxr-xr-xtestsuite/semok/seven.stp5
3 files changed, 7 insertions, 10 deletions
diff --git a/testsuite/semok/args.stp b/testsuite/semok/args.stp
index 00475625..98112088 100755
--- a/testsuite/semok/args.stp
+++ b/testsuite/semok/args.stp
@@ -1,3 +1,3 @@
#! /bin/sh
-./stap -p2 -e 'probe begin { log (@1 . string($2)) }' hello 0xdeadbeef
+./stap -p2 -e 'probe begin { log (@1 . sprint($2)) }' hello 0xdeadbeef
diff --git a/testsuite/semok/eleven.stp b/testsuite/semok/eleven.stp
index e5e3c01c..93550bd5 100755
--- a/testsuite/semok/eleven.stp
+++ b/testsuite/semok/eleven.stp
@@ -3,8 +3,6 @@
global entry_time, my_count, my_fd, read_times
# future built-ins
-function string (v) { return "" }
-function hexstring (v) { return "" }
function trace (s) { return 0 }
global tid
@@ -16,8 +14,8 @@ probe begin /* kernel.function("read") */ {
entry_time[tid] = timestamp # "macro" variable
my_count[tid] = count # function argument
my_fd[tid] = fd # function argument
- trace ("my_count = " . string(my_count[tid]) .
- "my_fd = " . string(my_fd[tid]))
+ trace ("my_count = " . sprint(my_count[tid]) .
+ "my_fd = " . sprint(my_fd[tid]))
}
probe end /* kernel.function("read").return */ {
@@ -30,13 +28,13 @@ probe end /* kernel.function("read").return */ {
}
trace ("syscall " . (syscall_name) .
" return value = " .
- hexstring (retvalue)) # function pseudo-argument
+ sprintf ("0x%x", retvalue)) # function pseudo-argument
}
probe end {
foreach (syscall in read_times) {
trace ("syscall " . syscall .
- " total-time=" . string (read_times[syscall]))
+ " total-time=" . sprint (read_times[syscall]))
}
}
diff --git a/testsuite/semok/seven.stp b/testsuite/semok/seven.stp
index f0b248bd..2ceed4e8 100755
--- a/testsuite/semok/seven.stp
+++ b/testsuite/semok/seven.stp
@@ -2,7 +2,6 @@
global ar1, ar2
-function string:string (v:long) { } # to become a built-in
function printk (s:string) { return 0 } # to become a built-in
function search (key)
@@ -18,7 +17,7 @@ probe begin /* syscall("zamboni") */
tgid=0
pid=0
tid=0
- ar2[tid] = string (tgid);
+ ar2[tid] = sprint (tgid);
search (pid)
}
@@ -26,5 +25,5 @@ probe end
{
# for (key in ar2)
if (key in ar2)
- printk ("this: " . string (key) . " was " . ar2[key])
+ printk ("this: " . sprint (key) . " was " . ar2[key])
}