Add cpu architecrute check
RFC PATCH 1/1 Add cpu architecrute check
Some system call test program depends cpu architecture.
We cannot compile these, and there is a case to fail in a test even if We compile it.
This check cpu architecture and build check in Makefile. This didn't check all syscall and test cases.
--- Makefile | 10 +++++++++- testcases/kernel/syscalls/fallocate/Makefile | 6 ++++++ testcases/kernel/syscalls/set_thread_area/Makefile | 6 ++++++ testcases/kernel/syscalls/sgetmask/Makefile | 6 ++++++ 4 files changed, 27 insertions(+), 1 deletions(-)
Makefile +9 -1
@@ -1,5 +1,13 @@ # See toplevel INSTALL for build info +ifndef ARCH +# copy from Makefile in linux kernel +ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/s390x/s390/ -e s/parisc64/parisc/ \ + -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/sh[234].*/sh/ ) +endif ifdef CROSS_COMPILE CROSS_COMPILER = $(CROSS_COMPILE) endif
@@ -12,7 +20,7 @@ endif HAS_NUMA=$(shell sh tools/scripts/numa_test.sh) export CFLAGS += -Wall $(CROSS_CFLAGS) -export CC AR RANLIB CPPFLAGS LDFLAGS HAS_NUMA +export CC AR RANLIB CPPFLAGS LDFLAGS HAS_NUMA ARCH -include config.mk
testcases/kernel/syscalls/fallocate/Makefile +6 -0
@@ -20,8 +20,14 @@ CFLAGS += -I../../../../include -Wall LDLIBS += -L../../../../lib -lltp +# This system call is suported in i386, x86_64 and ppc only. +ifneq (,$(findstring $(ARCH), i386 x86_64 ppc)) SRCS = $(wildcard *.c) TARGETS = $(patsubst %.c,%,$(SRCS)) +else +SRCS = +TARGETS = +endif all: $(TARGETS)
testcases/kernel/syscalls/set_thread_area/Makefile +6 -0
@@ -19,8 +19,14 @@ CFLAGS += -I../../../../include -Wall LDLIBS += -L../../../../lib -lltp +# This system call is supported in i386 and x86_64 only. +ifneq (,$(findstring $(ARCH), i386 x86_64)) SRCS = $(wildcard *.c) TARGETS = $(patsubst %.c,%,$(SRCS)) +else +SRCS = +TARGETS = +endif all: $(TARGETS)
testcases/kernel/syscalls/sgetmask/Makefile +6 -0
@@ -19,8 +19,14 @@ CFLAGS += -I../../../../include -Wall LDLIBS += -L../../../../lib -lltp +# This system call does not support x86_64. +ifeq (,$(findstring $(ARCH),x86_64)) SRCS = $(wildcard *.c) TARGETS = $(patsubst %.c,%,$(SRCS)) +else +SRCS = +TARGETS = +endif all: $(TARGETS)
Signature · 13 lines
1.6.3.1 ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Makefile
Quoted 5 lines · On Thursday 04 June 2009 03:23:17 Nobuhiro Iwamatsu wrote:
Makefile +3
-0+ifndef ARCH +# copy from Makefile in linux kernel +ARCH := $(shell uname -m
executing uname to detect build/target systems is never acceptable.
Quoted 4 lines
testcases/kernel/syscalls/fallocate/Makefile +0
-0@@ -20,8 +20,14 @@ CFLAGS += -I../../../../include -Wall
testcases/kernel/syscalls/fallocate/Makefile line 30
Quoted 10 lines
testcases/kernel/syscalls/fallocate/Makefile +6
-0LDLIBS += -L../../../../lib -lltp +# This system call is suported in i386, x86_64 and ppc only. +ifneq (,$(findstring $(ARCH), i386 x86_64 ppc)) SRCS = $(wildcard *.c) TARGETS = $(patsubst %.c,%,$(SRCS)) +else +SRCS = +TARGETS = +endif
atm, better to put the ifdef logic into the test itself. look at some of the other tests that get stubbed out in the syscalls dir.
-mike
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi,
Quoted 8 lines · Mike Frysinger
Makefile
Quoted 5 lines · On Thursday 04 June 2009 03:23:17 Nobuhiro Iwamatsu wrote:
Makefile +3
-0+ifndef ARCH +# copy from Makefile in linux kernel +ARCH := $(shell uname -mexecuting uname to detect build/target systems is never acceptable.
I see.
Quoted 7 lines
Quoted 7 lines
testcases/kernel/syscalls/fallocate/Makefile +0
-0@@ -20,8 +20,14 @@ CFLAGS += -I../../../../include -Wall LDLIBS += -L../../../../lib -lltp
Quoted 11 lines
testcases/kernel/syscalls/fallocate/Makefile line 30
Quoted 8 lines
testcases/kernel/syscalls/fallocate/Makefile +6
-0+# This system call is suported in i386, x86_64 and ppc only. +ifneq (,$(findstring $(ARCH), i386 x86_64 ppc)) SRCS = $(wildcard *.c) TARGETS = $(patsubst %.c,%,$(SRCS)) +else +SRCS = +TARGETS = +endifatm, better to put the ifdef logic into the test itself. look at some of the other tests that get stubbed out in the syscalls dir.
I see, again.
I check your point and Subrata's patch.
Thank you.
Best regards,
Nobuhiro
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list