From 74cf4e1920db1edae6728cfe632e4ca7aea5be59 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 19 Aug 2014 16:14:03 -0700 Subject: porting: `pidof` portability for OSX/FreeBSD - Provide a portable `pidof` just to be used specifically with glusterfs regression tests on OSX and FreeBSD. This was written after countless hrs of effort to get a sane `pidof` working on either of the environments. `pidof` comes at the wake of lack of proper procfs support and also incompatible way of handling process names since glusterd/glusterfs are symbolic links to 'glusterfsd' - tests/utils/* directory should be part of 'PATH' to avoid abspath calculation using $(dirname) - cleanup() - rpcinfo command prints error on FreeBSD/OSX fix it Change-Id: I35f86273624cb279da1c8fae056ca27669e251d8 BUG: 1131713 Signed-off-by: Harshavardhana Reviewed-on: http://review.gluster.org/8499 Reviewed-by: Jeff Darcy Tested-by: Gluster Build System --- tests/bugs/bug-1111490.t | 4 ++-- tests/bugs/bug-857330/normal.t | 2 +- tests/bugs/bug-857330/xml.t | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/bugs') diff --git a/tests/bugs/bug-1111490.t b/tests/bugs/bug-1111490.t index 39aa0f9a69e..7b13c8798ec 100644 --- a/tests/bugs/bug-1111490.t +++ b/tests/bugs/bug-1111490.t @@ -16,7 +16,7 @@ TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 # create file with specific gfid uuid=`uuidgen` -EXPECT "File creation OK" python2 $(dirname $0)/../utils/gfid-access.py $M0 ROOT file0 $uuid file +EXPECT "File creation OK" gfid-access.py $M0 ROOT file0 $uuid file # check gfid EXPECT "$uuid" getfattr -m . --only-values -n glusterfs.gfid.string $M0/file0 @@ -27,6 +27,6 @@ TEST umount $M0 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 --aux-gfid-mount # touch the file again (gfid-access.py handles errno) -EXPECT "File creation OK" python2 $(dirname $0)/../utils/gfid-access.py $M0 ROOT file0 $uuid file +EXPECT "File creation OK" gfid-access.py $M0 ROOT file0 $uuid file cleanup; diff --git a/tests/bugs/bug-857330/normal.t b/tests/bugs/bug-857330/normal.t index 44635a19e42..b7409078775 100755 --- a/tests/bugs/bug-857330/normal.t +++ b/tests/bugs/bug-857330/normal.t @@ -14,7 +14,7 @@ TEST $CLI volume start $V0; TEST glusterfs -s $H0 --volfile-id=$V0 $M0; -TEST python2 $(dirname $0)/../../utils/create-files.py --multi -b 10 -d 10 -n 10 $M0; +TEST create-files.py --multi -b 10 -d 10 -n 10 $M0; EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 diff --git a/tests/bugs/bug-857330/xml.t b/tests/bugs/bug-857330/xml.t index 2029c343093..bacca453dbe 100755 --- a/tests/bugs/bug-857330/xml.t +++ b/tests/bugs/bug-857330/xml.t @@ -15,7 +15,7 @@ TEST $CLI volume start $V0; TEST glusterfs -s $H0 --volfile-id=$V0 $M0; -TEST python2 $(dirname $0)/../../utils/create-files.py --multi -b 10 -d 10 -n 10 $M0; +TEST create-files.py --multi -b 10 -d 10 -n 10 $M0; EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 -- cgit