Menu

#44 Clone Test Failure

System Calls
closed-rejected
nobody
Testcases (113)
5
2004-05-12
2004-05-12
sonyajo
No

1. Install the latest version of ltp
2. Execute the clone02 test in the following
directory:
<ltp_dir>/testcases/kernel/syscall/clone02

This test failed when I compiled it as 32 and 64-bit.

Actual Result:
clone02 0 WARN : Child got SIGUSR2 signal
clone02 1 FAIL : Test Failed
clone02 2 PASS : Test Passed

Expected Results:
The testcase should not fail.

Explanation of the problem, from bugzilla bug:
What happens is that parent & child install a signal
handler, child send a signal to the parent, and the signal
handler _thinks_ it got it from the child. In fact, the
problem is that the test case is using getpid() to first fill
out child_pid, and later on to do the comparison inside
the handler.

With NPTL, the thread library is now POSIX compliant.
getpid() will return the same value for all threads and
the way we used clone is considered as beeing a
thread ;) You want to use gettid() instead.

Discussion

  • Robert Williamson

    • status: open --> closed
     
  • Robert Williamson

    Logged In: YES
    user_id=236704

    Already fixed in CVS tree.

     
  • Robert Williamson

    • status: closed --> closed-rejected
     

Log in to post a comment.