public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] network/nfsstat01: umount only if it was mounted
@ 2014-06-11 13:39 Alexey Kodanev
  2014-06-17 10:26 ` chrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kodanev @ 2014-06-11 13:39 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

The test will mount (bind) export directory when nfs's version is 4,
so add the check before 'umount' in cleanup function.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 testcases/network/nfs/nfsstat01/nfsstat01 |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/testcases/network/nfs/nfsstat01/nfsstat01 b/testcases/network/nfs/nfsstat01/nfsstat01
index 229e2c3..4a34d93 100755
--- a/testcases/network/nfs/nfsstat01/nfsstat01
+++ b/testcases/network/nfs/nfsstat01/nfsstat01
@@ -215,12 +215,15 @@ $trace_logic
 
    echo "Unmounting EXPORTDIR"
    /usr/sbin/exportfs -u $HOST:$EXPORTDIR
-   umount $EXPORTDIR
-   sleep 3
-   rm -rf $EXPORTDIR
+
    if [ "x$NFS_TYPE" = "xnfs4" ]; then
+       umount $EXPORTDIR
+       sleep 3
        rm -rf /export$EXPORTDIR
    fi
+
+   rm -rf $EXPORTDIR
+
 }
 
 #=============================================================================
-- 
1.7.1


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
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

* Re: [LTP] [PATCH] network/nfsstat01: umount only if it was mounted
  2014-06-11 13:39 [LTP] [PATCH] network/nfsstat01: umount only if it was mounted Alexey Kodanev
@ 2014-06-17 10:26 ` chrubis
  0 siblings, 0 replies; 2+ messages in thread
From: chrubis @ 2014-06-17 10:26 UTC (permalink / raw)
  To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list

Hi!
> The test will mount (bind) export directory when nfs's version is 4,
> so add the check before 'umount' in cleanup function.

Looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-17 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 13:39 [LTP] [PATCH] network/nfsstat01: umount only if it was mounted Alexey Kodanev
2014-06-17 10:26 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox