From 059cd9efbd82e1017406a7a290a2fb9f6bfb64f7 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 30 Apr 2009 17:07:43 -0400 Subject: syscalls testsuite: use different escape sequence The syscall testsuite uses embedded "// TEXT" markers in the .c files to designate expected output, kind of like the "dg-" bunch in the gcc test suite. Unfortunately, "//" is not a unique prefix to systemtap tests, and in particular it can occur in the system headers that will be picked up with the "gcc -E -C ..." invocation in test.tcl. So let's switch to "//staptest//". test.tcl is also modified to escape a few more mischevious regexp metacharacters that might sneak past. --- testsuite/systemtap.syscall/chmod.c | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'testsuite/systemtap.syscall/chmod.c') diff --git a/testsuite/systemtap.syscall/chmod.c b/testsuite/systemtap.syscall/chmod.c index 9b0c58e1..724b86c4 100644 --- a/testsuite/systemtap.syscall/chmod.c +++ b/testsuite/systemtap.syscall/chmod.c @@ -11,70 +11,70 @@ int main() int fd; fd = open("foobar",O_WRONLY|O_CREAT, 0666); - // open ("foobar", O_WRONLY|O_CREAT, 0666) = NNNN + //staptest// open ("foobar", O_WRONLY|O_CREAT, 0666) = NNNN chmod("foobar", 0644); - // chmod ("foobar", 0644) - // fchmodat (AT_FDCWD, "foobar", 0644) = 0 + //staptest// chmod ("foobar", 0644) + //staptest// fchmodat (AT_FDCWD, "foobar", 0644) = 0 fchmod(fd, 0444); - // fchmod (NNNN, 0444) = 0 + //staptest// fchmod (NNNN, 0444) = 0 chown("foobar", 5000, -1); #ifdef __i386__ - // chown ("foobar", 5000, -1) = + //staptest// chown ("foobar", 5000, -1) = #else - // chown ("foobar", 5000, NNNN) = + //staptest// chown ("foobar", 5000, NNNN) = #endif chown("foobar", -1, 5001); #ifdef __i386__ - // chown ("foobar", -1, 5001) = + //staptest// chown ("foobar", -1, 5001) = #else - // chown ("foobar", NNNN, 5001) = + //staptest// chown ("foobar", NNNN, 5001) = #endif fchown(fd, 5002, -1); #ifdef __i386__ - // fchown (NNNN, 5002, -1) = + //staptest// fchown (NNNN, 5002, -1) = #else - // fchown (NNNN, 5002, NNNN) = + //staptest// fchown (NNNN, 5002, NNNN) = #endif fchown(fd, -1, 5003); #ifdef __i386__ - // fchown (NNNN, -1, 5003) = + //staptest// fchown (NNNN, -1, 5003) = #else - // fchown (NNNN, NNNN, 5003) = + //staptest// fchown (NNNN, NNNN, 5003) = #endif lchown("foobar", 5004, -1); #ifdef __i386__ - // lchown ("foobar", 5004, -1) = + //staptest// lchown ("foobar", 5004, -1) = #else - // lchown ("foobar", 5004, NNNN) = + //staptest// lchown ("foobar", 5004, NNNN) = #endif lchown("foobar", -1, 5005); #ifdef __i386__ - // lchown ("foobar", -1, 5005) = + //staptest// lchown ("foobar", -1, 5005) = #else - // lchown ("foobar", NNNN, 5005) = + //staptest// lchown ("foobar", NNNN, 5005) = #endif #ifdef __i386__ syscall(SYS_chown, "foobar", 5000, -1); - // chown16 ("foobar", 5000, -1) = + //staptest// chown16 ("foobar", 5000, -1) = syscall(SYS_chown, "foobar", -1, 5001); - // chown16 ("foobar", -1, 5001) = + //staptest// chown16 ("foobar", -1, 5001) = syscall(SYS_fchown, fd, 5002, -1); - // fchown16 (NNNN, 5002, -1) = + //staptest// fchown16 (NNNN, 5002, -1) = syscall(SYS_fchown, fd, -1, 5003); - // fchown16 (NNNN, -1, 5003) = + //staptest// fchown16 (NNNN, -1, 5003) = syscall(SYS_lchown, "foobar", 5004, -1); - // lchown16 ("foobar", 5004, -1) = + //staptest// lchown16 ("foobar", 5004, -1) = syscall(SYS_lchown, "foobar", -1, 5005); - // lchown16 ("foobar", -1, 5005) = + //staptest// lchown16 ("foobar", -1, 5005) = #endif close(fd); -- cgit