diff options
author | Mark Wielaard <mjw@redhat.com> | 2010-03-19 20:57:01 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2010-03-19 21:03:14 +0100 |
commit | 824dd80202a13092d4cac5faa84d67982845dd50 (patch) | |
tree | 8a71a62bde5cbb6ef7d73bbdb95639785747d845 | |
parent | fdba3aba0a17395abfe92afd1f739fc6a61c9266 (diff) | |
download | systemtap-steved-824dd80202a13092d4cac5faa84d67982845dd50.tar.gz systemtap-steved-824dd80202a13092d4cac5faa84d67982845dd50.tar.xz systemtap-steved-824dd80202a13092d4cac5faa84d67982845dd50.zip |
Add ia64 pipe result support. Relax pipe syscall test a little.
* tapset/syscalls2.stp (syscall.pipe.return): ia64 provides pipe0, pipe1
results through (user) registers.
* testsuite/systemtap.syscall/pipe.c: Only expect zero as input fildes.
-rw-r--r-- | tapset/syscalls2.stp | 18 | ||||
-rw-r--r-- | testsuite/systemtap.syscall/pipe.c | 6 |
2 files changed, 20 insertions, 4 deletions
diff --git a/tapset/syscalls2.stp b/tapset/syscalls2.stp index 93ca2c27..da6b637e 100644 --- a/tapset/syscalls2.stp +++ b/tapset/syscalls2.stp @@ -286,6 +286,16 @@ probe syscall.personality.return = kernel.function("SyS_personality").return !, name = "personality" retstr = returnstr(1) } + +# ia64 returns the results from the pipe call through (user) registers. +%( arch == "ia64" %? +function _ia64_pipe0:long() %{ + THIS->__retvalue = CONTEXT->regs ? CONTEXT->regs->r8 : 0; +%} +function _ia64_pipe1:long() %{ + THIS->__retvalue = task_pt_regs(current)->r9; +%} +%) # pipe _______________________________________________________ # # asmlinkage int @@ -324,7 +334,7 @@ probe syscall.pipe = kernel.function("SyS_pipe2").call !, fildes_uaddr = 0; pipe0 = 0; pipe1 = 0; - argstr = ""; + argstr = "[0, 0]"; } } probe syscall.pipe.return = kernel.function("SyS_pipe2").return !, @@ -352,7 +362,13 @@ probe syscall.pipe.return = kernel.function("SyS_pipe2").return !, pipe0 = 0; pipe1 = 0; } +%( arch == "ia64" %? + pipe0 = _ia64_pipe0(); + pipe1 = _ia64_pipe1(); + retstr = (pipe0 < 0) ? returnstr(1) : "0"; +%: retstr = returnstr(1) +%) } # pivot_root _________________________________________________ diff --git a/testsuite/systemtap.syscall/pipe.c b/testsuite/systemtap.syscall/pipe.c index 36e86e9f..8eea2910 100644 --- a/testsuite/systemtap.syscall/pipe.c +++ b/testsuite/systemtap.syscall/pipe.c @@ -9,11 +9,11 @@ int main() { int pipefd[2]; - pipefd[0] = 42; - pipefd[1] = 13; + pipefd[0] = 0; + pipefd[1] = 0; pipe (pipefd); - //staptest// pipe (\[42, 13\]) = 0 + //staptest// pipe (\[0, 0\]) = 0 #ifdef O_CLOEXEC pipe2 (pipefd, O_CLOEXEC); |