From 75765b97367c0909f64d3dd15cbf47b3f4764412 Mon Sep 17 00:00:00 2001 From: Hongbo Zhang Date: Thu, 21 Aug 2014 17:46:12 +0800 Subject: revise for ltp test Change-Id: Icb540792575f6735ff738367e91cafb7bca62a01 --- openembedded/scripts/ltp-network-client.sh | 45 ++++++++++++++---------------- openembedded/scripts/ltp-network-server.sh | 7 +++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/openembedded/scripts/ltp-network-client.sh b/openembedded/scripts/ltp-network-client.sh index b73a7b8..5681188 100755 --- a/openembedded/scripts/ltp-network-client.sh +++ b/openembedded/scripts/ltp-network-client.sh @@ -1,17 +1,20 @@ #!/bin/bash -# get server ip address -lava-wait server_ip +SERVER_NAME="ltp-server" +SERVER_PASSWD="" -SERVER_IPADDR=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) -echo "Server IP address is $SERVER_IPADDR" +# get server ip address +lava-wait server-ip +SERVER_IP=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) +echo "Server IP address is $SERVER_IP" -# check network status -ifconfig -a | tee /tmp/ifconfig.log -ping -c 5 $SERVER_IPADDR | tee /tmp/ping.log -grep "100% packet loss" /tmp/ping.log && (echo "No network connection!" ; exit 1) +# check network connection +ifconfig -a +echo "$SERVER_IP $SERVER_NAME" >> /etc/hosts +ping -c 5 $SERVER_NAME | tee /tmp/ping.log +grep "100% packet loss" /tmp/ping.log && (echo "Network connection error!" ; exit 1) -# rsh configuration +# ssh configuration, rsh is now usually wrapper of ssh cd ~ if [ -d .ssh ]; then rm -rf .ssh @@ -55,25 +58,19 @@ EOF chmod 600 ~/.ssh/id_rsa -SERVER_NAME="server.ltp" -SERVER_PASSWD="" - -rsh -n -l root $SERVER_IPADDR ls -rsh -n -l root $SERVER_IPADDR hostname $SERVER_NAME - -echo "$SERVER_IPADDR $SERVER_NAME" >> /etc/hosts - -rsh -n -l root $SERVER_NAME ls - +# variables needed by LTP network tests export RHOST=$SERVER_NAME export PASSWD=$SERVER_PASSWD +cd /opt/ +wget http://people.linaro.org/~hongbo.zhang/ltp.tar.gz +tar zxvf ltp.tar.gz -wget http://sourceforge.net/projects/ltp/files/LTP%20Source/ltp-20140422/ltp-full-20140422.tar.xz -tar --strip-components=1 -Jxf ltp-full-20140422.tar.xz -./configure -make all -make SKIP_IDCHECK=1 install +#wget http://sourceforge.net/projects/ltp/files/LTP%20Source/ltp-20140422/ltp-full-20140422.tar.xz +#tar --strip-components=1 -Jxf ltp-full-20140422.tar.xz +#./configure +#make all +#make SKIP_IDCHECK=1 install # temporarily enable only ftp in tcp_cmds cd /opt/ltp diff --git a/openembedded/scripts/ltp-network-server.sh b/openembedded/scripts/ltp-network-server.sh index 9046d40..fdf25be 100755 --- a/openembedded/scripts/ltp-network-server.sh +++ b/openembedded/scripts/ltp-network-server.sh @@ -1,6 +1,8 @@ #!/bin/bash -# rsh configuration +hostname ltp-server + +# ssh configuration, rsh is now usually wrapper of ssh cd ~ if [ -d .ssh ]; then rm -rf .ssh @@ -14,10 +16,11 @@ EOF ls ~/.ssh/authorized_keys -l chmod 600 ~/.ssh/authorized_keys +# if rsh is wrapper of ssh, this .rhosts may not needed #echo "+ +" > ~/.rhosts # send server ip address to client -lava-send server_ip IPADDR=`ifconfig eth0 |grep "inet addr"| cut -f 2 -d ":"|cut -f 1 -d " "` +lava-send server-ip IPADDR=`ifconfig eth0 |grep "inet addr"| cut -f 2 -d ":"|cut -f 1 -d " "` # wait for the client to finish tests lava-wait client-done -- cgit v1.2.3