* [LTP] [PATCH] mc_cmds: Set TCID and TST_-variables and use TMPDIR
@ 2014-02-10 9:45 Stanislav Kholmanskikh
2014-03-11 17:10 ` chrubis
0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Kholmanskikh @ 2014-02-10 9:45 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
testcases/network/multicast/mc_cmds/mc_cmds | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/testcases/network/multicast/mc_cmds/mc_cmds b/testcases/network/multicast/mc_cmds/mc_cmds
index 180e93f..54fc69c 100755
--- a/testcases/network/multicast/mc_cmds/mc_cmds
+++ b/testcases/network/multicast/mc_cmds/mc_cmds
@@ -35,9 +35,20 @@
$trace_logic
TC=mc_cmds
-PING_OUT=/tmp/${TC}_out
+TCtmp=${TCtmp:-$TMPDIR/$TC$$}
+PING_OUT=${TCtmp}/PING_OUT
HOSTNAME=`hostname`
CLEANUP=${CLEANUP:-ON}
+
+export TCID=$TC
+export TST_TOTAL=1
+export TST_COUNT=1
+
+setup()
+{
+ mkdir -p $TCtmp || { tst_brkm TBROK NULL "Could not create $TCtmp"; exit 1; }
+}
+
#*******************************************************************************
#
# FUNCTION: do_test
@@ -119,6 +130,7 @@ for eth in $IFNAME
if [ $? -eq 0 ]
then
tst_resm TCONF "Multicast ping disabled on this system (this is normal on post year:2005 kernels)"
+ rm -rf $TCtmp
exit 0
fi
@@ -158,7 +170,7 @@ do_cleanup()
{
$trace_logic
echo "$this_file: doing $0."
- rm -rf $PING_OUT
+ rm -rf $TCtmp
}
#=============================================================================
@@ -193,5 +205,6 @@ end_testcase()
# OUTPUT: Logged run results written to testcase run log
#
#*******************************************************************************
+setup
do_test
end_testcase
--
1.7.1
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-11 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 9:45 [LTP] [PATCH] mc_cmds: Set TCID and TST_-variables and use TMPDIR Stanislav Kholmanskikh
2014-03-11 17:10 ` chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox