public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/17714] New: poll.c syscall testcase
@ 2014-12-15 11:44 mcermak at redhat dot com
  2015-01-12 16:49 ` [Bug tapsets/17714] " mcermak at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: mcermak at redhat dot com @ 2014-12-15 11:44 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=17714

            Bug ID: 17714
           Summary: poll.c syscall testcase
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com

Created attachment 8015
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8015&action=edit
proposed patch

Two issues wrt. syscall.epoll_pwait and related testcase:


1) in the syscalls.stp tapset, $events and $sigmask pointers from
syscall.epoll_pwait have wrong values on s390 31-on-64. Following update fixes
the issue for me and seems to test fine "everywhere".

=======
--- a/tapset/linux/syscalls.stp
+++ b/tapset/linux/syscalls.stp
@@ -857,14 +857,14 @@ probe syscall.epoll_pwait =
kernel.function("compat_sys_epoll_pwait").call ?,
 {
        name = "epoll_pwait"
        epfd = __int32($epfd)
-       events_uaddr = $events
+       events_uaddr = @__pointer($events)
        maxevents = __int32($maxevents)
        timeout = __int32($timeout)
-       sigmask_uaddr = $sigmask
+       sigmask_uaddr = @__pointer($sigmask)
        sigsetsize = $sigsetsize
        argstr = sprintf("%d, %p, %d, %d, %p, %d",
-                        __int32($epfd), $events, __int32($maxevents),
-                        __int32($timeout), $sigmask, $sigsetsize)
+                        __int32($epfd), events_uaddr, __int32($maxevents),
+                        __int32($timeout), sigmask_uaddr, $sigsetsize)
 }
=======



2) Second problem is that on el5 x86_64, epoll_pwait() is not available, but
SYS_epoll_pwait is defined. This is unlike other el5 arches, where
SYS_epoll_pwait is not defined. This causes link time error and skipping the
test on the platform in question. Using following wrapper works the issue
around for me and seems to test fine "everywhere":

=======
#ifdef SYS_epoll_pwait                                                          
int __epoll_pwait(int epfd, struct epoll_event *events,                         
                  int maxevents, int timeout,                                   
                  const sigset_t *set)                                          
{                                                                               
    return syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout,          
                   set, _NSIG / 8);                                             
}                                                                               
#endif
=======

Related testcases are then being updated like this:

=======
#ifdef SYS_epoll_pwait                                                          
  __epoll_pwait(fd, events, 17, 0, NULL);                                       
  //staptest// [[[[epoll_pwait (NNNN, XXXX, 17, 0, 0x0, NNNN) = 0!!!!ni_syscall
() = -38 (ENOSYS)]]]]

  __epoll_pwait(fd, events, 17, 0, &sigs);                                      
  //staptest// [[[[epoll_pwait (NNNN, XXXX, 17, 0, XXXX, NNNN) =
0!!!!ni_syscall () = -38 (ENOSYS)]]]]

... stuff deleted ...

#endif
=======

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug tapsets/17714] poll.c syscall testcase
  2014-12-15 11:44 [Bug tapsets/17714] New: poll.c syscall testcase mcermak at redhat dot com
@ 2015-01-12 16:49 ` mcermak at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: mcermak at redhat dot com @ 2015-01-12 16:49 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=17714

Martin Cermak <mcermak at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Martin Cermak <mcermak at redhat dot com> ---
Fixed in commit 7e3ccdc5978b081c71bb568013d87d654bbe4dee

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-12 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15 11:44 [Bug tapsets/17714] New: poll.c syscall testcase mcermak at redhat dot com
2015-01-12 16:49 ` [Bug tapsets/17714] " mcermak 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).