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/mmap.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/mmap.c')
-rw-r--r-- | testsuite/systemtap.syscall/mmap.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/testsuite/systemtap.syscall/mmap.c b/testsuite/systemtap.syscall/mmap.c index a3a0dc34..13145fb2 100644 --- a/testsuite/systemtap.syscall/mmap.c +++ b/testsuite/systemtap.syscall/mmap.c @@ -13,41 +13,41 @@ int main() /* create a file with something in it */ fd = open("foobar",O_WRONLY|O_CREAT|O_TRUNC, 0600); - // open ("foobar", O_WRONLY|O_CREAT|O_TRUNC, 0600) = NNNN + //staptest// open ("foobar", O_WRONLY|O_CREAT|O_TRUNC, 0600) = NNNN lseek(fd, 1024, SEEK_SET); write(fd, "abcdef", 6); close(fd); - // close (NNNN) = 0 + //staptest// close (NNNN) = 0 fd = open("foobar", O_RDONLY); - // open ("foobar", O_RDONLY) = NNNN + //staptest// open ("foobar", O_RDONLY) = NNNN /* stat for file size */ ret = fstat(fd, &fs); - // fstat (NNNN, XXXX) = 0 + //staptest// fstat (NNNN, XXXX) = 0 r = mmap(NULL, fs.st_size, PROT_READ, MAP_SHARED, fd, 0); - // mmap[2]* (XXXX, 1030, PROT_READ, MAP_SHARED, NNNN, XXXX) = XXXX + //staptest// mmap[2]* (XXXX, 1030, PROT_READ, MAP_SHARED, NNNN, XXXX) = XXXX close(fd); mlock(r, fs.st_size); - // mlock (XXXX, 1030) = 0 + //staptest// mlock (XXXX, 1030) = 0 msync(r, fs.st_size, MS_SYNC); - // msync (XXXX, 1030, MS_SYNC) = 0 + //staptest// msync (XXXX, 1030, MS_SYNC) = 0 munlock(r, fs.st_size); - // munlock (XXXX, 1030) = 0 + //staptest// munlock (XXXX, 1030) = 0 mlockall(MCL_CURRENT); - // mlockall (MCL_CURRENT) = + //staptest// mlockall (MCL_CURRENT) = munlockall(); - // munlockall () = 0 + //staptest// munlockall () = 0 munmap(r, fs.st_size); - // munmap (XXXX, 1030) = 0 + //staptest// munmap (XXXX, 1030) = 0 return 0; } |