* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
@ 2009-06-30 7:05 naresh kamboju
2009-07-21 4:45 ` Brandon Philips
0 siblings, 1 reply; 9+ messages in thread
From: naresh kamboju @ 2009-06-30 7:05 UTC (permalink / raw)
To: Brandon Philips; +Cc: ltp-list, maxin john
Hi Brandon Philips,
I have noticed some issue with your patch dated on 12-Dec-2008.
I want conform the problem and root cause.
Could you send me your open posix full Results logs of before and
after your patch with ARCH and Kernel versions?
It would be great help.
Thanks.
Best regards
Naresh Kamboju
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
2009-06-30 7:05 [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test naresh kamboju
@ 2009-07-21 4:45 ` Brandon Philips
2009-07-21 13:22 ` naresh kamboju
0 siblings, 1 reply; 9+ messages in thread
From: Brandon Philips @ 2009-07-21 4:45 UTC (permalink / raw)
To: naresh kamboju; +Cc: ltp-list, maxin john
On 12:35 Tue 30 Jun 2009, naresh kamboju wrote:
> I have noticed some issue with your patch dated on 12-Dec-2008.
> I want conform the problem and root cause.
What is the problem?
> Could you send me your open posix full Results logs of before and
> after your patch with ARCH and Kernel versions?
I never ran the full test suite. To be honest I could never figure out
how to get it running. Are there instructions somewhere?
My fix was triggered by a bug report I got that thought it found a
Kernel regression based on this test and it looked to me like it was
caused by that bug.
Cheers,
Brandon
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
2009-07-21 4:45 ` Brandon Philips
@ 2009-07-21 13:22 ` naresh kamboju
2009-08-07 7:59 ` naresh kamboju
0 siblings, 1 reply; 9+ messages in thread
From: naresh kamboju @ 2009-07-21 13:22 UTC (permalink / raw)
To: Brandon Philips; +Cc: ltp-list, maxin john
On Tue, Jul 21, 2009 at 10:15 AM, Brandon Philips<bphilips@suse.de> wrote:
> On 12:35 Tue 30 Jun 2009, naresh kamboju wrote:
>> I have noticed some issue with your patch dated on 12-Dec-2008.
>> I want conform the problem and root cause.
>
> What is the problem?
After applying you’re Patch to
Include/posixtest.h
http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg04867.html
Most of the mq_ and other test cases are failed at Build and linking.
It was almost of the test cases total test case are 1888.
After that I have removed your patch and executed test suite it is working fine.
I think you have to revisit your patch and get the difference at your end.
>
>> Could you send me your open posix full Results logs of before and
>> after your patch with ARCH and Kernel versions?
>
> I never ran the full test suite. To be honest I could never figure out
> how to get it running. Are there instructions somewhere?
>
> My fix was triggered by a bug report I got that thought it found a
> Kernel regression based on this test and it looked to me like it was
> caused by that bug.
Yes.
There are Docs to do that.
#Remove your patch dated Dec 12 2008
http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg04867.html
# vim LDFLAGS
Uncomment following line.
#Recommended flags:
-D_XOPEN_SOURCE=600 -lpthread -lrt -lm
FULL Execution:
Simple command is “make”
#pwd
ltp-full-20090630/testcases/open_posix_testsuite
#make
Single DIR Execution:
You can build only one directory of test cases
# export POSIX_TARGET=conformance/interfaces/mq_send/
#make
Please read the followind Documents
1. BUILD
- describes how to set up your developer machine to build and test
2. LDFLAGS
- File that Makefile uses to link to what you specify
3. QUICK-START
- Quick doc to help you around POSIX** Test Suite.
Please share the full results log of your test.
Best regards,
Naresh Kamboju
>
> Cheers,
>
> Brandon
>
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
2009-07-21 13:22 ` naresh kamboju
@ 2009-08-07 7:59 ` naresh kamboju
2009-08-07 12:42 ` Subrata Modak
2009-08-07 21:53 ` Brandon Philips
0 siblings, 2 replies; 9+ messages in thread
From: naresh kamboju @ 2009-08-07 7:59 UTC (permalink / raw)
To: Brandon Philips; +Cc: ltp-list, maxin john
[-- Attachment #1: Type: text/plain, Size: 12643 bytes --]
Hi Brandon Philips,
On Tue, Jul 21, 2009 at 6:52 PM, naresh kamboju<naresh.kernel@gmail.com> wrote:
> On Tue, Jul 21, 2009 at 10:15 AM, Brandon Philips<bphilips@suse.de> wrote:
>> On 12:35 Tue 30 Jun 2009, naresh kamboju wrote:
>>> I have noticed some issue with your patch dated on 12-Dec-2008.
>>> I want conform the problem and root cause.
>>
>> What is the problem?
>
> After applying you’re Patch to
> Include/posixtest.h
> http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg04867.html
>
> Most of the mq_ and other test cases are failed at Build and linking.
> It was almost of the test cases total test case are 1888.
>
> After that I have removed your patch and executed test suite it is working fine.
>
> I think you have to revisit your patch and get the difference at your end.
>
>>
>>> Could you send me your open posix full Results logs of before and
>>> after your patch with ARCH and Kernel versions?
>>
>> I never ran the full test suite. To be honest I could never figure out
>> how to get it running. Are there instructions somewhere?
>>
>> My fix was triggered by a bug report I got that thought it found a
>> Kernel regression based on this test and it looked to me like it was
>> caused by that bug.
>
> Yes.
> There are Docs to do that.
> #Remove your patch dated Dec 12 2008
> http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg04867.html
>
>
> # vim LDFLAGS
> Uncomment following line.
>
> #Recommended flags:
> -D_XOPEN_SOURCE=600 -lpthread -lrt -lm
>
> FULL Execution:
> Simple command is “make”
> #pwd
> ltp-full-20090630/testcases/open_posix_testsuite
> #make
>
> Single DIR Execution:
> You can build only one directory of test cases
> # export POSIX_TARGET=conformance/interfaces/mq_send/
> #make
>
> Please read the followind Documents
> 1. BUILD
> - describes how to set up your developer machine to build and test
> 2. LDFLAGS
> - File that Makefile uses to link to what you specify
> 3. QUICK-START
> - Quick doc to help you around POSIX** Test Suite.
>
> Please share the full results log of your test.
>
> Best regards,
> Naresh Kamboju
>
>>
>> Cheers,
>>
>> Brandon
>>
>
I have noticed issues for patch applied on 12-Dec-2008.
Because it is fixing the mq_send/5-1.c problem, but at the same time
patch is affecting the building of few test cases in the same
directory.
I have listed the build log before and after the patch.
So I have modified the patch such a way that it should not affect
other test cases.
Modifications:
1. remove function definitions from “include/posixtest.h”
2. add function definitions to new header file “include/mq_send.h”
3. add #include ”mq_send.h” line to mq_send/5-1.c test cases
I have attached modified patch and below.
Please review the same.
Best regards,
Naresh Kamboju
/*****************************************************************/
Before current patch
/*****************************************************************/
#export POSIX_TARGET=conformance/interfaces/mq_send/
# make
conformance/interfaces/mq_send/8-1: build: FAILED
conformance/interfaces/mq_send/4-1: build: FAILED
conformance/interfaces/mq_send/10-1: build: PASS
conformance/interfaces/mq_send/10-1: link: PASS
conformance/interfaces/mq_send/9-1: build: PASS
conformance/interfaces/mq_send/9-1: link: PASS
conformance/interfaces/mq_send/14-1: build: PASS
conformance/interfaces/mq_send/14-1: link: PASS
conformance/interfaces/mq_send/7-1: build: PASS
conformance/interfaces/mq_send/7-1: link: PASS
conformance/interfaces/mq_send/13-1: build: PASS
conformance/interfaces/mq_send/13-1: link: PASS
conformance/interfaces/mq_send/11-2: build: PASS
conformance/interfaces/mq_send/11-2: link: PASS
conformance/interfaces/mq_send/3-2: build: FAILED
conformance/interfaces/mq_send/4-3: build: FAILED
conformance/interfaces/mq_send/2-1: build: FAILED
conformance/interfaces/mq_send/11-1: build: PASS
conformance/interfaces/mq_send/11-1: link: PASS
conformance/interfaces/mq_send/4-2: build: FAILED
conformance/interfaces/mq_send/3-1: build: FAILED
conformance/interfaces/mq_send/5-2: build: PASS
conformance/interfaces/mq_send/5-2: link: PASS
conformance/interfaces/mq_send/6-1: build: FAILED
conformance/interfaces/mq_send/1-1: build: FAILED
conformance/interfaces/mq_send/12-1: build: PASS
conformance/interfaces/mq_send/12-1: link: PASS
conformance/interfaces/mq_send/5-1: build: PASS
conformance/interfaces/mq_send/5-1: link: PASS
/*****************************************************************/
After current patch
/*****************************************************************/
#export POSIX_TARGET=conformance/interfaces/mq_send/
#make
conformance/interfaces/mq_send/8-1: build: PASS
conformance/interfaces/mq_send/8-1: link: PASS
conformance/interfaces/mq_send/4-1: build: PASS
conformance/interfaces/mq_send/4-1: link: PASS
conformance/interfaces/mq_send/10-1: build: PASS
conformance/interfaces/mq_send/10-1: link: PASS
conformance/interfaces/mq_send/9-1: build: PASS
conformance/interfaces/mq_send/9-1: link: PASS
conformance/interfaces/mq_send/14-1: build: PASS
conformance/interfaces/mq_send/14-1: link: PASS
conformance/interfaces/mq_send/7-1: build: PASS
conformance/interfaces/mq_send/7-1: link: PASS
conformance/interfaces/mq_send/13-1: build: PASS
conformance/interfaces/mq_send/13-1: link: PASS
conformance/interfaces/mq_send/11-2: build: PASS
conformance/interfaces/mq_send/11-2: link: PASS
conformance/interfaces/mq_send/3-2: build: PASS
conformance/interfaces/mq_send/3-2: link: PASS
conformance/interfaces/mq_send/4-3: build: PASS
conformance/interfaces/mq_send/4-3: link: PASS
conformance/interfaces/mq_send/2-1: build: PASS
conformance/interfaces/mq_send/2-1: link: PASS
conformance/interfaces/mq_send/11-1: build: PASS
conformance/interfaces/mq_send/11-1: link: PASS
conformance/interfaces/mq_send/4-2: build: PASS
conformance/interfaces/mq_send/4-2: link: PASS
conformance/interfaces/mq_send/3-1: build: PASS
conformance/interfaces/mq_send/3-1: link: PASS
conformance/interfaces/mq_send/5-2: build: PASS
conformance/interfaces/mq_send/5-2: link: PASS
conformance/interfaces/mq_send/6-1: build: PASS
conformance/interfaces/mq_send/6-1: link: PASS
conformance/interfaces/mq_send/1-1: build: PASS
conformance/interfaces/mq_send/1-1: link: PASS
conformance/interfaces/mq_send/12-1: build: PASS
conformance/interfaces/mq_send/12-1: link: PASS
conformance/interfaces/mq_send/5-1: build: PASS
conformance/interfaces/mq_send/5-1: link: PASS
/*****************************************************************/
Results:
/*****************************************************************/
conformance/interfaces/mq_send/10-1.test:execution:PASS
conformance/interfaces/mq_send/14-1.test:execution:PASS
conformance/interfaces/mq_send/12-1.test:execution:PASS
conformance/interfaces/mq_send/11-1.test:execution:PASS
conformance/interfaces/mq_send/9-1.test:execution:PASS
conformance/interfaces/mq_send/3-1.test:execution:PASS
conformance/interfaces/mq_send/4-3.test:execution:PASS
conformance/interfaces/mq_send/8-1.test:execution:PASS
conformance/interfaces/mq_send/7-1.test:execution:PASS
conformance/interfaces/mq_send/13-1.test:execution:PASS
conformance/interfaces/mq_send/1-1.test:execution:PASS
conformance/interfaces/mq_send/5-2.test:execution:PASS
conformance/interfaces/mq_send/5-1.test:execution:PASS
conformance/interfaces/mq_send/2-1.test:execution:PASS
conformance/interfaces/mq_send/6-1.test:execution:UNTESTED
conformance/interfaces/mq_send/4-1.test:execution:PASS
conformance/interfaces/mq_send/11-2.test:execution:PASS
conformance/interfaces/mq_send/4-2.test:execution:PASS
conformance/interfaces/mq_send/3-2.test:execution:PASS
/*****************************************************************/
Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2008-12-12
18:26:25.000000000 +0530
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2009-08-07
11:29:42.000000000 +0530
@@ -37,6 +37,7 @@
#include <signal.h>
#include <errno.h>
#include "posixtest.h"
+#include "mq_send.h"
#define NAMESIZE 50
#define MSGSTR "0123456789"
diff -Naurb a/testcases/open_posix_testsuite/include/mq_send.h
b/testcases/open_posix_testsuite/include/mq_send.h
--- a/testcases/open_posix_testsuite/include/mq_send.h 1970-01-01
05:30:00.000000000 +0530
+++ b/testcases/open_posix_testsuite/include/mq_send.h 2009-08-07
11:28:41.000000000 +0530
@@ -0,0 +1,92 @@
+
+/*
+ * Copyright (c) 2002, Intel Corporation. All rights reserved.
+ * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
+ * This file is licensed under the GPL license. For the full content
+ * of this license, see the COPYING file at the top level of this
+ * source tree.
+ */
+
+
+#include <sys/select.h>
+
+
+int sync_pipe_create(int fd[])
+{
+ return pipe (fd);
+}
+
+int sync_pipe_close(int fd[])
+{
+ int r = 0;
+
+ if (fd[0] != -1)
+ r = close (fd[0]);
+ if (fd[1] != -1)
+ r |= close (fd[1]);
+ return r;
+}
+
+int sync_pipe_wait(int fd[])
+{
+ char buf;
+ int r;
+
+ if (fd[1] != -1) {
+ close (fd[1]);
+ fd[1] = -1;
+ }
+
+ r = read (fd[0], &buf, 1);
+
+ if ((r != 1) || (buf != 'A'))
+ return -1;
+ return 0;
+}
+
+int sync_pipe_wait_select(int fd[], long tv_sec)
+{
+ char buf;
+ int r;
+ fd_set rfds;
+ struct timeval tv;
+ int err;
+
+ tv.tv_sec = tv_sec;
+ tv.tv_usec = 0;
+
+ if (fd[1] != -1) {
+ close (fd[1]);
+ fd[1] = -1;
+ }
+
+ FD_ZERO(&rfds);
+ FD_SET(fd[0], &rfds);
+
+ r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
+ err = errno;
+
+ if (FD_ISSET(fd[0], &rfds)) {
+ return sync_pipe_wait(fd);
+ }
+
+ return r ? err : -ETIMEDOUT;
+}
+
+
+int sync_pipe_notify(int fd[])
+{
+ char buf = 'A';
+ int r;
+
+ if (fd[0] != -1) {
+ close (fd[0]);
+ fd[0] = -1;
+ }
+
+ r = write (fd[1], &buf, 1);
+
+ if (r != 1)
+ return -1;
+ return 0;
+}
diff -Naurb a/testcases/open_posix_testsuite/include/posixtest.h
b/testcases/open_posix_testsuite/include/posixtest.h
--- a/testcases/open_posix_testsuite/include/posixtest.h 2009-08-06
21:49:42.000000000 +0530
+++ b/testcases/open_posix_testsuite/include/posixtest.h 2009-08-07
11:28:41.000000000 +0530
@@ -15,86 +15,3 @@
#define PTS_UNSUPPORTED 4
#define PTS_UNTESTED 5
-
-#include <sys/select.h>
-
-
-int sync_pipe_create(int fd[])
-{
- return pipe (fd);
-}
-
-int sync_pipe_close(int fd[])
-{
- int r = 0;
-
- if (fd[0] != -1)
- r = close (fd[0]);
- if (fd[1] != -1)
- r |= close (fd[1]);
- return r;
-}
-
-int sync_pipe_wait(int fd[])
-{
- char buf;
- int r;
-
- if (fd[1] != -1) {
- close (fd[1]);
- fd[1] = -1;
- }
-
- r = read (fd[0], &buf, 1);
-
- if ((r != 1) || (buf != 'A'))
- return -1;
- return 0;
-}
-
-int sync_pipe_wait_select(int fd[], long tv_sec)
-{
- char buf;
- int r;
- fd_set rfds;
- struct timeval tv;
- int err;
-
- tv.tv_sec = tv_sec;
- tv.tv_usec = 0;
-
- if (fd[1] != -1) {
- close (fd[1]);
- fd[1] = -1;
- }
-
- FD_ZERO(&rfds);
- FD_SET(fd[0], &rfds);
-
- r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
- err = errno;
-
- if (FD_ISSET(fd[0], &rfds)) {
- return sync_pipe_wait(fd);
- }
-
- return r ? err : -ETIMEDOUT;
-}
-
-
-int sync_pipe_notify(int fd[])
-{
- char buf = 'A';
- int r;
-
- if (fd[0] != -1) {
- close (fd[0]);
- fd[0] = -1;
- }
-
- r = write (fd[1], &buf, 1);
-
- if (r != 1)
- return -1;
- return 0;
-}
[-- Attachment #2: ltp-fix-mq_send_5-1.patch --]
[-- Type: application/octet-stream, Size: 4469 bytes --]
diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2008-12-12 18:26:25.000000000 +0530
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2009-08-07 11:29:42.000000000 +0530
@@ -37,6 +37,7 @@
#include <signal.h>
#include <errno.h>
#include "posixtest.h"
+#include "mq_send.h"
#define NAMESIZE 50
#define MSGSTR "0123456789"
diff -Naurb a/testcases/open_posix_testsuite/include/mq_send.h b/testcases/open_posix_testsuite/include/mq_send.h
--- a/testcases/open_posix_testsuite/include/mq_send.h 1970-01-01 05:30:00.000000000 +0530
+++ b/testcases/open_posix_testsuite/include/mq_send.h 2009-08-07 11:28:41.000000000 +0530
@@ -0,0 +1,92 @@
+
+/*
+ * Copyright (c) 2002, Intel Corporation. All rights reserved.
+ * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
+ * This file is licensed under the GPL license. For the full content
+ * of this license, see the COPYING file at the top level of this
+ * source tree.
+ */
+
+
+#include <sys/select.h>
+
+
+int sync_pipe_create(int fd[])
+{
+ return pipe (fd);
+}
+
+int sync_pipe_close(int fd[])
+{
+ int r = 0;
+
+ if (fd[0] != -1)
+ r = close (fd[0]);
+ if (fd[1] != -1)
+ r |= close (fd[1]);
+ return r;
+}
+
+int sync_pipe_wait(int fd[])
+{
+ char buf;
+ int r;
+
+ if (fd[1] != -1) {
+ close (fd[1]);
+ fd[1] = -1;
+ }
+
+ r = read (fd[0], &buf, 1);
+
+ if ((r != 1) || (buf != 'A'))
+ return -1;
+ return 0;
+}
+
+int sync_pipe_wait_select(int fd[], long tv_sec)
+{
+ char buf;
+ int r;
+ fd_set rfds;
+ struct timeval tv;
+ int err;
+
+ tv.tv_sec = tv_sec;
+ tv.tv_usec = 0;
+
+ if (fd[1] != -1) {
+ close (fd[1]);
+ fd[1] = -1;
+ }
+
+ FD_ZERO(&rfds);
+ FD_SET(fd[0], &rfds);
+
+ r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
+ err = errno;
+
+ if (FD_ISSET(fd[0], &rfds)) {
+ return sync_pipe_wait(fd);
+ }
+
+ return r ? err : -ETIMEDOUT;
+}
+
+
+int sync_pipe_notify(int fd[])
+{
+ char buf = 'A';
+ int r;
+
+ if (fd[0] != -1) {
+ close (fd[0]);
+ fd[0] = -1;
+ }
+
+ r = write (fd[1], &buf, 1);
+
+ if (r != 1)
+ return -1;
+ return 0;
+}
diff -Naurb a/testcases/open_posix_testsuite/include/posixtest.h b/testcases/open_posix_testsuite/include/posixtest.h
--- a/testcases/open_posix_testsuite/include/posixtest.h 2009-08-06 21:49:42.000000000 +0530
+++ b/testcases/open_posix_testsuite/include/posixtest.h 2009-08-07 11:28:41.000000000 +0530
@@ -15,86 +15,3 @@
#define PTS_UNSUPPORTED 4
#define PTS_UNTESTED 5
-
-#include <sys/select.h>
-
-
-int sync_pipe_create(int fd[])
-{
- return pipe (fd);
-}
-
-int sync_pipe_close(int fd[])
-{
- int r = 0;
-
- if (fd[0] != -1)
- r = close (fd[0]);
- if (fd[1] != -1)
- r |= close (fd[1]);
- return r;
-}
-
-int sync_pipe_wait(int fd[])
-{
- char buf;
- int r;
-
- if (fd[1] != -1) {
- close (fd[1]);
- fd[1] = -1;
- }
-
- r = read (fd[0], &buf, 1);
-
- if ((r != 1) || (buf != 'A'))
- return -1;
- return 0;
-}
-
-int sync_pipe_wait_select(int fd[], long tv_sec)
-{
- char buf;
- int r;
- fd_set rfds;
- struct timeval tv;
- int err;
-
- tv.tv_sec = tv_sec;
- tv.tv_usec = 0;
-
- if (fd[1] != -1) {
- close (fd[1]);
- fd[1] = -1;
- }
-
- FD_ZERO(&rfds);
- FD_SET(fd[0], &rfds);
-
- r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
- err = errno;
-
- if (FD_ISSET(fd[0], &rfds)) {
- return sync_pipe_wait(fd);
- }
-
- return r ? err : -ETIMEDOUT;
-}
-
-
-int sync_pipe_notify(int fd[])
-{
- char buf = 'A';
- int r;
-
- if (fd[0] != -1) {
- close (fd[0]);
- fd[0] = -1;
- }
-
- r = write (fd[1], &buf, 1);
-
- if (r != 1)
- return -1;
- return 0;
-}
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
2009-08-07 7:59 ` naresh kamboju
@ 2009-08-07 12:42 ` Subrata Modak
2009-08-07 15:43 ` naresh kamboju
2009-08-07 21:53 ` Brandon Philips
1 sibling, 1 reply; 9+ messages in thread
From: Subrata Modak @ 2009-08-07 12:42 UTC (permalink / raw)
To: naresh kamboju; +Cc: ltp-list, Brandon Philips, maxin john
Hi,
On Fri, 2009-08-07 at 13:29 +0530, naresh kamboju wrote:
> Hi Brandon Philips,
>
> On Tue, Jul 21, 2009 at 6:52 PM, naresh kamboju<naresh.kernel@gmail.com> wrote:
> > On Tue, Jul 21, 2009 at 10:15 AM, Brandon Philips<bphilips@suse.de> wrote:
> >> On 12:35 Tue 30 Jun 2009, naresh kamboju wrote:
> >>> I have noticed some issue with your patch dated on 12-Dec-2008.
> >>> I want conform the problem and root cause.
> >>
> >> What is the problem?
> >
> > After applying you’re Patch to
> > Include/posixtest.h
> > http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg04867.html
> >
> > Most of the mq_ and other test cases are failed at Build and linking.
> > It was almost of the test cases total test case are 1888.
> >
> > After that I have removed your patch and executed test suite it is working fine.
> >
> > I think you have to revisit your patch and get the difference at your end.
> >
> >>
> >>> Could you send me your open posix full Results logs of before and
> >>> after your patch with ARCH and Kernel versions?
> >>
> >> I never ran the full test suite. To be honest I could never figure out
> >> how to get it running. Are there instructions somewhere?
> >>
> >> My fix was triggered by a bug report I got that thought it found a
> >> Kernel regression based on this test and it looked to me like it was
> >> caused by that bug.
> >
> > Yes.
> > There are Docs to do that.
> > #Remove your patch dated Dec 12 2008
> > http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg04867.html
> >
> >
> > # vim LDFLAGS
> > Uncomment following line.
> >
> > #Recommended flags:
> > -D_XOPEN_SOURCE=600 -lpthread -lrt -lm
> >
> > FULL Execution:
> > Simple command is “make”
> > #pwd
> > ltp-full-20090630/testcases/open_posix_testsuite
> > #make
> >
> > Single DIR Execution:
> > You can build only one directory of test cases
> > # export POSIX_TARGET=conformance/interfaces/mq_send/
> > #make
> >
> > Please read the followind Documents
> > 1. BUILD
> > - describes how to set up your developer machine to build and test
> > 2. LDFLAGS
> > - File that Makefile uses to link to what you specify
> > 3. QUICK-START
> > - Quick doc to help you around POSIX** Test Suite.
> >
> > Please share the full results log of your test.
> >
> > Best regards,
> > Naresh Kamboju
> >
> >>
> >> Cheers,
> >>
> >> Brandon
> >>
> >
> I have noticed issues for patch applied on 12-Dec-2008.
> Because it is fixing the mq_send/5-1.c problem, but at the same time
> patch is affecting the building of few test cases in the same
> directory.
> I have listed the build log before and after the patch.
> So I have modified the patch such a way that it should not affect
> other test cases.
>
> Modifications:
> 1. remove function definitions from “include/posixtest.h”
> 2. add function definitions to new header file “include/mq_send.h”
> 3. add #include ”mq_send.h” line to mq_send/5-1.c test cases
>
> I have attached modified patch and below.
> Please review the same.
>
> Best regards,
> Naresh Kamboju
>
> /*****************************************************************/
> Before current patch
> /*****************************************************************/
>
> #export POSIX_TARGET=conformance/interfaces/mq_send/
> # make
> conformance/interfaces/mq_send/8-1: build: FAILED
> conformance/interfaces/mq_send/4-1: build: FAILED
> conformance/interfaces/mq_send/10-1: build: PASS
> conformance/interfaces/mq_send/10-1: link: PASS
> conformance/interfaces/mq_send/9-1: build: PASS
> conformance/interfaces/mq_send/9-1: link: PASS
> conformance/interfaces/mq_send/14-1: build: PASS
> conformance/interfaces/mq_send/14-1: link: PASS
> conformance/interfaces/mq_send/7-1: build: PASS
> conformance/interfaces/mq_send/7-1: link: PASS
> conformance/interfaces/mq_send/13-1: build: PASS
> conformance/interfaces/mq_send/13-1: link: PASS
> conformance/interfaces/mq_send/11-2: build: PASS
> conformance/interfaces/mq_send/11-2: link: PASS
> conformance/interfaces/mq_send/3-2: build: FAILED
> conformance/interfaces/mq_send/4-3: build: FAILED
> conformance/interfaces/mq_send/2-1: build: FAILED
> conformance/interfaces/mq_send/11-1: build: PASS
> conformance/interfaces/mq_send/11-1: link: PASS
> conformance/interfaces/mq_send/4-2: build: FAILED
> conformance/interfaces/mq_send/3-1: build: FAILED
> conformance/interfaces/mq_send/5-2: build: PASS
> conformance/interfaces/mq_send/5-2: link: PASS
> conformance/interfaces/mq_send/6-1: build: FAILED
> conformance/interfaces/mq_send/1-1: build: FAILED
> conformance/interfaces/mq_send/12-1: build: PASS
> conformance/interfaces/mq_send/12-1: link: PASS
> conformance/interfaces/mq_send/5-1: build: PASS
> conformance/interfaces/mq_send/5-1: link: PASS
>
> /*****************************************************************/
> After current patch
> /*****************************************************************/
> #export POSIX_TARGET=conformance/interfaces/mq_send/
> #make
> conformance/interfaces/mq_send/8-1: build: PASS
> conformance/interfaces/mq_send/8-1: link: PASS
> conformance/interfaces/mq_send/4-1: build: PASS
> conformance/interfaces/mq_send/4-1: link: PASS
> conformance/interfaces/mq_send/10-1: build: PASS
> conformance/interfaces/mq_send/10-1: link: PASS
> conformance/interfaces/mq_send/9-1: build: PASS
> conformance/interfaces/mq_send/9-1: link: PASS
> conformance/interfaces/mq_send/14-1: build: PASS
> conformance/interfaces/mq_send/14-1: link: PASS
> conformance/interfaces/mq_send/7-1: build: PASS
> conformance/interfaces/mq_send/7-1: link: PASS
> conformance/interfaces/mq_send/13-1: build: PASS
> conformance/interfaces/mq_send/13-1: link: PASS
> conformance/interfaces/mq_send/11-2: build: PASS
> conformance/interfaces/mq_send/11-2: link: PASS
> conformance/interfaces/mq_send/3-2: build: PASS
> conformance/interfaces/mq_send/3-2: link: PASS
> conformance/interfaces/mq_send/4-3: build: PASS
> conformance/interfaces/mq_send/4-3: link: PASS
> conformance/interfaces/mq_send/2-1: build: PASS
> conformance/interfaces/mq_send/2-1: link: PASS
> conformance/interfaces/mq_send/11-1: build: PASS
> conformance/interfaces/mq_send/11-1: link: PASS
> conformance/interfaces/mq_send/4-2: build: PASS
> conformance/interfaces/mq_send/4-2: link: PASS
> conformance/interfaces/mq_send/3-1: build: PASS
> conformance/interfaces/mq_send/3-1: link: PASS
> conformance/interfaces/mq_send/5-2: build: PASS
> conformance/interfaces/mq_send/5-2: link: PASS
> conformance/interfaces/mq_send/6-1: build: PASS
> conformance/interfaces/mq_send/6-1: link: PASS
> conformance/interfaces/mq_send/1-1: build: PASS
> conformance/interfaces/mq_send/1-1: link: PASS
> conformance/interfaces/mq_send/12-1: build: PASS
> conformance/interfaces/mq_send/12-1: link: PASS
> conformance/interfaces/mq_send/5-1: build: PASS
> conformance/interfaces/mq_send/5-1: link: PASS
> /*****************************************************************/
> Results:
> /*****************************************************************/
> conformance/interfaces/mq_send/10-1.test:execution:PASS
> conformance/interfaces/mq_send/14-1.test:execution:PASS
> conformance/interfaces/mq_send/12-1.test:execution:PASS
> conformance/interfaces/mq_send/11-1.test:execution:PASS
> conformance/interfaces/mq_send/9-1.test:execution:PASS
> conformance/interfaces/mq_send/3-1.test:execution:PASS
> conformance/interfaces/mq_send/4-3.test:execution:PASS
> conformance/interfaces/mq_send/8-1.test:execution:PASS
> conformance/interfaces/mq_send/7-1.test:execution:PASS
> conformance/interfaces/mq_send/13-1.test:execution:PASS
> conformance/interfaces/mq_send/1-1.test:execution:PASS
> conformance/interfaces/mq_send/5-2.test:execution:PASS
> conformance/interfaces/mq_send/5-1.test:execution:PASS
> conformance/interfaces/mq_send/2-1.test:execution:PASS
> conformance/interfaces/mq_send/6-1.test:execution:UNTESTED
> conformance/interfaces/mq_send/4-1.test:execution:PASS
> conformance/interfaces/mq_send/11-2.test:execution:PASS
> conformance/interfaces/mq_send/4-2.test:execution:PASS
> conformance/interfaces/mq_send/3-2.test:execution:PASS
>
> /*****************************************************************/
>
> Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
>
> diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
> b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
> --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2008-12-12
> 18:26:25.000000000 +0530
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2009-08-07
> 11:29:42.000000000 +0530
> @@ -37,6 +37,7 @@
> #include <signal.h>
> #include <errno.h>
> #include "posixtest.h"
> +#include "mq_send.h"
>
> #define NAMESIZE 50
> #define MSGSTR "0123456789"
> diff -Naurb a/testcases/open_posix_testsuite/include/mq_send.h
> b/testcases/open_posix_testsuite/include/mq_send.h
> --- a/testcases/open_posix_testsuite/include/mq_send.h 1970-01-01
> 05:30:00.000000000 +0530
> +++ b/testcases/open_posix_testsuite/include/mq_send.h 2009-08-07
> 11:28:41.000000000 +0530
> @@ -0,0 +1,92 @@
> +
> +/*
> + * Copyright (c) 2002, Intel Corporation. All rights reserved.
Can you please change this to:
* Copyright (c) 2002, Intel Corporation.
And then resend.
Regards--
Subrata
> + * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
> + * This file is licensed under the GPL license. For the full content
> + * of this license, see the COPYING file at the top level of this
> + * source tree.
> + */
> +
> +
> +#include <sys/select.h>
> +
> +
> +int sync_pipe_create(int fd[])
> +{
> + return pipe (fd);
> +}
> +
> +int sync_pipe_close(int fd[])
> +{
> + int r = 0;
> +
> + if (fd[0] != -1)
> + r = close (fd[0]);
> + if (fd[1] != -1)
> + r |= close (fd[1]);
> + return r;
> +}
> +
> +int sync_pipe_wait(int fd[])
> +{
> + char buf;
> + int r;
> +
> + if (fd[1] != -1) {
> + close (fd[1]);
> + fd[1] = -1;
> + }
> +
> + r = read (fd[0], &buf, 1);
> +
> + if ((r != 1) || (buf != 'A'))
> + return -1;
> + return 0;
> +}
> +
> +int sync_pipe_wait_select(int fd[], long tv_sec)
> +{
> + char buf;
> + int r;
> + fd_set rfds;
> + struct timeval tv;
> + int err;
> +
> + tv.tv_sec = tv_sec;
> + tv.tv_usec = 0;
> +
> + if (fd[1] != -1) {
> + close (fd[1]);
> + fd[1] = -1;
> + }
> +
> + FD_ZERO(&rfds);
> + FD_SET(fd[0], &rfds);
> +
> + r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
> + err = errno;
> +
> + if (FD_ISSET(fd[0], &rfds)) {
> + return sync_pipe_wait(fd);
> + }
> +
> + return r ? err : -ETIMEDOUT;
> +}
> +
> +
> +int sync_pipe_notify(int fd[])
> +{
> + char buf = 'A';
> + int r;
> +
> + if (fd[0] != -1) {
> + close (fd[0]);
> + fd[0] = -1;
> + }
> +
> + r = write (fd[1], &buf, 1);
> +
> + if (r != 1)
> + return -1;
> + return 0;
> +}
> diff -Naurb a/testcases/open_posix_testsuite/include/posixtest.h
> b/testcases/open_posix_testsuite/include/posixtest.h
> --- a/testcases/open_posix_testsuite/include/posixtest.h 2009-08-06
> 21:49:42.000000000 +0530
> +++ b/testcases/open_posix_testsuite/include/posixtest.h 2009-08-07
> 11:28:41.000000000 +0530
> @@ -15,86 +15,3 @@
> #define PTS_UNSUPPORTED 4
> #define PTS_UNTESTED 5
>
> -
> -#include <sys/select.h>
> -
> -
> -int sync_pipe_create(int fd[])
> -{
> - return pipe (fd);
> -}
> -
> -int sync_pipe_close(int fd[])
> -{
> - int r = 0;
> -
> - if (fd[0] != -1)
> - r = close (fd[0]);
> - if (fd[1] != -1)
> - r |= close (fd[1]);
> - return r;
> -}
> -
> -int sync_pipe_wait(int fd[])
> -{
> - char buf;
> - int r;
> -
> - if (fd[1] != -1) {
> - close (fd[1]);
> - fd[1] = -1;
> - }
> -
> - r = read (fd[0], &buf, 1);
> -
> - if ((r != 1) || (buf != 'A'))
> - return -1;
> - return 0;
> -}
> -
> -int sync_pipe_wait_select(int fd[], long tv_sec)
> -{
> - char buf;
> - int r;
> - fd_set rfds;
> - struct timeval tv;
> - int err;
> -
> - tv.tv_sec = tv_sec;
> - tv.tv_usec = 0;
> -
> - if (fd[1] != -1) {
> - close (fd[1]);
> - fd[1] = -1;
> - }
> -
> - FD_ZERO(&rfds);
> - FD_SET(fd[0], &rfds);
> -
> - r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
> - err = errno;
> -
> - if (FD_ISSET(fd[0], &rfds)) {
> - return sync_pipe_wait(fd);
> - }
> -
> - return r ? err : -ETIMEDOUT;
> -}
> -
> -
> -int sync_pipe_notify(int fd[])
> -{
> - char buf = 'A';
> - int r;
> -
> - if (fd[0] != -1) {
> - close (fd[0]);
> - fd[0] = -1;
> - }
> -
> - r = write (fd[1], &buf, 1);
> -
> - if (r != 1)
> - return -1;
> - return 0;
> -}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
2009-08-07 12:42 ` Subrata Modak
@ 2009-08-07 15:43 ` naresh kamboju
2009-08-07 21:54 ` Brandon Philips
2009-08-10 8:20 ` Subrata Modak
0 siblings, 2 replies; 9+ messages in thread
From: naresh kamboju @ 2009-08-07 15:43 UTC (permalink / raw)
To: subrata; +Cc: ltp-list, Brandon Philips, maxin john
[-- Attachment #1: Type: text/plain, Size: 18988 bytes --]
Hi,
On Fri, Aug 7, 2009 at 6:12 PM, Subrata Modak<subrata@linux.vnet.ibm.com> wrote:
> Hi,
>
> On Fri, 2009-08-07 at 13:29 +0530, naresh kamboju wrote:
>> Hi Brandon Philips,
>>
>> On Tue, Jul 21, 2009 at 6:52 PM, naresh kamboju<naresh.kernel@gmail.com> wrote:
>> > On Tue, Jul 21, 2009 at 10:15 AM, Brandon Philips<bphilips@suse.de> wrote:
>> >> On 12:35 Tue 30 Jun 2009, naresh kamboju wrote:
>> >>> I have noticed some issue with your patch dated on 12-Dec-2008.
>> >>> I want conform the problem and root cause.
>> >>
>> >> What is the problem?
>> >
>> > After applying you’re Patch to
>> > Include/posixtest.h
>> > http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg04867.html
>> >
>> > Most of the mq_ and other test cases are failed at Build and linking.
>> > It was almost of the test cases total test case are 1888.
>> >
>> > After that I have removed your patch and executed test suite it is working fine.
>> >
>> > I think you have to revisit your patch and get the difference at your end.
>> >
>> >>
>> >>> Could you send me your open posix full Results logs of before and
>> >>> after your patch with ARCH and Kernel versions?
>> >>
>> >> I never ran the full test suite. To be honest I could never figure out
>> >> how to get it running. Are there instructions somewhere?
>> >>
>> >> My fix was triggered by a bug report I got that thought it found a
>> >> Kernel regression based on this test and it looked to me like it was
>> >> caused by that bug.
>> >
>> > Yes.
>> > There are Docs to do that.
>> > #Remove your patch dated Dec 12 2008
>> > http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg04867.html
>> >
>> >
>> > # vim LDFLAGS
>> > Uncomment following line.
>> >
>> > #Recommended flags:
>> > -D_XOPEN_SOURCE=600 -lpthread -lrt -lm
>> >
>> > FULL Execution:
>> > Simple command is “make”
>> > #pwd
>> > ltp-full-20090630/testcases/open_posix_testsuite
>> > #make
>> >
>> > Single DIR Execution:
>> > You can build only one directory of test cases
>> > # export POSIX_TARGET=conformance/interfaces/mq_send/
>> > #make
>> >
>> > Please read the followind Documents
>> > 1. BUILD
>> > - describes how to set up your developer machine to build and test
>> > 2. LDFLAGS
>> > - File that Makefile uses to link to what you specify
>> > 3. QUICK-START
>> > - Quick doc to help you around POSIX** Test Suite.
>> >
>> > Please share the full results log of your test.
>> >
>> > Best regards,
>> > Naresh Kamboju
>> >
>> >>
>> >> Cheers,
>> >>
>> >> Brandon
>> >>
>> >
>> I have noticed issues for patch applied on 12-Dec-2008.
>> Because it is fixing the mq_send/5-1.c problem, but at the same time
>> patch is affecting the building of few test cases in the same
>> directory.
>> I have listed the build log before and after the patch.
>> So I have modified the patch such a way that it should not affect
>> other test cases.
>>
>> Modifications:
>> 1. remove function definitions from “include/posixtest.h”
>> 2. add function definitions to new header file “include/mq_send.h”
>> 3. add #include ”mq_send.h” line to mq_send/5-1.c test cases
>>
>> I have attached modified patch and below.
>> Please review the same.
>>
>> Best regards,
>> Naresh Kamboju
>>
>> /*****************************************************************/
>> Before current patch
>> /*****************************************************************/
>>
>> #export POSIX_TARGET=conformance/interfaces/mq_send/
>> # make
>> conformance/interfaces/mq_send/8-1: build: FAILED
>> conformance/interfaces/mq_send/4-1: build: FAILED
>> conformance/interfaces/mq_send/10-1: build: PASS
>> conformance/interfaces/mq_send/10-1: link: PASS
>> conformance/interfaces/mq_send/9-1: build: PASS
>> conformance/interfaces/mq_send/9-1: link: PASS
>> conformance/interfaces/mq_send/14-1: build: PASS
>> conformance/interfaces/mq_send/14-1: link: PASS
>> conformance/interfaces/mq_send/7-1: build: PASS
>> conformance/interfaces/mq_send/7-1: link: PASS
>> conformance/interfaces/mq_send/13-1: build: PASS
>> conformance/interfaces/mq_send/13-1: link: PASS
>> conformance/interfaces/mq_send/11-2: build: PASS
>> conformance/interfaces/mq_send/11-2: link: PASS
>> conformance/interfaces/mq_send/3-2: build: FAILED
>> conformance/interfaces/mq_send/4-3: build: FAILED
>> conformance/interfaces/mq_send/2-1: build: FAILED
>> conformance/interfaces/mq_send/11-1: build: PASS
>> conformance/interfaces/mq_send/11-1: link: PASS
>> conformance/interfaces/mq_send/4-2: build: FAILED
>> conformance/interfaces/mq_send/3-1: build: FAILED
>> conformance/interfaces/mq_send/5-2: build: PASS
>> conformance/interfaces/mq_send/5-2: link: PASS
>> conformance/interfaces/mq_send/6-1: build: FAILED
>> conformance/interfaces/mq_send/1-1: build: FAILED
>> conformance/interfaces/mq_send/12-1: build: PASS
>> conformance/interfaces/mq_send/12-1: link: PASS
>> conformance/interfaces/mq_send/5-1: build: PASS
>> conformance/interfaces/mq_send/5-1: link: PASS
>>
>> /*****************************************************************/
>> After current patch
>> /*****************************************************************/
>> #export POSIX_TARGET=conformance/interfaces/mq_send/
>> #make
>> conformance/interfaces/mq_send/8-1: build: PASS
>> conformance/interfaces/mq_send/8-1: link: PASS
>> conformance/interfaces/mq_send/4-1: build: PASS
>> conformance/interfaces/mq_send/4-1: link: PASS
>> conformance/interfaces/mq_send/10-1: build: PASS
>> conformance/interfaces/mq_send/10-1: link: PASS
>> conformance/interfaces/mq_send/9-1: build: PASS
>> conformance/interfaces/mq_send/9-1: link: PASS
>> conformance/interfaces/mq_send/14-1: build: PASS
>> conformance/interfaces/mq_send/14-1: link: PASS
>> conformance/interfaces/mq_send/7-1: build: PASS
>> conformance/interfaces/mq_send/7-1: link: PASS
>> conformance/interfaces/mq_send/13-1: build: PASS
>> conformance/interfaces/mq_send/13-1: link: PASS
>> conformance/interfaces/mq_send/11-2: build: PASS
>> conformance/interfaces/mq_send/11-2: link: PASS
>> conformance/interfaces/mq_send/3-2: build: PASS
>> conformance/interfaces/mq_send/3-2: link: PASS
>> conformance/interfaces/mq_send/4-3: build: PASS
>> conformance/interfaces/mq_send/4-3: link: PASS
>> conformance/interfaces/mq_send/2-1: build: PASS
>> conformance/interfaces/mq_send/2-1: link: PASS
>> conformance/interfaces/mq_send/11-1: build: PASS
>> conformance/interfaces/mq_send/11-1: link: PASS
>> conformance/interfaces/mq_send/4-2: build: PASS
>> conformance/interfaces/mq_send/4-2: link: PASS
>> conformance/interfaces/mq_send/3-1: build: PASS
>> conformance/interfaces/mq_send/3-1: link: PASS
>> conformance/interfaces/mq_send/5-2: build: PASS
>> conformance/interfaces/mq_send/5-2: link: PASS
>> conformance/interfaces/mq_send/6-1: build: PASS
>> conformance/interfaces/mq_send/6-1: link: PASS
>> conformance/interfaces/mq_send/1-1: build: PASS
>> conformance/interfaces/mq_send/1-1: link: PASS
>> conformance/interfaces/mq_send/12-1: build: PASS
>> conformance/interfaces/mq_send/12-1: link: PASS
>> conformance/interfaces/mq_send/5-1: build: PASS
>> conformance/interfaces/mq_send/5-1: link: PASS
>> /*****************************************************************/
>> Results:
>> /*****************************************************************/
>> conformance/interfaces/mq_send/10-1.test:execution:PASS
>> conformance/interfaces/mq_send/14-1.test:execution:PASS
>> conformance/interfaces/mq_send/12-1.test:execution:PASS
>> conformance/interfaces/mq_send/11-1.test:execution:PASS
>> conformance/interfaces/mq_send/9-1.test:execution:PASS
>> conformance/interfaces/mq_send/3-1.test:execution:PASS
>> conformance/interfaces/mq_send/4-3.test:execution:PASS
>> conformance/interfaces/mq_send/8-1.test:execution:PASS
>> conformance/interfaces/mq_send/7-1.test:execution:PASS
>> conformance/interfaces/mq_send/13-1.test:execution:PASS
>> conformance/interfaces/mq_send/1-1.test:execution:PASS
>> conformance/interfaces/mq_send/5-2.test:execution:PASS
>> conformance/interfaces/mq_send/5-1.test:execution:PASS
>> conformance/interfaces/mq_send/2-1.test:execution:PASS
>> conformance/interfaces/mq_send/6-1.test:execution:UNTESTED
>> conformance/interfaces/mq_send/4-1.test:execution:PASS
>> conformance/interfaces/mq_send/11-2.test:execution:PASS
>> conformance/interfaces/mq_send/4-2.test:execution:PASS
>> conformance/interfaces/mq_send/3-2.test:execution:PASS
>>
>> /*****************************************************************/
>>
>> Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
>>
>> diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
>> b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
>> --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2008-12-12
>> 18:26:25.000000000 +0530
>> +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2009-08-07
>> 11:29:42.000000000 +0530
>> @@ -37,6 +37,7 @@
>> #include <signal.h>
>> #include <errno.h>
>> #include "posixtest.h"
>> +#include "mq_send.h"
>>
>> #define NAMESIZE 50
>> #define MSGSTR "0123456789"
>> diff -Naurb a/testcases/open_posix_testsuite/include/mq_send.h
>> b/testcases/open_posix_testsuite/include/mq_send.h
>> --- a/testcases/open_posix_testsuite/include/mq_send.h 1970-01-01
>> 05:30:00.000000000 +0530
>> +++ b/testcases/open_posix_testsuite/include/mq_send.h 2009-08-07
>> 11:28:41.000000000 +0530
>> @@ -0,0 +1,92 @@
>> +
>> +/*
>> + * Copyright (c) 2002, Intel Corporation. All rights reserved.
>
> Can you please change this to:
> * Copyright (c) 2002, Intel Corporation.
>
> And then resend.
I am resending the same patch after this change.
Best regards,
Naresh Kamboju
Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2008-12-12
18:26:25.000000000 +0530
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2009-08-07
11:29:42.000000000 +0530
@@ -37,6 +37,7 @@
#include <signal.h>
#include <errno.h>
#include "posixtest.h"
+#include "mq_send.h"
#define NAMESIZE 50
#define MSGSTR "0123456789"
diff -Naurb a/testcases/open_posix_testsuite/include/mq_send.h
b/testcases/open_posix_testsuite/include/mq_send.h
--- a/testcases/open_posix_testsuite/include/mq_send.h 1970-01-01
05:30:00.000000000 +0530
+++ b/testcases/open_posix_testsuite/include/mq_send.h 2009-08-07
11:28:41.000000000 +0530
@@ -0,0 +1,92 @@
+
+/*
+ * Copyright (c) 2002, Intel Corporation.
+ * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
+ * This file is licensed under the GPL license. For the full content
+ * of this license, see the COPYING file at the top level of this
+ * source tree.
+ */
+
+
+#include <sys/select.h>
+
+
+int sync_pipe_create(int fd[])
+{
+ return pipe (fd);
+}
+
+int sync_pipe_close(int fd[])
+{
+ int r = 0;
+
+ if (fd[0] != -1)
+ r = close (fd[0]);
+ if (fd[1] != -1)
+ r |= close (fd[1]);
+ return r;
+}
+
+int sync_pipe_wait(int fd[])
+{
+ char buf;
+ int r;
+
+ if (fd[1] != -1) {
+ close (fd[1]);
+ fd[1] = -1;
+ }
+
+ r = read (fd[0], &buf, 1);
+
+ if ((r != 1) || (buf != 'A'))
+ return -1;
+ return 0;
+}
+
+int sync_pipe_wait_select(int fd[], long tv_sec)
+{
+ char buf;
+ int r;
+ fd_set rfds;
+ struct timeval tv;
+ int err;
+
+ tv.tv_sec = tv_sec;
+ tv.tv_usec = 0;
+
+ if (fd[1] != -1) {
+ close (fd[1]);
+ fd[1] = -1;
+ }
+
+ FD_ZERO(&rfds);
+ FD_SET(fd[0], &rfds);
+
+ r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
+ err = errno;
+
+ if (FD_ISSET(fd[0], &rfds)) {
+ return sync_pipe_wait(fd);
+ }
+
+ return r ? err : -ETIMEDOUT;
+}
+
+
+int sync_pipe_notify(int fd[])
+{
+ char buf = 'A';
+ int r;
+
+ if (fd[0] != -1) {
+ close (fd[0]);
+ fd[0] = -1;
+ }
+
+ r = write (fd[1], &buf, 1);
+
+ if (r != 1)
+ return -1;
+ return 0;
+}
diff -Naurb a/testcases/open_posix_testsuite/include/posixtest.h
b/testcases/open_posix_testsuite/include/posixtest.h
--- a/testcases/open_posix_testsuite/include/posixtest.h 2009-08-06
21:49:42.000000000 +0530
+++ b/testcases/open_posix_testsuite/include/posixtest.h 2009-08-07
11:28:41.000000000 +0530
@@ -15,86 +15,3 @@
#define PTS_UNSUPPORTED 4
#define PTS_UNTESTED 5
-
-#include <sys/select.h>
-
-
-int sync_pipe_create(int fd[])
-{
- return pipe (fd);
-}
-
-int sync_pipe_close(int fd[])
-{
- int r = 0;
-
- if (fd[0] != -1)
- r = close (fd[0]);
- if (fd[1] != -1)
- r |= close (fd[1]);
- return r;
-}
-
-int sync_pipe_wait(int fd[])
-{
- char buf;
- int r;
-
- if (fd[1] != -1) {
- close (fd[1]);
- fd[1] = -1;
- }
-
- r = read (fd[0], &buf, 1);
-
- if ((r != 1) || (buf != 'A'))
- return -1;
- return 0;
-}
-
-int sync_pipe_wait_select(int fd[], long tv_sec)
-{
- char buf;
- int r;
- fd_set rfds;
- struct timeval tv;
- int err;
-
- tv.tv_sec = tv_sec;
- tv.tv_usec = 0;
-
- if (fd[1] != -1) {
- close (fd[1]);
- fd[1] = -1;
- }
-
- FD_ZERO(&rfds);
- FD_SET(fd[0], &rfds);
-
- r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
- err = errno;
-
- if (FD_ISSET(fd[0], &rfds)) {
- return sync_pipe_wait(fd);
- }
-
- return r ? err : -ETIMEDOUT;
-}
-
-
-int sync_pipe_notify(int fd[])
-{
- char buf = 'A';
- int r;
-
- if (fd[0] != -1) {
- close (fd[0]);
- fd[0] = -1;
- }
-
- r = write (fd[1], &buf, 1);
-
- if (r != 1)
- return -1;
- return 0;
-}
>
> Regards--
> Subrata
>
>> + * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
>> + * This file is licensed under the GPL license. For the full content
>> + * of this license, see the COPYING file at the top level of this
>> + * source tree.
>> + */
>> +
>> +
>> +#include <sys/select.h>
>> +
>> +
>> +int sync_pipe_create(int fd[])
>> +{
>> + return pipe (fd);
>> +}
>> +
>> +int sync_pipe_close(int fd[])
>> +{
>> + int r = 0;
>> +
>> + if (fd[0] != -1)
>> + r = close (fd[0]);
>> + if (fd[1] != -1)
>> + r |= close (fd[1]);
>> + return r;
>> +}
>> +
>> +int sync_pipe_wait(int fd[])
>> +{
>> + char buf;
>> + int r;
>> +
>> + if (fd[1] != -1) {
>> + close (fd[1]);
>> + fd[1] = -1;
>> + }
>> +
>> + r = read (fd[0], &buf, 1);
>> +
>> + if ((r != 1) || (buf != 'A'))
>> + return -1;
>> + return 0;
>> +}
>> +
>> +int sync_pipe_wait_select(int fd[], long tv_sec)
>> +{
>> + char buf;
>> + int r;
>> + fd_set rfds;
>> + struct timeval tv;
>> + int err;
>> +
>> + tv.tv_sec = tv_sec;
>> + tv.tv_usec = 0;
>> +
>> + if (fd[1] != -1) {
>> + close (fd[1]);
>> + fd[1] = -1;
>> + }
>> +
>> + FD_ZERO(&rfds);
>> + FD_SET(fd[0], &rfds);
>> +
>> + r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
>> + err = errno;
>> +
>> + if (FD_ISSET(fd[0], &rfds)) {
>> + return sync_pipe_wait(fd);
>> + }
>> +
>> + return r ? err : -ETIMEDOUT;
>> +}
>> +
>> +
>> +int sync_pipe_notify(int fd[])
>> +{
>> + char buf = 'A';
>> + int r;
>> +
>> + if (fd[0] != -1) {
>> + close (fd[0]);
>> + fd[0] = -1;
>> + }
>> +
>> + r = write (fd[1], &buf, 1);
>> +
>> + if (r != 1)
>> + return -1;
>> + return 0;
>> +}
>> diff -Naurb a/testcases/open_posix_testsuite/include/posixtest.h
>> b/testcases/open_posix_testsuite/include/posixtest.h
>> --- a/testcases/open_posix_testsuite/include/posixtest.h 2009-08-06
>> 21:49:42.000000000 +0530
>> +++ b/testcases/open_posix_testsuite/include/posixtest.h 2009-08-07
>> 11:28:41.000000000 +0530
>> @@ -15,86 +15,3 @@
>> #define PTS_UNSUPPORTED 4
>> #define PTS_UNTESTED 5
>>
>> -
>> -#include <sys/select.h>
>> -
>> -
>> -int sync_pipe_create(int fd[])
>> -{
>> - return pipe (fd);
>> -}
>> -
>> -int sync_pipe_close(int fd[])
>> -{
>> - int r = 0;
>> -
>> - if (fd[0] != -1)
>> - r = close (fd[0]);
>> - if (fd[1] != -1)
>> - r |= close (fd[1]);
>> - return r;
>> -}
>> -
>> -int sync_pipe_wait(int fd[])
>> -{
>> - char buf;
>> - int r;
>> -
>> - if (fd[1] != -1) {
>> - close (fd[1]);
>> - fd[1] = -1;
>> - }
>> -
>> - r = read (fd[0], &buf, 1);
>> -
>> - if ((r != 1) || (buf != 'A'))
>> - return -1;
>> - return 0;
>> -}
>> -
>> -int sync_pipe_wait_select(int fd[], long tv_sec)
>> -{
>> - char buf;
>> - int r;
>> - fd_set rfds;
>> - struct timeval tv;
>> - int err;
>> -
>> - tv.tv_sec = tv_sec;
>> - tv.tv_usec = 0;
>> -
>> - if (fd[1] != -1) {
>> - close (fd[1]);
>> - fd[1] = -1;
>> - }
>> -
>> - FD_ZERO(&rfds);
>> - FD_SET(fd[0], &rfds);
>> -
>> - r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
>> - err = errno;
>> -
>> - if (FD_ISSET(fd[0], &rfds)) {
>> - return sync_pipe_wait(fd);
>> - }
>> -
>> - return r ? err : -ETIMEDOUT;
>> -}
>> -
>> -
>> -int sync_pipe_notify(int fd[])
>> -{
>> - char buf = 'A';
>> - int r;
>> -
>> - if (fd[0] != -1) {
>> - close (fd[0]);
>> - fd[0] = -1;
>> - }
>> -
>> - r = write (fd[1], &buf, 1);
>> -
>> - if (r != 1)
>> - return -1;
>> - return 0;
>> -}
>
>
[-- Attachment #2: ltp-fix-mq_send_5-1.patch --]
[-- Type: application/octet-stream, Size: 4645 bytes --]
diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2008-12-12 18:26:25.000000000 +0530
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2009-08-07 11:29:42.000000000 +0530
@@ -37,6 +37,7 @@
#include <signal.h>
#include <errno.h>
#include "posixtest.h"
+#include "mq_send.h"
#define NAMESIZE 50
#define MSGSTR "0123456789"
diff -Naurb a/testcases/open_posix_testsuite/include/mq_send.h b/testcases/open_posix_testsuite/include/mq_send.h
--- a/testcases/open_posix_testsuite/include/mq_send.h 1970-01-01 05:30:00.000000000 +0530
+++ b/testcases/open_posix_testsuite/include/mq_send.h 2009-08-07 11:28:41.000000000 +0530
@@ -0,0 +1,92 @@
+
+/*
+ * Copyright (c) 2002, Intel Corporation.
+ * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
+ * This file is licensed under the GPL license. For the full content
+ * of this license, see the COPYING file at the top level of this
+ * source tree.
+ */
+
+
+#include <sys/select.h>
+
+
+int sync_pipe_create(int fd[])
+{
+ return pipe (fd);
+}
+
+int sync_pipe_close(int fd[])
+{
+ int r = 0;
+
+ if (fd[0] != -1)
+ r = close (fd[0]);
+ if (fd[1] != -1)
+ r |= close (fd[1]);
+ return r;
+}
+
+int sync_pipe_wait(int fd[])
+{
+ char buf;
+ int r;
+
+ if (fd[1] != -1) {
+ close (fd[1]);
+ fd[1] = -1;
+ }
+
+ r = read (fd[0], &buf, 1);
+
+ if ((r != 1) || (buf != 'A'))
+ return -1;
+ return 0;
+}
+
+int sync_pipe_wait_select(int fd[], long tv_sec)
+{
+ char buf;
+ int r;
+ fd_set rfds;
+ struct timeval tv;
+ int err;
+
+ tv.tv_sec = tv_sec;
+ tv.tv_usec = 0;
+
+ if (fd[1] != -1) {
+ close (fd[1]);
+ fd[1] = -1;
+ }
+
+ FD_ZERO(&rfds);
+ FD_SET(fd[0], &rfds);
+
+ r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
+ err = errno;
+
+ if (FD_ISSET(fd[0], &rfds)) {
+ return sync_pipe_wait(fd);
+ }
+
+ return r ? err : -ETIMEDOUT;
+}
+
+
+int sync_pipe_notify(int fd[])
+{
+ char buf = 'A';
+ int r;
+
+ if (fd[0] != -1) {
+ close (fd[0]);
+ fd[0] = -1;
+ }
+
+ r = write (fd[1], &buf, 1);
+
+ if (r != 1)
+ return -1;
+ return 0;
+}
diff -Naurb a/testcases/open_posix_testsuite/include/posixtest.h b/testcases/open_posix_testsuite/include/posixtest.h
--- a/testcases/open_posix_testsuite/include/posixtest.h 2009-08-06 21:49:42.000000000 +0530
+++ b/testcases/open_posix_testsuite/include/posixtest.h 2009-08-07 11:28:41.000000000 +0530
@@ -15,86 +15,3 @@
#define PTS_UNSUPPORTED 4
#define PTS_UNTESTED 5
-
-#include <sys/select.h>
-
-
-int sync_pipe_create(int fd[])
-{
- return pipe (fd);
-}
-
-int sync_pipe_close(int fd[])
-{
- int r = 0;
-
- if (fd[0] != -1)
- r = close (fd[0]);
- if (fd[1] != -1)
- r |= close (fd[1]);
- return r;
-}
-
-int sync_pipe_wait(int fd[])
-{
- char buf;
- int r;
-
- if (fd[1] != -1) {
- close (fd[1]);
- fd[1] = -1;
- }
-
- r = read (fd[0], &buf, 1);
-
- if ((r != 1) || (buf != 'A'))
- return -1;
- return 0;
-}
-
-int sync_pipe_wait_select(int fd[], long tv_sec)
-{
- char buf;
- int r;
- fd_set rfds;
- struct timeval tv;
- int err;
-
- tv.tv_sec = tv_sec;
- tv.tv_usec = 0;
-
- if (fd[1] != -1) {
- close (fd[1]);
- fd[1] = -1;
- }
-
- FD_ZERO(&rfds);
- FD_SET(fd[0], &rfds);
-
- r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
- err = errno;
-
- if (FD_ISSET(fd[0], &rfds)) {
- return sync_pipe_wait(fd);
- }
-
- return r ? err : -ETIMEDOUT;
-}
-
-
-int sync_pipe_notify(int fd[])
-{
- char buf = 'A';
- int r;
-
- if (fd[0] != -1) {
- close (fd[0]);
- fd[0] = -1;
- }
-
- r = write (fd[1], &buf, 1);
-
- if (r != 1)
- return -1;
- return 0;
-}
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
2009-08-07 7:59 ` naresh kamboju
2009-08-07 12:42 ` Subrata Modak
@ 2009-08-07 21:53 ` Brandon Philips
1 sibling, 0 replies; 9+ messages in thread
From: Brandon Philips @ 2009-08-07 21:53 UTC (permalink / raw)
To: naresh kamboju; +Cc: ltp-list, maxin john
On 13:29 Fri 07 Aug 2009, naresh kamboju wrote:
> I have noticed issues for patch applied on 12-Dec-2008.
> Because it is fixing the mq_send/5-1.c problem, but at the same time
> patch is affecting the building of few test cases in the same
> directory.
> I have listed the build log before and after the patch.
> So I have modified the patch such a way that it should not affect
> other test cases.
Acked-by: Brandon Philips <bphilips@suse.de>
Thanks for doing this.
Cheers,
Brandon
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
2009-08-07 15:43 ` naresh kamboju
@ 2009-08-07 21:54 ` Brandon Philips
2009-08-10 8:20 ` Subrata Modak
1 sibling, 0 replies; 9+ messages in thread
From: Brandon Philips @ 2009-08-07 21:54 UTC (permalink / raw)
To: naresh kamboju; +Cc: ltp-list, maxin john
On 21:13 Fri 07 Aug 2009, naresh kamboju wrote:
> ltp-fix-mq_send_5-1.patch
FYI, this attached patch uses Windows ^M line endings.
Cheers,
Brandon
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test
2009-08-07 15:43 ` naresh kamboju
2009-08-07 21:54 ` Brandon Philips
@ 2009-08-10 8:20 ` Subrata Modak
1 sibling, 0 replies; 9+ messages in thread
From: Subrata Modak @ 2009-08-10 8:20 UTC (permalink / raw)
To: naresh kamboju; +Cc: ltp-list, Brandon Philips, maxin john
> >
> > And then resend.
>
> I am resending the same patch after this change.
>
> Best regards,
> Naresh Kamboju
>
> Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
Thanks. Applied. However, they create the following avoidable issues.
Please take care next time while creating a patch :-)
(Stripping trailing CRs from patch.)
patching file
testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
(Stripping trailing CRs from patch.)
patching file testcases/open_posix_testsuite/include/mq_send.h
(Stripping trailing CRs from patch.)
patching file testcases/open_posix_testsuite/include/posixtest.h
Regards--
Subrata
>
> diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
> b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
> --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2008-12-12
> 18:26:25.000000000 +0530
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c 2009-08-07
> 11:29:42.000000000 +0530
> @@ -37,6 +37,7 @@
> #include <signal.h>
> #include <errno.h>
> #include "posixtest.h"
> +#include "mq_send.h"
>
> #define NAMESIZE 50
> #define MSGSTR "0123456789"
> diff -Naurb a/testcases/open_posix_testsuite/include/mq_send.h
> b/testcases/open_posix_testsuite/include/mq_send.h
> --- a/testcases/open_posix_testsuite/include/mq_send.h 1970-01-01
> 05:30:00.000000000 +0530
> +++ b/testcases/open_posix_testsuite/include/mq_send.h 2009-08-07
> 11:28:41.000000000 +0530
> @@ -0,0 +1,92 @@
> +
> +/*
> + * Copyright (c) 2002, Intel Corporation.
> + * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
> + * This file is licensed under the GPL license. For the full content
> + * of this license, see the COPYING file at the top level of this
> + * source tree.
> + */
> +
> +
> +#include <sys/select.h>
> +
> +
> +int sync_pipe_create(int fd[])
> +{
> + return pipe (fd);
> +}
> +
> +int sync_pipe_close(int fd[])
> +{
> + int r = 0;
> +
> + if (fd[0] != -1)
> + r = close (fd[0]);
> + if (fd[1] != -1)
> + r |= close (fd[1]);
> + return r;
> +}
> +
> +int sync_pipe_wait(int fd[])
> +{
> + char buf;
> + int r;
> +
> + if (fd[1] != -1) {
> + close (fd[1]);
> + fd[1] = -1;
> + }
> +
> + r = read (fd[0], &buf, 1);
> +
> + if ((r != 1) || (buf != 'A'))
> + return -1;
> + return 0;
> +}
> +
> +int sync_pipe_wait_select(int fd[], long tv_sec)
> +{
> + char buf;
> + int r;
> + fd_set rfds;
> + struct timeval tv;
> + int err;
> +
> + tv.tv_sec = tv_sec;
> + tv.tv_usec = 0;
> +
> + if (fd[1] != -1) {
> + close (fd[1]);
> + fd[1] = -1;
> + }
> +
> + FD_ZERO(&rfds);
> + FD_SET(fd[0], &rfds);
> +
> + r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
> + err = errno;
> +
> + if (FD_ISSET(fd[0], &rfds)) {
> + return sync_pipe_wait(fd);
> + }
> +
> + return r ? err : -ETIMEDOUT;
> +}
> +
> +
> +int sync_pipe_notify(int fd[])
> +{
> + char buf = 'A';
> + int r;
> +
> + if (fd[0] != -1) {
> + close (fd[0]);
> + fd[0] = -1;
> + }
> +
> + r = write (fd[1], &buf, 1);
> +
> + if (r != 1)
> + return -1;
> + return 0;
> +}
> diff -Naurb a/testcases/open_posix_testsuite/include/posixtest.h
> b/testcases/open_posix_testsuite/include/posixtest.h
> --- a/testcases/open_posix_testsuite/include/posixtest.h 2009-08-06
> 21:49:42.000000000 +0530
> +++ b/testcases/open_posix_testsuite/include/posixtest.h 2009-08-07
> 11:28:41.000000000 +0530
> @@ -15,86 +15,3 @@
> #define PTS_UNSUPPORTED 4
> #define PTS_UNTESTED 5
>
> -
> -#include <sys/select.h>
> -
> -
> -int sync_pipe_create(int fd[])
> -{
> - return pipe (fd);
> -}
> -
> -int sync_pipe_close(int fd[])
> -{
> - int r = 0;
> -
> - if (fd[0] != -1)
> - r = close (fd[0]);
> - if (fd[1] != -1)
> - r |= close (fd[1]);
> - return r;
> -}
> -
> -int sync_pipe_wait(int fd[])
> -{
> - char buf;
> - int r;
> -
> - if (fd[1] != -1) {
> - close (fd[1]);
> - fd[1] = -1;
> - }
> -
> - r = read (fd[0], &buf, 1);
> -
> - if ((r != 1) || (buf != 'A'))
> - return -1;
> - return 0;
> -}
> -
> -int sync_pipe_wait_select(int fd[], long tv_sec)
> -{
> - char buf;
> - int r;
> - fd_set rfds;
> - struct timeval tv;
> - int err;
> -
> - tv.tv_sec = tv_sec;
> - tv.tv_usec = 0;
> -
> - if (fd[1] != -1) {
> - close (fd[1]);
> - fd[1] = -1;
> - }
> -
> - FD_ZERO(&rfds);
> - FD_SET(fd[0], &rfds);
> -
> - r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
> - err = errno;
> -
> - if (FD_ISSET(fd[0], &rfds)) {
> - return sync_pipe_wait(fd);
> - }
> -
> - return r ? err : -ETIMEDOUT;
> -}
> -
> -
> -int sync_pipe_notify(int fd[])
> -{
> - char buf = 'A';
> - int r;
> -
> - if (fd[0] != -1) {
> - close (fd[0]);
> - fd[0] = -1;
> - }
> -
> - r = write (fd[1], &buf, 1);
> -
> - if (r != 1)
> - return -1;
> - return 0;
> -}
>
> >
> > Regards--
> > Subrata
> >
> >> + * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
> >> + * This file is licensed under the GPL license. For the full content
> >> + * of this license, see the COPYING file at the top level of this
> >> + * source tree.
> >> + */
> >> +
> >> +
> >> +#include <sys/select.h>
> >> +
> >> +
> >> +int sync_pipe_create(int fd[])
> >> +{
> >> + return pipe (fd);
> >> +}
> >> +
> >> +int sync_pipe_close(int fd[])
> >> +{
> >> + int r = 0;
> >> +
> >> + if (fd[0] != -1)
> >> + r = close (fd[0]);
> >> + if (fd[1] != -1)
> >> + r |= close (fd[1]);
> >> + return r;
> >> +}
> >> +
> >> +int sync_pipe_wait(int fd[])
> >> +{
> >> + char buf;
> >> + int r;
> >> +
> >> + if (fd[1] != -1) {
> >> + close (fd[1]);
> >> + fd[1] = -1;
> >> + }
> >> +
> >> + r = read (fd[0], &buf, 1);
> >> +
> >> + if ((r != 1) || (buf != 'A'))
> >> + return -1;
> >> + return 0;
> >> +}
> >> +
> >> +int sync_pipe_wait_select(int fd[], long tv_sec)
> >> +{
> >> + char buf;
> >> + int r;
> >> + fd_set rfds;
> >> + struct timeval tv;
> >> + int err;
> >> +
> >> + tv.tv_sec = tv_sec;
> >> + tv.tv_usec = 0;
> >> +
> >> + if (fd[1] != -1) {
> >> + close (fd[1]);
> >> + fd[1] = -1;
> >> + }
> >> +
> >> + FD_ZERO(&rfds);
> >> + FD_SET(fd[0], &rfds);
> >> +
> >> + r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
> >> + err = errno;
> >> +
> >> + if (FD_ISSET(fd[0], &rfds)) {
> >> + return sync_pipe_wait(fd);
> >> + }
> >> +
> >> + return r ? err : -ETIMEDOUT;
> >> +}
> >> +
> >> +
> >> +int sync_pipe_notify(int fd[])
> >> +{
> >> + char buf = 'A';
> >> + int r;
> >> +
> >> + if (fd[0] != -1) {
> >> + close (fd[0]);
> >> + fd[0] = -1;
> >> + }
> >> +
> >> + r = write (fd[1], &buf, 1);
> >> +
> >> + if (r != 1)
> >> + return -1;
> >> + return 0;
> >> +}
> >> diff -Naurb a/testcases/open_posix_testsuite/include/posixtest.h
> >> b/testcases/open_posix_testsuite/include/posixtest.h
> >> --- a/testcases/open_posix_testsuite/include/posixtest.h 2009-08-06
> >> 21:49:42.000000000 +0530
> >> +++ b/testcases/open_posix_testsuite/include/posixtest.h 2009-08-07
> >> 11:28:41.000000000 +0530
> >> @@ -15,86 +15,3 @@
> >> #define PTS_UNSUPPORTED 4
> >> #define PTS_UNTESTED 5
> >>
> >> -
> >> -#include <sys/select.h>
> >> -
> >> -
> >> -int sync_pipe_create(int fd[])
> >> -{
> >> - return pipe (fd);
> >> -}
> >> -
> >> -int sync_pipe_close(int fd[])
> >> -{
> >> - int r = 0;
> >> -
> >> - if (fd[0] != -1)
> >> - r = close (fd[0]);
> >> - if (fd[1] != -1)
> >> - r |= close (fd[1]);
> >> - return r;
> >> -}
> >> -
> >> -int sync_pipe_wait(int fd[])
> >> -{
> >> - char buf;
> >> - int r;
> >> -
> >> - if (fd[1] != -1) {
> >> - close (fd[1]);
> >> - fd[1] = -1;
> >> - }
> >> -
> >> - r = read (fd[0], &buf, 1);
> >> -
> >> - if ((r != 1) || (buf != 'A'))
> >> - return -1;
> >> - return 0;
> >> -}
> >> -
> >> -int sync_pipe_wait_select(int fd[], long tv_sec)
> >> -{
> >> - char buf;
> >> - int r;
> >> - fd_set rfds;
> >> - struct timeval tv;
> >> - int err;
> >> -
> >> - tv.tv_sec = tv_sec;
> >> - tv.tv_usec = 0;
> >> -
> >> - if (fd[1] != -1) {
> >> - close (fd[1]);
> >> - fd[1] = -1;
> >> - }
> >> -
> >> - FD_ZERO(&rfds);
> >> - FD_SET(fd[0], &rfds);
> >> -
> >> - r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
> >> - err = errno;
> >> -
> >> - if (FD_ISSET(fd[0], &rfds)) {
> >> - return sync_pipe_wait(fd);
> >> - }
> >> -
> >> - return r ? err : -ETIMEDOUT;
> >> -}
> >> -
> >> -
> >> -int sync_pipe_notify(int fd[])
> >> -{
> >> - char buf = 'A';
> >> - int r;
> >> -
> >> - if (fd[0] != -1) {
> >> - close (fd[0]);
> >> - fd[0] = -1;
> >> - }
> >> -
> >> - r = write (fd[1], &buf, 1);
> >> -
> >> - if (r != 1)
> >> - return -1;
> >> - return 0;
> >> -}
> >
> >
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-08-10 8:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 7:05 [LTP] [PATCH v2] mq_send/5-1.c: Fix race conditions in the test naresh kamboju
2009-07-21 4:45 ` Brandon Philips
2009-07-21 13:22 ` naresh kamboju
2009-08-07 7:59 ` naresh kamboju
2009-08-07 12:42 ` Subrata Modak
2009-08-07 15:43 ` naresh kamboju
2009-08-07 21:54 ` Brandon Philips
2009-08-10 8:20 ` Subrata Modak
2009-08-07 21:53 ` Brandon Philips
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox