Yamato, Send these series (1-3) as a patch either embedded in the mail, or, as an attachment. But, as Vijay wants it in mail, better embed in mail. What you have done is just pasted the code. Instead, create patches and then paste patch(s) like the following:
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]> --- 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 Regards-- Subrata On Wed, 2008-09-10 at 14:43 +0900, Masatake YAMATO wrote: > check_header is defined in cond.mk. > Makefiles in other test cases can use the macro. > signalfd/Makefile is the first applicant to use it. > > Signed-off-by: Masatake YAMATO <[EMAIL PROTECTED]> > > # cond.mk --- useful functions to write conditions > # > # Copyright (c) International Business Machines Corp., 2001 > # Copyright (c) Red Hat, Inc., 2008 > # > # This program is free software; you can redistribute it and/or modify > # it under the terms of the GNU General Public License as published by > # the Free Software Foundation; either version 2 of the License, or > # (at your option) any later version. > # > # This program is distributed in the hope that it will be useful, > # but WITHOUT ANY WARRANTY; without even the implied warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See > # the GNU General Public License for more details. > # > # You should have received a copy of the GNU General Public License > # along with this program; if not, write to the Free Software > # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA > # > > # NAME > # check_header: Checking the existence of header file. > # > # SYNOPSIS > # $(call check_header,HEADFILE) > # $(call check_header,HEADFILE,STRING_IF_FOUND) > # $(call check_header,HEADFILE,STRING_IF_FOUND,STRING_IF_NOT_FOUND) > # > # DESCRIPTION > # > # check_header checks whether $(CC) can found HEADFILE or not. > # > # With the first form, "yes" is returned if it is found. > # "no" is returned if it is not found. > # > # With the second form, STRING_IF_FOUND is returned if it is found. > # "no" is returned if it is not found. > # > # With the second form, STRING_IF_FOUND is returned if it is found. > # STRING_IF_NOT_FOUND is returned if it is not found. > # > # EXAMPLES > # > # (1) yes or no > # > # include ../utils/cond.mk > # > # ifeq ($(call check_header,foo.h),yes) > # RULES if foo.h is available. > # else > # RULES IF foo.h is NOT available. > # endif > # > # > # (2) adding CFLAGS# CFLAGS += $(call check_header,foo.h,-DHAS_FOO_H, ) > # > # CFLAGS += $(call check_header,foo.h,-DHAS_FOO_H, ) > # > # > # NOTE > # > # Spaces after `,' are not striped automatically. > # > # The value for CFLAGS is different in following assignment: > # > # CFLAGS += $(call check_header,foo.h,-DHAS_FOO_H, ) > # CFLAGS += $(call check_header,foo.h,-DHAS_FOO_H,) > # > check_header = $(shell > \ > if [ "x$(2)" = "x" ]; then FOUND=yes; else FOUND="$(2)"; fi; > \ > if [ "x$(3)" = "x" ]; then NOTFOUND=no; else NOTFOUND="$(3)"; fi; > \ > if echo "\#include <$(1)>" | $(CC) -E - > /dev/null 2>&1 ; > \ > then echo "$${FOUND}" ; > \ > else echo "$${NOTFOUND}" ; fi) > > > #COND_MK_DEBUG=yes > ifdef COND_MK_DEBUG > all: > @echo "-DHAS_STDIO_H == $(call check_header,stdio.h,-DHAS_STDIO_H,)" > @echo "\" \" == \"$(call check_header,foo.h,-DHAS_FOO_H, )\"" > @echo "yes == $(call check_header,stdio.h)" > @echo "no == $(call check_header,foo.h)" > @echo "YES == $(call check_header,stdio.h,YES)" > @echo "no == $(call check_header,foo.h,YES)" > @echo "YES == $(call check_header,stdio.h,YES,NO)" > @echo "NO == $(call check_header,foo.h,YES,NO)" > endif > # cond.mk ends here. > > ------------------------------------------------------------------------- > 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 > Ltp-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ltp-list ------------------------------------------------------------------------- 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 Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list