summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-11-29 18:24:23 +0530
committerAtin Mukherjee <amukherj@redhat.com>2017-12-01 04:59:30 +0000
commit5529659dec7607bf9b94ea2195672ae553458785 (patch)
treec20c1632b867199ea432b30752bdfc8c21a07853 /tests
parent757d4a5a5fc0a3c2f6c450d228525b7a87fe3172 (diff)
downloadglusterfs-5529659dec7607bf9b94ea2195672ae553458785.tar.gz
glusterfs-5529659dec7607bf9b94ea2195672ae553458785.tar.xz
glusterfs-5529659dec7607bf9b94ea2195672ae553458785.zip
tests: Fix a broken test case
Issue: When using statedump command to take statedump of the gfapi process, we specify the following things: $gluster volume statedump <volname> client <host>:<pid> pid: Pid of the gfapi application host: This should be the IP/hostname as seen by the glusterd, the gfapi application is connected to. In this test case, if gfapi application is running locally, and is connected to $H1 glusterd, the <host> need not be $H1. <host> could be localhost, 127.0.0.1, 127.1.1.1 etc. based on the configuration of the system. Hence use netstat to find the right <host> value. Change-Id: I6efb9d1ccaf9c6841a9ab7c9ebfecafc03c0bc5e BUG: 1517961 Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/cli/bug-1169302.t12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/bugs/cli/bug-1169302.t b/tests/bugs/cli/bug-1169302.t
index 475d932b26..0bdaf56307 100755
--- a/tests/bugs/cli/bug-1169302.t
+++ b/tests/bugs/cli/bug-1169302.t
@@ -40,17 +40,13 @@ cleanup_statedump
# hostname or IP-address with the connection from the bug-1169302 executable.
# In our CI it seems not possible to use $H0, 'localhost', $(hostname --fqdn)
# or even "127.0.0.1"....
-TEST $CLI_3 volume statedump $V0 client $H1:$GFAPI_PID
+sleep 2
+host=`netstat -nap | grep $GFAPI_PID | grep 24007 | awk '{print $4}' | cut -d: -f1`
+TEST $CLI_3 volume statedump $V0 client $host:$GFAPI_PID
EXPECT_WITHIN $STATEDUMP_TIMEOUT "Y" path_exists $statedumpdir/glusterdump.$GFAPI_PID*
kill $GFAPI_PID
cleanup_statedump
cleanup_tester $(dirname $0)/bug-1169302
-cleanup
-
-# Mainly marking it as known-issue as it is consistently failing.
-# Revert back once fixing this.
-
-#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=1517961
-#G_TESTDEF_TEST_STATUS_CENTOS6=KNOWN_ISSUE,BUG=1517961
+cleanup \ No newline at end of file