|
From: Cyril H. <su...@li...> - 2013-11-14 15:51:10
|
The branch, master, has been updated
via 1eb440c2b5fe43a3e5023015a16aa5d7d3385b1e (commit)
from b185f2281d0e8767db4c1270280ec160b9fa097b (commit)
- Log -----------------------------------------------------------------
commit 1eb440c2b5fe43a3e5023015a16aa5d7d3385b1e
Author: Cyril Hrubis <ch...@su...>
Date: Wed Nov 13 18:25:50 2013 +0100
Fix 743f2fcd5744744d649496d8f0524cf5ca7d3859.
The gethost is called from multicast testcases too, which I failed to
find, apologies everyone.
This commit moves the gethost to muticast directory and renames it to
mc_gethost and fixes all usages accordingly.
Signed-off-by: Cyril Hrubis <ch...@su...>
-----------------------------------------------------------------------
Summary of changes:
testcases/network/multicast/mc_cmds/mc_cmds | 11 +----------
testcases/network/multicast/mc_commo/mc_commo | 8 +++-----
.../multicast/mc_gethost}/Makefile | 9 +++------
.../mc_gethost/mc_gethost.c} | 0
testcases/network/multicast/mc_member/mc_member | 3 +--
testcases/network/multicast/mc_opts/mc_opts | 2 +-
testcases/network/tcp_cmds/sendfile/Makefile | 4 ++--
testcases/network/tcp_cmds/sendfile/sendfile01 | 4 ++--
8 files changed, 13 insertions(+), 28 deletions(-)
copy testcases/{kernel/fs/ext4-new-features/ext4-nsec-timestamps => network/multicast/mc_gethost}/Makefile (87%)
rename testcases/network/{tcp_cmds/sendfile/sendfile01_gethost.c => multicast/mc_gethost/mc_gethost.c} (100%)
diff --git a/testcases/network/multicast/mc_cmds/mc_cmds b/testcases/network/multicast/mc_cmds/mc_cmds
index d27f669..fda26a3 100755
--- a/testcases/network/multicast/mc_cmds/mc_cmds
+++ b/testcases/network/multicast/mc_cmds/mc_cmds
@@ -36,15 +36,6 @@ $trace_logic
TC=mc_cmds
PING_OUT=/tmp/${TC}_out
-# Set the LTPROOT variable to the correct path
-# from the ltp/testcases/bin directory or the
-# /ltp/testcases/network/multicast/mc_cmds directory
-pwd | grep -q bin
-if [ $? -eq 0 ]; then
- LTPROOT=${LTPROOT:-../..}
-else
- LTPROOT=${LTPROOT:-../../../..}
-fi
HOSTNAME=`hostname`
CLEANUP=${CLEANUP:-ON}
#*******************************************************************************
@@ -63,7 +54,7 @@ do_test()
IFNAME=${IFNAME:-$(netstat -i -n | grep "^[b-z]\{2,4\}[0-9][^*]"|\
awk '{print $1}')}
- INTERFACE=${INTERFACE:-$("$LTPROOT/bin/gethost" `hostname` | grep addresses: | awk '{print $2}')}
+ INTERFACE=${INTERFACE:-$(mc_gethost `hostname` | grep addresses: | awk '{print $2}')}
echo "Testing ifconfig and netstat"
diff --git a/testcases/network/multicast/mc_commo/mc_commo b/testcases/network/multicast/mc_commo/mc_commo
index 50fa6b9..87609b9 100755
--- a/testcases/network/multicast/mc_commo/mc_commo
+++ b/testcases/network/multicast/mc_commo/mc_commo
@@ -41,15 +41,13 @@ $trace_logic
TC=mc_commo
TCtmp=${TCtmp:-"/tmp/mc_commo.$$"}
CLEANUP=${CLEANUP:-ON}
-EXECUTABLES="mc_recv"
-REMOTE_EXEC="mc_send"
LTPROOT=${LTPROOT:-../../../..}
TTL=10
PORT=3333
RHOST=${RHOST:-`hostname`}
OUTFILE=$TCtmp/mc_commo_out
NUMLOOPS=${NUMLOOPS:-2}
-INTERFACE=${INTERFACE:-$("$LTPROOT/bin/gethost" `hostname` | grep addresses: | awk '{print $2}')}
+INTERFACE=${INTERFACE:-$(mc_gethost `hostname` | grep addresses: | awk '{print $2}')}
this_file=${0##*/}
trap "interrupt_test" 2
@@ -85,7 +83,7 @@ do_test ()
# Start up the recv on local host
echo "Starting mc_recv on $GROUP_ADDR $INTERFACE $PORT"
- "$LTPROOT/testcases/bin/$EXECUTABLES" $GROUP_ADDR $INTERFACE $PORT \
+ mc_recv $GROUP_ADDR $INTERFACE $PORT \
>> $OUTFILE &
SERVER_PID=$!
sleep 5
@@ -128,7 +126,7 @@ do_test ()
do
echo "Running on $HOST mc_send $GROUP_ADDR $HOST $PORT $TTL"
- rsh -n -l root $HOST "$LTPROOT/testcases/bin/$REMOTE_EXEC" $GROUP_ADDR \
+ rsh -n -l root $HOST "$LTPROOT/testcases/bin/mc_send" $GROUP_ADDR \
$HOST $PORT $TTL >/dev/null &
sleep 10
rsh -n -l root $HOST "ps -ewf | grep mc_send | grep -v grep"
diff --git a/testcases/kernel/fs/ext4-new-features/ext4-nsec-timestamps/Makefile b/testcases/network/multicast/mc_gethost/Makefile
similarity index 87%
copy from testcases/kernel/fs/ext4-new-features/ext4-nsec-timestamps/Makefile
copy to testcases/network/multicast/mc_gethost/Makefile
index 6b8aabb..d5eaf84 100644
--- a/testcases/kernel/fs/ext4-new-features/ext4-nsec-timestamps/Makefile
+++ b/testcases/network/multicast/mc_gethost/Makefile
@@ -1,4 +1,5 @@
-# Copyright (C) 2009, FUJITSU LIMITED
+#
+# Copyright (C) 2013, Linux Test Project
#
# 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
@@ -15,11 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-top_srcdir ?= ../../../../..
+top_srcdir ?= ../../../..
include $(top_srcdir)/include/mk/testcases.mk
-
-LDLIBS += -lm
-INSTALL_TARGETS ?= *.sh
-
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/tcp_cmds/sendfile/sendfile01_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c
similarity index 100%
rename from testcases/network/tcp_cmds/sendfile/sendfile01_gethost.c
rename to testcases/network/multicast/mc_gethost/mc_gethost.c
diff --git a/testcases/network/multicast/mc_member/mc_member b/testcases/network/multicast/mc_member/mc_member
index 0e79cdb..ee0ca07 100755
--- a/testcases/network/multicast/mc_member/mc_member
+++ b/testcases/network/multicast/mc_member/mc_member
@@ -42,10 +42,9 @@ TCsrc=${TCsrc:-`pwd`}
TCtmp=${TCtmp:-$TCsrc/$TC$$}
CLEANUP=${CLEANUP:-ON}
-LTPROOT=${LTPROOT:-"../../../../"}
EXECUTABLES=${EXECUTABLES:-"member"}
NUMLOOPS=${NUMLOOPS:-2}
-INTERFACE=${INTERFACE:-$("$LTPROOT/bin/gethost" `hostname`| grep address |awk '{ print $2 }')}
+INTERFACE=${INTERFACE:-$(mc_gethost `hostname`| grep address |awk '{ print $2 }')}
GLIST=${GLIST:-$TCsrc/ManyGroups}
TooManyGLIST=${TooManyGLIST:-$TCsrc/TooManyGroups}
ERRFILE=${ERRFILE:-$TCtmp/errors}
diff --git a/testcases/network/multicast/mc_opts/mc_opts b/testcases/network/multicast/mc_opts/mc_opts
index 41e1d68..6f36c26 100755
--- a/testcases/network/multicast/mc_opts/mc_opts
+++ b/testcases/network/multicast/mc_opts/mc_opts
@@ -47,7 +47,7 @@ TCtmp=${TCtmp:-$LTPROOT/bin/$TC$$}
CLEANUP=${CLEANUP:-ON}
EXECUTABLES=${EXECUTABLES:-"opts opts_e"}
NUMLOOPS=${NUMLOOPS:-10}
-IPADDR=${IPADDR:-$("$LTPROOT/bin/gethost" `hostname`| grep address |awk '{ print $2 }')}
+IPADDR=${IPADDR:-$(mc_gethost `hostname`| grep address |awk '{ print $2 }')}
this_file=${0##*/}
trap "interrupt_test" 2
diff --git a/testcases/network/tcp_cmds/sendfile/Makefile b/testcases/network/tcp_cmds/sendfile/Makefile
index 7ba2d7a..a8b0736 100644
--- a/testcases/network/tcp_cmds/sendfile/Makefile
+++ b/testcases/network/tcp_cmds/sendfile/Makefile
@@ -27,9 +27,9 @@ include $(abs_srcdir)/../Makefile.inc
CPPFLAGS += -I$(abs_srcdir)/../include
-INSTALL_TARGETS := sendfile01 sendfile01_server sendfile01_gethost
+INSTALL_TARGETS := sendfile01 sendfile01_server
-MAKE_TARGETS += testsf_c testsf_s testsf_c6 testsf_s6 sendfile01_gethost
+MAKE_TARGETS += testsf_c testsf_s testsf_c6 testsf_s6
testsf_c6.o testsf_s6.o: CPPFLAGS += -DINET6
diff --git a/testcases/network/tcp_cmds/sendfile/sendfile01 b/testcases/network/tcp_cmds/sendfile/sendfile01
index ebeb182..1598106 100755
--- a/testcases/network/tcp_cmds/sendfile/sendfile01
+++ b/testcases/network/tcp_cmds/sendfile/sendfile01
@@ -59,9 +59,9 @@ do_setup()
tst_setup
- exists awk diff sendfile01_gethost grep rsh stat
+ exists awk diff mc_gethost grep rsh stat
- if ! IPADDR=$(sendfile01_gethost ${EXEC_SUFFIX:+6} $RHOST | awk 'BEGIN { ec=1 } /addresses:/ {print $2; ec=0 } END { exit ec }'); then
+ if ! IPADDR=$(mc_gethost ${EXEC_SUFFIX:+6} $RHOST | awk 'BEGIN { ec=1 } /addresses:/ {print $2; ec=0 } END { exit ec }'); then
# XXX (garrcoop): || exit 1 is there to prevent the test from hanging in the event of an install error.
end_testcase "Failed to determine the appropriate IP address for the machine." || exit 1
fi
hooks/post-receive
--
ltp
|