The testcase tests to see whether or not locks are successfully
inherited across forking processes, as the requirements for fork state
that they should not be. The problem is that the test tests the negative
case for ftrylockfile (!= 0) instead of the positive case, which creates
an erroneous test failure as OUTPUT goes to /dev/stdout and the test
hangs.

Signed-off-by: Garrett Cooper <[email protected]>

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
b/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
index ffff125..632b0db 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
@@ -85,7 +85,7 @@ void * threaded(void * arg)
        int ret;
        ret = ftrylockfile(stdout);

-       if (ret != 0)
+       if (ret == 0)
        {
                FAILED("The child process is owning the file lock.");
        }
@@ -168,4 +168,4 @@ int main(int argc, char * argv[])
 #endif

        PASSED;
-}
\ No newline at end of file
+}

Attachment: 0001-Fix-the-fork-11-1-conformance-testcase.patch
Description: Binary data

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to