Whamcloud - gitweb
LU-9521 tests: Avoid cleanup() being called twice. 60/27160/3
authorParinay Kondekar <parinay.kondekar@seagate.com>
Wed, 17 May 2017 12:59:46 +0000 (18:29 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 24 May 2017 07:34:02 +0000 (07:34 +0000)
/usr/bin/*-survey when ran,
- calls cleanup() twice, resulting in non-zero exit status,
- and attempts to cleanup already cleaned/detached echo client,
  resulting in invalid argument.

This patch fixes the same.

Test-Parameters: trivial testlist=obdfilter-survey
Signed-off-by: Parinay Kondekar <Parinay.Kondekar@seagate.com>
Change-Id: I5bb1fe5d7e6adf15e81d88501d6edbda1c5ef3c3
Reviewed-on: https://review.whamcloud.com/27160
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
lustre-iokit/obdfilter-survey/iokit-libecho

index e194b6b..92b9694 100644 (file)
@@ -213,6 +213,8 @@ cleanup_network () {
 
 # do cleanup and exit.
 cleanup () {
+       trap 0
+
        local exit_status=$1
        local host