From 585537f7fa46be824d26b90d122472447f57cffc Mon Sep 17 00:00:00 2001
From: Garrett Cooper <yanegomi@gmail.com>
Date: Sat, 26 May 2012 07:01:43 -0700
Subject: [PATCH] Fix the fork/11-1 conformance testcase
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.7.10.1"

This is a multi-part message in MIME format.
--------------1.7.10.1
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


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 <yanegomi@gmail.com>
---
 testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


--------------1.7.10.1
Content-Type: text/x-patch; name="0001-Fix-the-fork-11-1-conformance-testcase.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Fix-the-fork-11-1-conformance-testcase.patch"

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
+}

--------------1.7.10.1--


