diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-04-30 17:07:43 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-04-30 17:07:43 -0400 |
commit | 059cd9efbd82e1017406a7a290a2fb9f6bfb64f7 (patch) | |
tree | 8ab74af55066fd93c30682da09014aa81e3339ef /testsuite/systemtap.syscall/readwrite.c | |
parent | c12f7fa15eec148307fa94f886b0673c1d0dd789 (diff) | |
download | systemtap-steved-059cd9efbd82e1017406a7a290a2fb9f6bfb64f7.tar.gz systemtap-steved-059cd9efbd82e1017406a7a290a2fb9f6bfb64f7.tar.xz systemtap-steved-059cd9efbd82e1017406a7a290a2fb9f6bfb64f7.zip |
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.
Diffstat (limited to 'testsuite/systemtap.syscall/readwrite.c')
-rw-r--r-- | testsuite/systemtap.syscall/readwrite.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/testsuite/systemtap.syscall/readwrite.c b/testsuite/systemtap.syscall/readwrite.c index aacd68f2..bd0914cc 100644 --- a/testsuite/systemtap.syscall/readwrite.c +++ b/testsuite/systemtap.syscall/readwrite.c @@ -26,56 +26,56 @@ int main() v[2].iov_len = sizeof(STRING3); fd = open("foobar1",O_WRONLY|O_CREAT, 0666); - // open ("foobar1", O_WRONLY|O_CREAT, 0666) = NNNN + //staptest// open ("foobar1", O_WRONLY|O_CREAT, 0666) = NNNN write(fd,"Hello world", 11); - // write (NNNN, "Hello world", 11) = 11 + //staptest// write (NNNN, "Hello world", 11) = 11 write(fd,"Hello world abcdefghijklmnopqrstuvwxyz 01234567890123456789", 59); - // write (NNNN, "Hello world abcdefghijklmnopqrstuvwxyz 012345"..., 59) = 59 + //staptest// write (NNNN, "Hello world abcdefghijklmnopqrstuvwxyz 012345"..., 59) = 59 pwrite(fd,"Hello Again",11,12); - // pwrite (NNNN, "Hello Again", 11, 12) = 11 + //staptest// pwrite (NNNN, "Hello Again", 11, 12) = 11 writev(fd, v, 3); - // writev (NNNN, XXXX, 3) = 15 + //staptest// writev (NNNN, XXXX, 3) = 15 lseek(fd, 0, SEEK_SET); - // lseek (NNNN, 0, SEEK_SET) = 0 + //staptest// lseek (NNNN, 0, SEEK_SET) = 0 lseek(fd, 1, SEEK_CUR); - // lseek (NNNN, 1, SEEK_CUR) = 1 + //staptest// lseek (NNNN, 1, SEEK_CUR) = 1 lseek(fd, -1, SEEK_END); - // lseek (NNNN, -1, SEEK_END) = 84 + //staptest// lseek (NNNN, -1, SEEK_END) = 84 #ifdef SYS__llseek syscall(SYS__llseek, fd, 1, 0, &res, SEEK_SET); - // llseek (NNNN, 0x1, 0x0, XXXX, SEEK_SET) = 0 + //staptest// llseek (NNNN, 0x1, 0x0, XXXX, SEEK_SET) = 0 syscall(SYS__llseek, fd, 0, 0, &res, SEEK_SET); - // llseek (NNNN, 0x0, 0x0, XXXX, SEEK_SET) = 0 + //staptest// llseek (NNNN, 0x0, 0x0, XXXX, SEEK_SET) = 0 syscall(SYS__llseek, fd, 0, 12, &res, SEEK_CUR); - // llseek (NNNN, 0x0, 0xc, XXXX, SEEK_CUR) = 0 + //staptest// llseek (NNNN, 0x0, 0xc, XXXX, SEEK_CUR) = 0 syscall(SYS__llseek, fd, 8, 1, &res, SEEK_END); - // llseek (NNNN, 0x8, 0x1, XXXX, SEEK_END) = 0 + //staptest// llseek (NNNN, 0x8, 0x1, XXXX, SEEK_END) = 0 #endif close (fd); fd = open("foobar1",O_RDONLY); - // open ("foobar1", O_RDONLY) = NNNN + //staptest// open ("foobar1", O_RDONLY) = NNNN read(fd, buf, 11); - // read (NNNN, XXXX, 11) = 11 + //staptest// read (NNNN, XXXX, 11) = 11 read(fd, buf, 50); - // read (NNNN, XXXX, 50) = 50 + //staptest// read (NNNN, XXXX, 50) = 50 pread(fd, buf, 11, 10); - // pread (NNNN, XXXX, 11, 10) = 11 + //staptest// pread (NNNN, XXXX, 11, 10) = 11 x[0].iov_base = buf1; x[0].iov_len = sizeof(STRING1); @@ -84,7 +84,7 @@ int main() x[2].iov_base = buf3; x[2].iov_len = sizeof(STRING3); readv(fd, x, 3); - // readv (NNNN, XXXX, 3) = 15 + //staptest// readv (NNNN, XXXX, 3) = 15 close (fd); |