Hi,
This patch fixes build failures seen on RHEL 4 (2.6.9 based Kernel), and
several warnings. The
build failures are caused by pec_listener.c and then ptrace06.c,
/bin/sh: ../../bin/tst_kvercmp: No such file or directory
make[4]: Entering directory `/root/ltp/testcases/kernel/connectors/pec'
cc -Wall -I../../../../include -Wall event_generator.c -L../../../../lib
-lltp -o
event_generator
cc -Wall -I../../../../include -Wall pec_listener.c -L../../../../lib
-lltp -o pec_listener
In file included from pec_listener.c:32:
/usr/include/linux/netlink.h:22: error: syntax error before "__u32"
/usr/include/linux/netlink.h:28: error: syntax error before "__u32"
/usr/include/linux/netlink.h:30: error: syntax error before "nlmsg_flags"
/usr/include/linux/netlink.h:31: error: syntax error before "nlmsg_seq"
/usr/include/linux/netlink.h:32: error: syntax error before "nlmsg_pid"
/usr/include/linux/netlink.h:82: error: field `msg' has incomplete type
pec_listener.c:33:29: linux/connector.h: No such file or directory
pec_listener.c:35:27: linux/cn_proc.h: No such file or directory
pec_listener.c:42: error: syntax error before "seq"
...
It because the Kernel version checking code is incorrect from it, as you can
see from the error
message above, "/bin/sh: ../../bin/tst_kvercmp: No such file or directory". I
solve it by querying
an entry in proc file system instead.
For ptrace06.c case, PTRACE_GETSIGINFO and PTRACE_SETSIGINFO are unavailable in
this version of
Kernel,
In file included from ptrace06.c:23:
spawn_ptrace_child.c:71: error: `PTRACE_GETSIGINFO' undeclared here (not in a
function)
spawn_ptrace_child.c:71: error: nonconstant array index in initializer
spawn_ptrace_child.c:71: error: (near initialization for `strings')
spawn_ptrace_child.c:72: error: `PTRACE_SETSIGINFO' undeclared here (not in a
function)
spawn_ptrace_child.c:72: error: nonconstant array index in initializer
spawn_ptrace_child.c:72: error: (near initialization for `strings')
ptrace06.c:117: error: initializer element is not constant
ptrace06.c:117: error: (near initialization for `test_cases[57].request')
...
Given that this test also fails to compile for IA-64 entirely (please see more
details on one of
my previous emails sent not long ago), I disable this test temperately until
those problems have
been fixed.
In addition, it fixed the following unnecessary compiling warnings.
Warnings messages because of flex limitation,
lex -l -t scan.l > scan.c
"scan.l", line 236: warning, dangerous trailing context
"scan.l", line 236: warning, dangerous trailing context
"scan.l", line 236: warning, dangerous trailing context
"scan.l", line 236: warning, dangerous trailing context
"scan.l", line 236: warning, dangerous trailing context
"scan.l", line 236: warning, dangerous trailing context
"scan.l", line 236: warning, dangerous trailing context
...
Bogus errors,
grep: /proc/cgroups: No such file or directory
grep: /proc/cgroups: No such file or directory
grep: /proc/cgroups: No such file or directory
grep: /proc/cgroups: No such file or directory
grep: /proc/cgroups: No such file or directory
grep: /proc/cgroups: No such file or directory
make[3]: Entering directory `/root/ltp/testcases/kernel/controllers'
echo "Kernel is not compiled with cpu controller support";
Kernel is not compiled with cpu controller support
echo "Kernel is not compiled with memory resource controller support";
Kernel is not compiled with memory resource controller support
echo "Kernel is not compiled with blockio resource controller support";
Kernel is not compiled with blockio resource controller support
...
Finally,
check_for_unshare.c:21: warning: implicit declaration of function `tst_kvercmp'
Signed-off-by: CAI Qian <[EMAIL PROTECTED]>
diff -ur ltp/pan/Makefile ltp-new/pan/Makefile
--- ltp/pan/Makefile 2008-04-02 05:24:55.000000000 -0400
+++ ltp-new/pan/Makefile 2008-10-14 06:13:08.000000000 -0400
@@ -1,6 +1,6 @@
LOADLIBES += -lm
-LFLAGS += -l
+LFLAGS += -lw
CFLAGS += -w
DESTDIR = /opt/ltp
Only in ltp-new/testcases/ballista/ballista: MakefileHost
Only in ltp-new/testcases/ballista/ballista: MakefileTarget
diff -ur ltp/testcases/kernel/connectors/Makefile
ltp-new/testcases/kernel/connectors/Makefile
--- ltp/testcases/kernel/connectors/Makefile 2008-09-11 03:21:14.000000000
-0400
+++ ltp-new/testcases/kernel/connectors/Makefile 2008-10-14
06:17:29.000000000 -0400
@@ -2,7 +2,7 @@
all:
@set -e; \
- if ../../bin/tst_kvercmp 2 6 15; then \
+ if ! test -f /proc/net/connector; then \
echo "system does not support process event connector"; \
else for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; true; fi
@@ -10,7 +10,7 @@
@set -e; \
ln -f connector_test.sh ../../bin/connector_test.sh; \
chmod ugo+x connector_test.sh; \
- if ../../bin/tst_kvercmp 2 6 15; then \
+ if ! test -f /proc/net/connector; then \
echo "system does not support process event connector"; \
else for i in $(SUBDIRS); do $(MAKE) -C $$i install; done; true; fi
diff -ur ltp/testcases/kernel/containers/check_for_unshare.c
ltp-new/testcases/kernel/containers/check_for_unshare.c
--- ltp/testcases/kernel/containers/check_for_unshare.c 2008-09-19
08:17:10.000000000 -0400
+++ ltp-new/testcases/kernel/containers/check_for_unshare.c 2008-10-14
06:18:33.000000000 -0400
@@ -16,6 +16,7 @@
***************************************************************************/
#include <stdio.h>
#include "libclone/libclone.h"
+#include "test.h"
int kernel_is_too_old(void) {
if (tst_kvercmp(2,6,16) < 0)
diff -ur ltp/testcases/kernel/controllers/Makefile
ltp-new/testcases/kernel/controllers/Makefile
--- ltp/testcases/kernel/controllers/Makefile 2008-07-14 13:16:07.000000000
-0400
+++ ltp-new/testcases/kernel/controllers/Makefile 2008-10-14
06:20:38.000000000 -0400
@@ -1,28 +1,28 @@
SUBDIRS = libcontrollers cpuctl memctl io-throttle
-CHECK_CPUCTL = $(shell grep -w cpu /proc/cgroups|cut -f1)
-CHECK_MEMCTL = $(shell grep -w memory /proc/cgroups|cut -f1)
-CHECK_BLOCKIOCTL= $(shell grep -w blockio /proc/cgroups|cut -f1)
+CHECK_CPUCTL = $(shell grep -w cpu /proc/cgroups 2>/dev/null|cut -f1)
+CHECK_MEMCTL = $(shell grep -w memory /proc/cgroups 2>/dev/null|cut -f1)
+CHECK_BLOCKIOCTL= $(shell grep -w blockio /proc/cgroups 2>/dev/null|cut -f1)
all:
@set -e;
ifeq ($(CHECK_CPUCTL),cpu)
for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ;done;
else
- echo "Kernel is not compiled with cpu controller support";
+ @echo "Kernel is not compiled with cpu controller support";
endif
ifeq ($(CHECK_MEMCTL),memory)
for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ;done;
else
- echo "Kernel is not compiled with memory resource controller support";
+ @echo "Kernel is not compiled with memory resource controller support";
endif
ifeq ($(CHECK_BLOCKIOCTL),blockio)
for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ;done;
else
- echo "Kernel is not compiled with blockio resource controller support";
+ @echo "Kernel is not compiled with blockio resource controller support";
endif
install:
@@ -34,7 +34,7 @@
for i in $(SUBDIRS); do $(MAKE) -C $$i install ; done; \
chmod ugo+x test_controllers.sh;
else
- echo "Kernel is not compiled with cpu controller support";
+ @echo "Kernel is not compiled with cpu controller support";
endif
ifeq ($(CHECK_MEMCTL),memory)
@@ -42,7 +42,7 @@
for i in $(SUBDIRS); do $(MAKE) -C $$i install ; done; \
chmod ugo+x test_controllers.sh;
else
- echo "Kernel is not compiled with memory resource controller support";
+ @echo "Kernel is not compiled with memory resource controller support";
endif
ifeq ($(CHECK_BLOCKIOCTL),blockio)
@@ -50,7 +50,7 @@
for i in $(SUBDIRS); do $(MAKE) -C $$i install ; done; \
chmod ugo+x test_controllers.sh;
else
- echo "Kernel is not compiled with blockio resource controller support";
+ @echo "Kernel is not compiled with blockio resource controller support";
endif
clean:
diff -ur ltp/testcases/kernel/syscalls/ptrace/Makefile
ltp-new/testcases/kernel/syscalls/ptrace/Makefile
--- ltp/testcases/kernel/syscalls/ptrace/Makefile 2008-09-24
00:57:32.000000000 -0400
+++ ltp-new/testcases/kernel/syscalls/ptrace/Makefile 2008-10-14
23:26:11.000000000 -0400
@@ -19,7 +19,7 @@
CFLAGS += -I../../../../include -Wall
LDLIBS += -L../../../../lib -lltp
-SRCS = $(wildcard *.c)
+SRCS = $(wildcard *[^6].c)
TARGETS = $(patsubst ptrace%.c,ptrace%,$(SRCS))
all: $(TARGETS)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list