From: "Mitani" <mitani@ryobi.co.jp>
To: ltp-list@lists.sourceforge.net
Cc: "當座 健市" <toza@ryobi.co.jp>
Subject: [LTP] [PATCH] fix two "2-1.c" tests of POSIX
Date: Wed, 18 Aug 2010 16:13:36 +0900 [thread overview]
Message-ID: <000001cb3ea4$e05de680$a119b380$@co.jp> (raw)
[-- Attachment #1: Type: text/plain, Size: 3193 bytes --]
Hi,
I tried to build open_posix_testsuite testcases with latest git:
ltp-dev-e8ad463baada21fb19f4c06f7dcab75c420ae373.tar.gz
Several testcases failed to build.
Two of them is as follows:
------------
[...]
conformance/interfaces/pthread_attr_setstack/2-1 compile FAILED
In file included from
../../../conformance/interfaces/pthread_attr_setstack/2-1.c:31:
../../../include/posixtest.h:14:2: error: #error "Contains GNU-isms that
need fixing."
[...]
conformance/interfaces/pthread_attr_setstacksize/2-1 compile FAILED
In file included from
../../../conformance/interfaces/pthread_attr_setstacksize/2-1.c:31:
../../../include/posixtest.h:14:2: error: #error "Contains GNU-isms that
need fixing."
[...]
------------
".../pthread_attr_setstack/2-1.c" and ".../include/posixtest.h" are
as follows:
------------(.../pthread_attr_setstack/2-1.c)
[...]
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <pthread.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/param.h>
#include <errno.h>
#include <unistd.h>
#include "posixtest.h"
[...]
------------
------------(posixtest.h)
[...]
#if defined(_GNU_SOURCE)
#error "Contains GNU-isms that need fixing."
#elif defined(_BSD_SOURCE)
#error "Contains BSD-isms that need fixing."
#endif
[...]
------------
In above "2-1.c", "_GNU_SOURCE" is defined. After that, "posixtest.h"
is included.
And, in "posixtest.h", if "_GNU_SOURCE" is defined, error occurs.
If "#ifndef _GNU_SOURCE" is arranged after a line of "posixtest.h",
error doesn't occur.
I confirmed that build succeeded by this revision and the test
became PASS.
Another "2-1.c" is same as above testcase.
Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
============
---
a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstac
k/2-1.c 2010-08-18 07:18:35.000000000 +0900
+++
b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstac
k/2-1.c 2010-08-18 15:43:16.000000000 +0900
@@ -17,9 +17,6 @@
* provided by nptl, which is developed by Ulrich Drepper.
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <pthread.h>
#include <limits.h>
#include <stdio.h>
@@ -30,6 +27,10 @@
#include <unistd.h>
#include "posixtest.h"
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#define TEST "2-1"
#define FUNCTION "pthread_attr_setstack"
#define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
---
a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstac
ksize/2-1.c 2010-08-18 07:18:35.000000000 +0900
+++
b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstac
ksize/2-1.c 2010-08-18 15:44:56.000000000 +0900
@@ -17,9 +17,6 @@
* provided by nptl, which is developed by Ulrich Drepper.
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <pthread.h>
#include <limits.h>
#include <stdio.h>
@@ -30,6 +27,10 @@
#include <unistd.h>
#include "posixtest.h"
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#define TEST "2-1"
#define FUNCTION "pthread_attr_setstacksize"
#define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
============
Regards--
-Tomonori Mitani
[-- Attachment #2: 2-1.patch --]
[-- Type: application/octet-stream, Size: 1456 bytes --]
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/2-1.c 2010-08-18 07:18:35.000000000 +0900
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/2-1.c 2010-08-18 15:43:16.000000000 +0900
@@ -17,9 +17,6 @@
* provided by nptl, which is developed by Ulrich Drepper.
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <pthread.h>
#include <limits.h>
#include <stdio.h>
@@ -30,6 +27,10 @@
#include <unistd.h>
#include "posixtest.h"
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#define TEST "2-1"
#define FUNCTION "pthread_attr_setstack"
#define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/2-1.c 2010-08-18 07:18:35.000000000 +0900
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/2-1.c 2010-08-18 15:44:56.000000000 +0900
@@ -17,9 +17,6 @@
* provided by nptl, which is developed by Ulrich Drepper.
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <pthread.h>
#include <limits.h>
#include <stdio.h>
@@ -30,6 +27,10 @@
#include <unistd.h>
#include "posixtest.h"
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#define TEST "2-1"
#define FUNCTION "pthread_attr_setstacksize"
#define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
[-- Attachment #3: Type: text/plain, Size: 224 bytes --]
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
[-- 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
next reply other threads:[~2010-08-18 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 7:13 Mitani [this message]
2010-08-18 7:24 ` [LTP] [PATCH] fix two "2-1.c" tests of POSIX Garrett Cooper
2010-08-24 7:31 ` Mitani
2010-08-18 16:51 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001cb3ea4$e05de680$a119b380$@co.jp' \
--to=mitani@ryobi.co.jp \
--cc=ltp-list@lists.sourceforge.net \
--cc=toza@ryobi.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox