From: Garrett C. <ris...@li...> - 2010-06-20 21:15:44
|
The branch, pu, has been updated via 796175696e5a0bdef6a0a0de6dd4ffd3208c9d23 (commit) via 866fc6a28d590ad871c50a0afb05c6d1ace6b260 (commit) via e79cac0c77edf6ad9361abfe53302fe88b6338b7 (commit) via 7489873d46f8428f71a413629e427f39ff8c4db8 (commit) via 91325b11bbfeb29a4a9dd28f46dd7de0b5e24177 (commit) via 8d785b4e9eda424552e5bd87883826c615c10f8d (commit) via d49548d6749359c86d4ac2a5a22a3f5fad383ba5 (commit) from cfa4725eebab047fed5abe607404eb21a1a30619 (commit) - Log ----------------------------------------------------------------- commit 796175696e5a0bdef6a0a0de6dd4ffd3208c9d23 Author: Garrett Cooper <yan...@gm...> Date: Sun Jun 20 14:13:23 2010 -0700 Remove dead file. Signed-off-by: Garrett Cooper <yan...@gm...> commit 866fc6a28d590ad871c50a0afb05c6d1ace6b260 Author: Garrett Cooper <yan...@gm...> Date: Sun Jun 20 14:12:52 2010 -0700 Note GNU-isms. Signed-off-by: Garrett Cooper <yan...@gm...> commit e79cac0c77edf6ad9361abfe53302fe88b6338b7 Author: Garrett Cooper <yan...@gm...> Date: Sun Jun 20 14:10:30 2010 -0700 Remove gmake-isms. Improve diags during the build. Signed-off-by: Garrett Cooper <yan...@gm...> commit 7489873d46f8428f71a413629e427f39ff8c4db8 Author: Garrett Cooper <yan...@gm...> Date: Sun Jun 20 14:07:42 2010 -0700 Remove gmake-isms; don't assume make is GNU make. Signed-off-by: Garrett Cooper <yan...@gm...> commit 91325b11bbfeb29a4a9dd28f46dd7de0b5e24177 Author: Garrett Cooper <yan...@gm...> Date: Sun Jun 20 13:52:41 2010 -0700 Remove some gmake-isms. Signed-off-by: Garrett Cooper <yan...@gm...> commit 8d785b4e9eda424552e5bd87883826c615c10f8d Author: Garrett Cooper <yan...@gm...> Date: Sun Jun 20 13:51:45 2010 -0700 Block off and note all Linux-isms. Signed-off-by: Garrett Cooper <yan...@gm...> commit d49548d6749359c86d4ac2a5a22a3f5fad383ba5 Author: Garrett Cooper <yan...@gm...> Date: Sun Jun 20 13:29:53 2010 -0700 Note GNU-isms in code that need replacing. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/open_posix_testsuite/GNUmakefile | 16 ++++++++------ .../functional/threads/GNUmakefile | 17 +++++++-------- .../functional/threads/Makefile.inc | 8 ------- .../functional/threads/condvar/GNUmakefile | 11 +++------ .../functional/threads/pi_test/GNUmakefile | 12 ++++------ .../functional/threads/pi_test/pitest-1.c | 20 ++++++++++++------ .../functional/threads/pi_test/pitest-2.c | 17 ++++++++++----- .../functional/threads/pi_test/pitest-3.c | 9 ++++++- .../functional/threads/pi_test/pitest-4.c | 15 ++++++++----- .../functional/threads/pi_test/pitest-5.c | 21 ++++++++++++------- .../functional/threads/pi_test/pitest-6.c | 19 +++++++++++------ .../functional/threads/robust_test/GNUmakefile | 13 +++++------ .../functional/threads/robust_test/robust1-mode2.c | 11 ++++++++- .../functional/threads/robust_test/robust1-sun.c | 12 +++++++++- .../functional/threads/robust_test/robust2-mode2.c | 11 ++++++++- .../functional/threads/robust_test/robust2-sun.c | 12 +++++++++- .../functional/threads/robust_test/robust3-mode2.c | 11 ++++++++- .../functional/threads/schedule/GNUmakefile | 9 +++---- .../functional/timers/GNUmakefile | 11 ++++----- 19 files changed, 153 insertions(+), 102 deletions(-) delete mode 100644 testcases/open_posix_testsuite/functional/threads/Makefile.inc diff --git a/testcases/open_posix_testsuite/GNUmakefile b/testcases/open_posix_testsuite/GNUmakefile index 43df8aa..e1775ff 100644 --- a/testcases/open_posix_testsuite/GNUmakefile +++ b/testcases/open_posix_testsuite/GNUmakefile @@ -78,13 +78,14 @@ clean: TEST=`echo "$@" | sed -e 's,.test$$,,'`; \ [ -f $< ] || exit 0; \ { nm -g $< | grep -q ' T main\| D main'; } || \ - { echo "$$TEST: link: SKIP" | tee -a $(LOGFILE) && exit 0; }; \ + { echo "$$TEST: link: SKIP" >> $(LOGFILE) && exit 0; }; \ if $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -o $@ >$$COMPLOG 2>&1; \ then \ - echo "$$TEST: link: PASS" | tee -a $(LOGFILE); \ + echo "$$TEST: link: PASS" >> $(LOGFILE); \ + echo "$$TEST: link: PASS"; \ else \ ( \ - echo "$(@:.test=): link: FAILED. Linker output: "; \ + echo "$$TEST: link: FAILED. Linker output: "; \ cat $$COMPLOG; \ ) >> $(LOGFILE); \ echo "$$TEST: link: FAILED "; \ @@ -121,7 +122,7 @@ clean: MSG="INTERRUPTED"; \ elif [ $$RESULT -eq 0 ]; \ then \ - echo "$$TEST: execution: PASS" | tee -a $(LOGFILE); \ + echo "$$TEST: execution: PASS" >> $(LOGFILE); \ else \ ( \ echo "$$TEST: execution: $$MSG: Output: "; \ @@ -146,7 +147,7 @@ $(top_builddir)/t0.val: $(top_builddir)/t0 RESULT=$$?; \ if [ $$RESULT -eq 0 ]; \ then \ - echo "$$TEST: execution: PASS" | tee -a $(LOGFILE);\ + echo "$$TEST: execution: PASS" >> $(LOGFILE);\ else \ ( \ echo "$$TEST: execution: FAILED: Output: ";\ @@ -163,7 +164,8 @@ $(top_builddir)/t0.val: $(top_builddir)/t0 TEST=`echo "$@" | sed -e 's,.o$$,,'`; \ if $(COMPILE.c) $(OUTPUT_OPTION) $< >$$COMPLOG 2>&1; \ then \ - echo "$$TEST: build: PASS" | tee -a $(LOGFILE); \ + echo "$$TEST: build: PASS" >> $(LOGFILE); \ + echo "$$TEST: build: PASS"; \ else \ ( \ echo "$$TEST: build: FAILED: Compiler output: "; \ @@ -184,7 +186,7 @@ functional-make: functional-run: $(FUNCTIONAL_RUN) $(FUNCTIONAL_RUN): - cd $@; ./run.sh + cd $@ && ./run.sh stress-make: for d in $(STRESS_MAKE); do \ diff --git a/testcases/open_posix_testsuite/functional/threads/GNUmakefile b/testcases/open_posix_testsuite/functional/threads/GNUmakefile index 733cb69..04e94df 100644 --- a/testcases/open_posix_testsuite/functional/threads/GNUmakefile +++ b/testcases/open_posix_testsuite/functional/threads/GNUmakefile @@ -1,13 +1,12 @@ -include Makefile.inc -SUBDIRS=robust_test pi_test +SUBDIRS= robust_test pi_test -.PHONY : all +all install: + for d in $(SUBDIRS); do \ + $(MAKE) -C $$d $@; \ + done -all: - $(foreach SUBDIR,$(SUBDIRS),make -C $(SUBDIR);) -install: - $(foreach SUBDIR,$(SUBDIRS),make -C $(SUBDIR) install;) clean: rm -f *~ - $(foreach SUBDIR,$(SUBDIRS),make -C $(SUBDIR) clean;) - + for d in $(SUBDIRS); do \ + $(MAKE) -C $$d $@; \ + done diff --git a/testcases/open_posix_testsuite/functional/threads/Makefile.inc b/testcases/open_posix_testsuite/functional/threads/Makefile.inc deleted file mode 100644 index 9c781e8..0000000 --- a/testcases/open_posix_testsuite/functional/threads/Makefile.inc +++ /dev/null @@ -1,8 +0,0 @@ -# -# Include this file in your Makefile for linking against the built NPTL -# and GLIBC -# -# NOTE: Before making the test suite, you need to build glibc. $LIBC_PATCH -# stands for the path of GLIBC, please export it first. - -LDFLAGS += -lpthread diff --git a/testcases/open_posix_testsuite/functional/threads/condvar/GNUmakefile b/testcases/open_posix_testsuite/functional/threads/condvar/GNUmakefile index fd08a4e..c5cae98 100644 --- a/testcases/open_posix_testsuite/functional/threads/condvar/GNUmakefile +++ b/testcases/open_posix_testsuite/functional/threads/condvar/GNUmakefile @@ -4,14 +4,11 @@ # of this license, see the COPYING file at the top level of this # source tree. -CFLAGS := -Wall -I../../../include -O2 -LDFLAGS := -lpthread -lrt - -include /opt/libc/Makefile.inc - -TARGETS := pthread_cond_wait_1 pthread_cond_wait_2 +CFLAGS= -I../../../include +LDLIBS= -lpthread -lrt +TARGETS= pthread_cond_wait_1 pthread_cond_wait_2 all: $(TARGETS) clean: - rm -f $(TARGETS) + -rm -f $(TARGETS) diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/GNUmakefile b/testcases/open_posix_testsuite/functional/threads/pi_test/GNUmakefile index dde0684..7423b04 100644 --- a/testcases/open_posix_testsuite/functional/threads/pi_test/GNUmakefile +++ b/testcases/open_posix_testsuite/functional/threads/pi_test/GNUmakefile @@ -1,10 +1,8 @@ -include ../Makefile.inc +CFLAGS+= -I../include +LDLIBS= -lpthread +TARGETS= pitest-1 pitest-2 pitest-3 pitest-4 pitest-5 pitest-6 -SRCS=$(wildcard *.c) -TARGETS=$(patsubst %.c,%,$(SRCS)) -CFLAGS+=-Wall -D_GNU_SOURCE -g -I../include - -all:$(TARGETS) +all: $(TARGETS) clean: - rm -rf $(TARGETS) + -rm -rf $(TARGETS) diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-1.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-1.c index 5b51aea..b8969a8 100644 --- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-1.c +++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-1.c @@ -33,14 +33,17 @@ * Thanks Inaky.Perez-Gonzalez's suggestion and code */ + +#warning "Contains Linux-isms that need fixing." + +#include <errno.h> #include <pthread.h> +#include <sched.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> #include <time.h> -#include <sched.h> -#include <errno.h> +#include <unistd.h> #include "test.h" #include "pitest.h" @@ -62,10 +65,9 @@ struct thread_param volatile unsigned futex; volatile unsigned should_stall; volatile unsigned progress; -} tp[] = -{ +} tp[] = { { 0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 }, - { 1, 0, 50, 2, SCHED_FIFO, "TP", 0, 0, 0, 0 }, + { 1, 0, 50, 2, SCHED_FIFO, "TP", 0, 0, 0, 0 }, { 2, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0 }, { 3, 0, 0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0 }, { 4, 0, 0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0 }, @@ -97,12 +99,14 @@ void *thread_fn(void *param) int rc; unsigned long mask = 1 << tp->cpu; +#if __linux__ rc = sched_setaffinity(0, sizeof(mask), &mask); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: " "%d %s", tp->name, tp->index, rc, strerror(rc)); exit(UNRESOLVED); } +#endif test_set_priority(pthread_self(), SCHED_FIFO, tp->priority); DPRINTF(stdout, "#EVENT %f %s Thread Started\n", @@ -133,7 +137,9 @@ void *thread_tl(void *param) unsigned long mask = 1 << tp->cpu; int rc; +#if __linux__ rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask); +#endif test_set_priority(pthread_self(), SCHED_FIFO, tp->priority); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s", diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c index b565af1..47b8591 100644 --- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c +++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c @@ -35,14 +35,16 @@ * */ +#warning "Contains Linux-isms that need fixing." + +#include <errno.h> #include <pthread.h> +#include <sched.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> #include <time.h> -#include <sched.h> -#include <errno.h> +#include <unistd.h> #include "test.h" #include "pitest.h" @@ -63,8 +65,7 @@ struct thread_param volatile unsigned futex; volatile unsigned should_stall; volatile unsigned progress; -} tp[] = -{ +} tp[] = { { 0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 }, { 1, 0, 100, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0 }, { 2, 0, 100, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0 }, @@ -99,7 +100,9 @@ void *thread_fn(void *param) int rc; unsigned long mask = 1 << tp->cpu; +#if __linux__ rc = sched_setaffinity(0, sizeof(mask), &mask); +#endif if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: " "%d %s", tp->name, tp->index, rc, strerror(rc)); @@ -134,7 +137,9 @@ void *thread_tl(void *param) unsigned long mask = 1 << tp->cpu; int rc; +#if __linux__ rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask); +#endif test_set_priority(pthread_self(),SCHED_FIFO, tp->priority); DPRINTF(stdout, "#EVENT %f Thread TL Started\n", diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c index a331c3b..0826a55 100644 --- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c +++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c @@ -35,6 +35,8 @@ * */ +#warning "Contains Linux-isms that need fixing." + #include <pthread.h> #include <stdio.h> #include <unistd.h> @@ -64,8 +66,7 @@ struct thread_param volatile unsigned futex; volatile unsigned should_stall; volatile unsigned progress; -} tp[] = -{ +} tp[] = { { 0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 }, { 1, 0, 100, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0 }, { 1, 0, 100, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0 }, @@ -101,12 +102,14 @@ void *thread_fn(void *param) int rc; unsigned long mask = 1 << tp->cpu; +#if __linux__ rc = sched_setaffinity(0, sizeof(mask), &mask); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: " "%d %s", tp->name, tp->index, rc, strerror(rc)); exit(UNRESOLVED); } +#endif test_set_priority(pthread_self(),SCHED_FIFO, tp->priority); DPRINTF(stdout, "#EVENT %f Thread %s Started\n", @@ -140,12 +143,14 @@ void *thread_tl(void *param) unsigned long mask = 1 << tp->cpu; int rc; +#if __linux__ rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s", tp->name, tp->index, rc, strerror(rc)); exit(UNRESOLVED); } +#endif test_set_priority(pthread_self(),SCHED_FIFO, tp->priority); DPRINTF(stdout, "#EVENT %f Thread TL Started\n", diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-4.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-4.c index 75c11a2..5259eb7 100644 --- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-4.c +++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-4.c @@ -36,14 +36,16 @@ * */ +#warning "Contains Linux-isms that need fixing." + +#include <errno.h> #include <pthread.h> +#include <sched.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> #include <time.h> -#include <sched.h> -#include <errno.h> +#include <unistd.h> #include "test.h" #include "pitest.h" @@ -65,8 +67,7 @@ struct thread_param volatile unsigned futex; volatile unsigned should_stall; volatile unsigned progress; -} tp[] = -{ +} tp[] = { { 0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 }, { 1, 0, 100, 3, SCHED_FIFO, "TP", 0, 0, 0, 0 }, { 2, 0, 0, 4, SCHED_FIFO, "TF", 1, 0, 0, 0 }, @@ -101,12 +102,14 @@ void *thread_fn(void *param) int rc; unsigned long mask = 1 << tp->cpu; +#if __linux__ rc = sched_setaffinity(0, sizeof(mask), &mask); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: " "%d %s", tp->name, tp->index, rc, strerror(rc)); exit(UNRESOLVED); } +#endif test_set_priority(pthread_self(),SCHED_FIFO, tp->priority); DPRINTF(stdout, "#EVENT %f Thread %s Started\n", diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-5.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-5.c index 9e41fe8..ae8e17e 100644 --- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-5.c +++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-5.c @@ -34,14 +34,16 @@ * NOTE: Most of the code is ported from test-11 written by inkay. */ +#warning "Contains Linux-isms that need fixing." + +#include <errno.h> #include <pthread.h> +#include <sched.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> #include <time.h> -#include <sched.h> -#include <errno.h> +#include <unistd.h> #include "test.h" #include "pitest.h" @@ -63,8 +65,7 @@ struct thread_param volatile unsigned futex; volatile unsigned should_stall; volatile unsigned progress; -} tp[] = -{ +} tp[] = { { 0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 }, { 1, 0, 200, 2, SCHED_FIFO, "TP", 0, 0, 0, 0 }, { 2, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0 }, @@ -100,13 +101,15 @@ void *thread_fn(void *param) unsigned long mask = 1 << tp->cpu; test_set_priority(pthread_self(),SCHED_FIFO, tp->priority); +#if __linux__ rc = sched_setaffinity(0, sizeof(mask), &mask); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: " "%d %s", tp->name, tp->index, rc, strerror(rc)); exit(UNRESOLVED); } - +#endif + DPRINTF(stdout, "#EVENT %f Thread %s started\n", seconds_read() - base_time, tp->name); DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index); @@ -139,13 +142,15 @@ void *thread_tl(void *param) int rc; test_set_priority(pthread_self(),SCHED_FIFO, tp->priority); +#if __linux__ rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s", tp->name, tp->index, rc, strerror(rc)); exit(UNRESOLVED); } - +#endif + DPRINTF(stdout, "#EVENT %f Thread TL started\n", seconds_read() - base_time); DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index); diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-6.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-6.c index c9028ab..dfd2253 100644 --- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-6.c +++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-6.c @@ -33,14 +33,16 @@ * NOTE: Most of the code is ported from test-11 written by inkay. */ +#warning "Contains Linux-isms that need fixing." + +#include <errno.h> #include <pthread.h> +#include <sched.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> #include <time.h> -#include <sched.h> -#include <errno.h> +#include <unistd.h> #include "test.h" #include "pitest.h" @@ -61,8 +63,7 @@ struct thread_param volatile unsigned futex; volatile unsigned should_stall; volatile unsigned progress; -} tp[] = -{ +} tp[] = { { 0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 }, { 1, 0, 200, 2, SCHED_FIFO, "TP", 0, 0, 0, 0 }, { 2, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0 }, @@ -96,12 +97,14 @@ void *thread_fn(void *param) int rc; unsigned long mask = 1 << tp->cpu; +#if __linux__ rc = sched_setaffinity(0, sizeof(mask), &mask); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: " "%d %s", tp->name, tp->index, rc, strerror(rc)); exit(UNRESOLVED); } +#endif test_set_priority(pthread_self(), SCHED_FIFO, tp->priority); DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index); DPRINTF(stdout, "#EVENT %f Thread %s Started\n", @@ -133,13 +136,15 @@ void *thread_tl(void *param) unsigned long mask = 1 << tp->cpu; int rc; +#if __linux__ rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask); if (rc < 0) { EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s", tp->name, tp->index, rc, strerror(rc)); exit(UNRESOLVED); } - +#endif + test_set_priority(pthread_self(), SCHED_FIFO, tp->priority); DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index); diff --git a/testcases/open_posix_testsuite/functional/threads/robust_test/GNUmakefile b/testcases/open_posix_testsuite/functional/threads/robust_test/GNUmakefile index b296317..e4490cf 100644 --- a/testcases/open_posix_testsuite/functional/threads/robust_test/GNUmakefile +++ b/testcases/open_posix_testsuite/functional/threads/robust_test/GNUmakefile @@ -1,10 +1,9 @@ -include ../Makefile.inc +CFLAGS+= -I../include +LDLIBS= -lpthread +TARGETS= robust1-mode2 robust1-sun robust2-mode2 robust2-sun \ + robust3-mode2 -SRCS=$(wildcard *.c) -TARGETS=$(patsubst %.c,%,$(SRCS)) -CFLAGS+=-Wall -g -I../include - -all:$(TARGETS) +all: $(TARGETS) clean: - rm -rf $(TARGETS) + -rm -rf $(TARGETS) diff --git a/testcases/open_posix_testsuite/functional/threads/robust_test/robust1-mode2.c b/testcases/open_posix_testsuite/functional/threads/robust_test/robust1-mode2.c index 48a9f34..b75f319 100644 --- a/testcases/open_posix_testsuite/functional/threads/robust_test/robust1-mode2.c +++ b/testcases/open_posix_testsuite/functional/threads/robust_test/robust1-mode2.c @@ -15,11 +15,18 @@ * ENOTRECOVERABLE state after unlock. */ +/* + * XXX: pthread_mutexattr_setrobust_np and PTHREAD_MUTEX_ROBUST_NP isn't POSIX. + */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#warning "Uses GNU-isms; needs fixing." +#endif #include <pthread.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> +#include <unistd.h> #include "test.h" #define THREAD_NUM 2 diff --git a/testcases/open_posix_testsuite/functional/threads/robust_test/robust1-sun.c b/testcases/open_posix_testsuite/functional/threads/robust_test/robust1-sun.c index 933f25b..b71b650 100644 --- a/testcases/open_posix_testsuite/functional/threads/robust_test/robust1-sun.c +++ b/testcases/open_posix_testsuite/functional/threads/robust_test/robust1-sun.c @@ -14,11 +14,19 @@ * ENOTRECOVERABLE state when unlocked automatically. */ +/* + * XXX: pthread_mutexattr_setrobust_np and PTHREAD_MUTEX_ROBUST_SUN_NP isn't + * POSIX. + */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#warning "Uses GNU-isms; needs fixing." +#endif #include <pthread.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> +#include <unistd.h> #include "test.h" #define THREAD_NUM 2 diff --git a/testcases/open_posix_testsuite/functional/threads/robust_test/robust2-mode2.c b/testcases/open_posix_testsuite/functional/threads/robust_test/robust2-mode2.c index 2e34a93..a54cf38 100644 --- a/testcases/open_posix_testsuite/functional/threads/robust_test/robust2-mode2.c +++ b/testcases/open_posix_testsuite/functional/threads/robust_test/robust2-mode2.c @@ -16,11 +16,18 @@ * will change back to normal. */ +/* + * XXX: pthread_mutexattr_setrobust_np and PTHREAD_MUTEX_ROBUST_NP isn't POSIX. + */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#warning "Uses GNU-isms; needs fixing." +#endif #include <pthread.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> +#include <unistd.h> #include "test.h" #define THREAD_NUM 2 diff --git a/testcases/open_posix_testsuite/functional/threads/robust_test/robust2-sun.c b/testcases/open_posix_testsuite/functional/threads/robust_test/robust2-sun.c index 43ed368..2532194 100644 --- a/testcases/open_posix_testsuite/functional/threads/robust_test/robust2-sun.c +++ b/testcases/open_posix_testsuite/functional/threads/robust_test/robust2-sun.c @@ -17,11 +17,19 @@ * will remain as EOWNERDEAD. */ +/* + * XXX: pthread_mutexattr_setrobust_np and PTHREAD_MUTEX_ROBUST_SUN_NP isn't + * POSIX. + */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#warning "Uses GNU-isms; needs fixing." +#endif #include <pthread.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> +#include <unistd.h> #include "test.h" #define THREAD_NUM 2 diff --git a/testcases/open_posix_testsuite/functional/threads/robust_test/robust3-mode2.c b/testcases/open_posix_testsuite/functional/threads/robust_test/robust3-mode2.c index 94f70a0..8facd26 100644 --- a/testcases/open_posix_testsuite/functional/threads/robust_test/robust3-mode2.c +++ b/testcases/open_posix_testsuite/functional/threads/robust_test/robust3-mode2.c @@ -16,11 +16,18 @@ * ENOTRECOVERABLE. */ +/* + * XXX: pthread_mutexattr_setrobust_np and PTHREAD_MUTEX_ROBUST_NP isn't POSIX. + */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#warning "Uses GNU-isms; needs fixing." +#endif #include <pthread.h> #include <stdio.h> -#include <unistd.h> -#include <string.h> #include <stdlib.h> +#include <string.h> +#include <unistd.h> #include "test.h" #define THREAD_NUM 2 diff --git a/testcases/open_posix_testsuite/functional/threads/schedule/GNUmakefile b/testcases/open_posix_testsuite/functional/threads/schedule/GNUmakefile index 2c7b97d..e348117 100644 --- a/testcases/open_posix_testsuite/functional/threads/schedule/GNUmakefile +++ b/testcases/open_posix_testsuite/functional/threads/schedule/GNUmakefile @@ -4,12 +4,11 @@ # of this license, see the COPYING file at the top level of this # source tree. -CFLAGS := -Wall -I../../../include -O2 -LDFLAGS := -lpthread -lrt - -TARGETS := 1-1 1-2 +CFLAGS= -I../../../include +LDLIBS= -lpthread -lrt +TARGETS= 1-1 1-2 all: $(TARGETS) clean: - rm -f $(TARGETS) + -rm -f $(TARGETS) diff --git a/testcases/open_posix_testsuite/functional/timers/GNUmakefile b/testcases/open_posix_testsuite/functional/timers/GNUmakefile index 63bc007..0d484da 100644 --- a/testcases/open_posix_testsuite/functional/timers/GNUmakefile +++ b/testcases/open_posix_testsuite/functional/timers/GNUmakefile @@ -5,10 +5,9 @@ # source tree. # -all: - make -C clocks - make -C timers +SUBDIRS= clocks timers -clean : - make -C clocks clean - make -C timers clean +all clean: + for d in $(SUBDIRS); do \ + $(MAKE) -C $$d $@; \ + done hooks/post-receive -- ltp |