* [Bug testsuite/4088] New: syscall.mmap test is using create() but tests for open()
@ 2007-02-21 23:55 dwilder at us dot ibm dot com
2007-04-19 11:35 ` [Bug testsuite/4088] " srikar at linux dot vnet dot ibm dot com
2007-04-23 18:54 ` hunt at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: dwilder at us dot ibm dot com @ 2007-02-21 23:55 UTC (permalink / raw)
To: systemtap
The mmap test in testsuite/systemtap.syscall is using creat() but is testing for
the open() syscall.
From mmap.c
.
.
/* create a file with something in it */
fd = creat("foobar",S_IREAD|S_IWRITE);
// open ("foobar", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 4
.
.
This works on i386 I think because glibc just calls open(). On s390 this is
not the case, sys_creat is really called.
The compiler has optimized sys_creat so that sys_open() has been inlined. So
you never see the call to sys_open.
Running the test: test.tcl mmap produces:
<...>
mmap: mprotect (0x0000020000187000, 12288, PROT_READ) = 0
mmap: mprotect (0x000002000001d000, 4096, PROT_READ) = 0
mmap: munmap (0x0000020000020000, 63065) = 0
mmap: creat ("foobar", O_RDONLY, 0600) = 4 <<< not what is expected
mmap: lseek (4, 1024, SEEK_SET) = 1024
mmap: write (4, "abcdef", 6) = 6
mmap: close (4) = 0
<....>
Can the test be changed to just use open() not creat(). This way it should run
on all platforms.
--
Summary: syscall.mmap test is using create() but tests for open()
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: testsuite
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: dwilder at us dot ibm dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4088
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-23 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-21 23:55 [Bug testsuite/4088] New: syscall.mmap test is using create() but tests for open() dwilder at us dot ibm dot com
2007-04-19 11:35 ` [Bug testsuite/4088] " srikar at linux dot vnet dot ibm dot com
2007-04-23 18:54 ` hunt at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).