Adding the default build capability for PEC test cases has introduced
some build failures on some machines. See the following output:

=======================================================================
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"
pec_listener.c:42: warning: type defaults to `int' in declaration of
`seq'
pec_listener.c:42: warning: data definition has no type or storage class
pec_listener.c:64: warning: "struct cn_msg" declared inside parameter
list
pec_listener.c:64: warning: its scope is only this definition or
declaration, which is probably not what you want
pec_listener.c: In function `netlink_send':
pec_listener.c:76: error: dereferencing pointer to incomplete type
pec_listener.c:77: error: dereferencing pointer to incomplete type
pec_listener.c:78: error: dereferencing pointer to incomplete type
pec_listener.c:79: error: dereferencing pointer to incomplete type
pec_listener.c:79: error: dereferencing pointer to incomplete type
pec_listener.c:79: error: dereferencing pointer to incomplete type
pec_listener.c:79: error: invalid application of `sizeof' to incomplete
type `nlmsghdr' 
pec_listener.c:80: error: dereferencing pointer to incomplete type
pec_listener.c:81: error: invalid application of `sizeof' to incomplete
type `nlmsghdr' 
pec_listener.c:81: error: dereferencing pointer to incomplete type
pec_listener.c:81: error: dereferencing pointer to incomplete type
pec_listener.c:85: error: dereferencing pointer to incomplete type
pec_listener.c:89: error: dereferencing pointer to incomplete type
pec_listener.c: In function `netlink_recv':
pec_listener.c:112: error: invalid application of `sizeof' to incomplete
type `nlmsghdr' 
pec_listener.c:117: error: invalid application of `sizeof' to incomplete
type `nlmsghdr' 
pec_listener.c:120: error: dereferencing pointer to incomplete type
pec_listener.c: At top level:
pec_listener.c:136: warning: "enum proc_cn_mcast_op" declared inside
parameter list
pec_listener.c:137: error: parameter `op' has incomplete type
pec_listener.c: In function `control_pec':
pec_listener.c:139: error: invalid application of `sizeof' to incomplete
type `cn_msg' 
pec_listener.c:139: error: invalid application of `sizeof' to incomplete
type `proc_cn_mcast_op' 
pec_listener.c:146: error: dereferencing pointer to incomplete type
pec_listener.c:146: error: `CN_IDX_PROC' undeclared (first use in this
function)
pec_listener.c:146: error: (Each undeclared identifier is reported only
once
pec_listener.c:146: error: for each function it appears in.)
pec_listener.c:147: error: dereferencing pointer to incomplete type
pec_listener.c:147: error: `CN_VAL_PROC' undeclared (first use in this
function)
pec_listener.c:148: error: dereferencing pointer to incomplete type
pec_listener.c:149: error: dereferencing pointer to incomplete type
pec_listener.c:150: error: dereferencing pointer to incomplete type
pec_listener.c:152: error: dereferencing pointer to incomplete type
pec_listener.c:153: error: dereferencing pointer to incomplete type
pec_listener.c:155: warning: passing arg 3 of `netlink_send' from
incompatible pointer type
pec_listener.c: In function `process_event':
pec_listener.c:170: error: invalid application of `sizeof' to incomplete
type `nlmsghdr' 
pec_listener.c:172: error: dereferencing pointer to incomplete type
pec_listener.c:174: error: dereferencing pointer to incomplete type
pec_listener.c:175: error: `PROC_EVENT_NONE' undeclared (first use in
this function)
pec_listener.c:176: error: dereferencing pointer to incomplete type
pec_listener.c:178: error: `PROC_EVENT_FORK' undeclared (first use in
this function)
pec_listener.c:180: error: dereferencing pointer to incomplete type
pec_listener.c:181: error: dereferencing pointer to incomplete type
pec_listener.c:183: error: `PROC_EVENT_EXEC' undeclared (first use in
this function)
pec_listener.c:185: error: dereferencing pointer to incomplete type
pec_listener.c:187: error: `PROC_EVENT_UID' undeclared (first use in
this function)
pec_listener.c:189: error: dereferencing pointer to incomplete type
pec_listener.c:190: error: dereferencing pointer to incomplete type
pec_listener.c:191: error: dereferencing pointer to incomplete type
pec_listener.c:193: error: `PROC_EVENT_GID' undeclared (first use in
this function)
pec_listener.c:195: error: dereferencing pointer to incomplete type
pec_listener.c:196: error: dereferencing pointer to incomplete type
pec_listener.c:197: error: dereferencing pointer to incomplete type
pec_listener.c:199: error: `PROC_EVENT_EXIT' undeclared (first use in
this function)
pec_listener.c:201: error: dereferencing pointer to incomplete type
pec_listener.c:202: error: dereferencing pointer to incomplete type
pec_listener.c:203: error: dereferencing pointer to incomplete type
pec_listener.c: In function `main':
pec_listener.c:215: error: storage size of 'l_local' isn't known
pec_listener.c:216: error: storage size of 'src_addr' isn't known
pec_listener.c:225: error: `NETLINK_CONNECTOR' undeclared (first use in
this function)
pec_listener.c:239: error: `CN_IDX_PROC' undeclared (first use in this
function)
pec_listener.c:242: error: invalid application of `sizeof' to incomplete
type `sockaddr_nl' 
pec_listener.c:249: error: `PROC_CN_MCAST_LISTEN' undeclared (first use
in this function)
pec_listener.c:264: error: `PROC_CN_MCAST_IGNORE' undeclared (first use
in this function)
pec_listener.c:283: error: dereferencing pointer to incomplete type
pec_listener.c:290: error: dereferencing pointer to incomplete type
pec_listener.c:215: warning: unused variable `l_local'
pec_listener.c:216: warning: unused variable `src_addr'
make[4]: *** [pec_listener] Error 1
=======================================================================

The above is produced in the following machines:

1) # uname -a
Linux 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007 x86_64 x86_64
x86_64 GNU/Linux
[EMAIL PROTECTED] ltp-full-20080831]# gcc --version
gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9)
Copyright (C) 2006 Free Software Foundation, Inc.

2) # uname -a
Linux 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386
GNU/Linux
[EMAIL PROTECTED] ltp-full-20080831]# gcc --version
gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9)

When we make something build by default, we should be able to defend any
build failures through header checks. I am not going to revert the
applied patch(s). But, kindly provide some fix for this.


There is some issue(s) even with running the tests. I ran it on a 2.6.26
kernel with defconfig. Following output is not expected although the
kernel is 2.6.26:

# uname -a
Linux 2.6.26-autokern1 #1 SMP PREEMPT Thu Sep 11 11:34:11 UTC 2008
x86_64 GNU/Linux

<<<test_start>>>
tag=Connectors stime=1221134995
cmdline="connector_test.sh"
contacts=""
analysis=exit
initiation_status="ok"
<<<test_output>>>
incrementing stop
grep: /proc/net/connector: No such file or directory
pec01       1  BROK  :  Process Event Connector is not supported or
kernel is below 2.6.26
pec01       2  BROK  :  Remaining cases broken
pec01       3  BROK  :  Remaining cases broken
pec01       4  BROK  :  Remaining cases broken
pec01       5  BROK  :  Remaining cases broken
<<<execution_status>>>
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=0
<<<test_end>>>

Can you also look into this and provide the fix ?

Regards--
Subrata

On Thu, 2008-09-11 at 12:56 +0530, Subrata Modak wrote:
> On Tue, 2008-09-09 at 10:58 +0800, Li Zefan wrote:
> > Check /proc/net/connector to see if process event connector is supported
> > or not.
> > 
> > Also merged some cleanups done by Matt Helsley.
> > 
> > Signed-off-by: Li Zefan <[EMAIL PROTECTED]>
> 
> This as well.
> 
> Regards--
> Subrata
> 
> > ---
> >  runltp                                        |    3 ++-
> >  testcases/kernel/Makefile                     |    3 +--
> >  testcases/kernel/connectors/Makefile          |    2 +-
> >  testcases/kernel/connectors/connector_test.sh |    7 +------
> >  testcases/kernel/connectors/pec/run_pec_test  |   21 ++++++++++-----------
> >  5 files changed, 15 insertions(+), 21 deletions(-)
> > 
> > diff -Nurp ltp-full-20080731.orig/runltp ltp-full-20080731/runltp
> > --- ltp-full-20080731.orig/runltp   2008-05-23 18:20:10.000000000 +0800
> > +++ ltp-full-20080731/runltp        2008-09-09 10:00:07.000000000 +0800
> > @@ -510,7 +510,8 @@ main()
> >                       ${LTPROOT}/runtest/fs_bind \
> >                       ${LTPROOT}/runtest/controllers \
> >                       ${LTPROOT}/runtest/filecaps \
> > -                     ${LTPROOT}/runtest/fcntl-locktests 
> > +                     ${LTPROOT}/runtest/fcntl-locktests \
> > +                     ${LTPROOT}/runtest/connectors
> >          do
> >              [ -e "$SCENFILES" ] || \
> >              {
> > diff -Nurp ltp-full-20080731.orig/testcases/kernel/Makefile 
> > ltp-full-20080731/testcases/kernel/Makefile
> > --- ltp-full-20080731.orig/testcases/kernel/Makefile        2008-06-26 
> > 17:37:40.000000000 +0800
> > +++ ltp-full-20080731/testcases/kernel/Makefile     2008-09-09 
> > 10:00:07.000000000 +0800
> > @@ -1,5 +1,4 @@
> > -SUBDIRS = numa containers controllers include fs io ipc mem pty sched 
> > security syscalls timers
> > -# Will be adding conectors here in future
> > +SUBDIRS = numa containers controllers connectors include fs io ipc mem pty 
> > sched security syscalls timers
> >  UCLINUX_SUBDIRS = syscalls
> > 
> >  all:
> > diff -Nurp ltp-full-20080731.orig/testcases/kernel/connectors/Makefile 
> > ltp-full-20080731/testcases/kernel/connectors/Makefile
> > --- ltp-full-20080731.orig/testcases/kernel/connectors/Makefile     
> > 2008-06-26 20:00:12.000000000 +0800
> > +++ ltp-full-20080731/testcases/kernel/connectors/Makefile  2008-09-09 
> > 10:31:00.000000000 +0800
> > @@ -15,4 +15,4 @@ install:
> >     else for i in $(SUBDIRS); do $(MAKE) -C $$i install; done; true; fi
> > 
> >  clean:
> > -   @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean ; done
> > +   @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@ ; done
> > diff -Nurp 
> > ltp-full-20080731.orig/testcases/kernel/connectors/connector_test.sh 
> > ltp-full-20080731/testcases/kernel/connectors/connector_test.sh
> > --- ltp-full-20080731.orig/testcases/kernel/connectors/connector_test.sh    
> > 2008-06-26 20:02:37.000000000 +0800
> > +++ ltp-full-20080731/testcases/kernel/connectors/connector_test.sh 
> > 2008-09-09 10:29:47.000000000 +0800
> > @@ -1,9 +1,4 @@
> > -#! /bin/sh
> > -
> > -if [ -z $LTPROOT ]; then
> > -   export LTPROOT="`cd ../../.. && pwd`"
> > -        export PATH="$PATH:$LTPROOT/testcases/bin"
> > -fi
> > +#!/bin/sh
> > 
> >  tst_kvercmp 2 6 15
> >  if [ $? -eq 0 ]; then
> > diff -Nurp 
> > ltp-full-20080731.orig/testcases/kernel/connectors/pec/run_pec_test 
> > ltp-full-20080731/testcases/kernel/connectors/pec/run_pec_test
> > --- ltp-full-20080731.orig/testcases/kernel/connectors/pec/run_pec_test     
> > 2008-06-26 17:35:45.000000000 +0800
> > +++ ltp-full-20080731/testcases/kernel/connectors/pec/run_pec_test  
> > 2008-09-09 10:30:36.000000000 +0800
> > @@ -1,4 +1,4 @@
> > -#! /bin/bash
> > +#!/bin/bash
> > 
> >  
> > ################################################################################
> >  ##                                                                         
> >    ##
> > @@ -24,13 +24,6 @@
> > 
> >  NUM_EVENTS=1
> >  EVENT_TEST_CASES=( "fork" "exec" "exit" "uid" "gid" )
> > [EMAIL PROTECTED]
> > -
> > -if [ -z $LTPROOT ]; then
> > -   LTPROOT="`cd ../../../.. && pwd`"
> > -   PATH="$PATH:$LTPROOT/testcases/bin"
> > -   mkdir $LTPROOT/output 2> /dev/null
> > -fi
> > 
> >  cd $LTPROOT/testcases/bin
> > 
> > @@ -45,6 +38,12 @@ if [ "$USER" != root ]; then
> >     exit 0;
> >  fi
> > 
> > +grep cn_proc /proc/net/connector > /dev/null
> > +if [ $? -ne 0 ]; then
> > +   tst_brkm TBROK ignored "Process Event Connector is not supported or 
> > kernel is below 2.6.26"
> > +   exit 0;
> > +fi
> > +
> >  # Run a test case
> >  #
> >  # $1: the test number
> > @@ -54,14 +53,14 @@ run_case()
> >     export TST_COUNT=$1
> > 
> >     log="$LTPROOT/output/log"
> > -   mkdir $log 2> /dev/null
> > +   mkdir -p $log 2> /dev/null
> > 
> > -   ./pec_listener > "$log/listener_$1.log" 2>&1 &
> > +   pec_listener > "$log/listener_$1.log" 2>&1 &
> >     pid=$!
> >     # Wait for pec_listener to start listening
> >     sleep $((1*NUM_EVENTS))
> > 
> > -   ./event_generator -e $2 > "$log/generator_$1.log"
> > +   event_generator -e $2 > "$log/generator_$1.log"
> >     ret1=$?
> > 
> >     # Sleep until pec_listener has seen and handled all of


-------------------------------------------------------------------------
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

Reply via email to