From a95444c95cfde4d80c179f2af2f0334565049a51 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Thu, 10 Jul 2014 06:02:38 +0200 Subject: Regression test portability: ps ps aux is truncated to the terminal width on NetBSD, Use ps auxww to avoid that BUG: 764655 Change-Id: I28a2fc23e2823dd6524a72da30111b86fc4bfa7b Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/8281 Tested-by: Gluster Build System Reviewed-by: Harshavardhana Tested-by: Harshavardhana --- tests/bugs/bug-1109770.t | 8 ++++---- tests/bugs/bug-1109889.t | 2 +- tests/bugs/bug-1111041.t | 2 +- tests/volume.rc | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/bugs/bug-1109770.t b/tests/bugs/bug-1109770.t index 139c1022e5b..c9490a63654 100644 --- a/tests/bugs/bug-1109770.t +++ b/tests/bugs/bug-1109770.t @@ -44,25 +44,25 @@ TEST $CLI snapshot create snap4 $V0; TEST $CLI volume set $V0 features.uss enable; -SNAPD_PID=$(ps aux | grep snapd | grep -v grep | awk '{print $2}'); +SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}'); TEST [ $SNAPD_PID -gt 0 ]; TEST $CLI volume set $V0 features.uss disable; -SNAPD_PID=$(ps aux | grep snapd | grep -v grep | awk '{print $2}'); +SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}'); TEST ! [ $SNAPD_PID -gt 0 ]; TEST $CLI volume set $V0 features.uss enable; -SNAPD_PID=$(ps aux | grep snapd | grep -v grep | awk '{print $2}'); +SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}'); TEST [ $SNAPD_PID -gt 0 ]; TEST $CLI volume stop $V0; -SNAPD_PID=$(ps aux | grep snapd | grep -v grep | awk '{print $2}'); +SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}'); TEST ! [ $SNAPD_PID -gt 0 ]; diff --git a/tests/bugs/bug-1109889.t b/tests/bugs/bug-1109889.t index 2c2239fc57d..64d0b7ad1c6 100644 --- a/tests/bugs/bug-1109889.t +++ b/tests/bugs/bug-1109889.t @@ -49,7 +49,7 @@ TEST $CLI volume set $V0 features.uss enable; #let snapd get started properly and client connect to snapd EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" snap_client_connected_status $V0 -SNAPD_PID=$(ps aux | grep snapd | grep -v grep | awk '{print $2}'); +SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}'); TEST [ $SNAPD_PID -gt 0 ]; diff --git a/tests/bugs/bug-1111041.t b/tests/bugs/bug-1111041.t index 2ff5294f238..ad8a2a73652 100644 --- a/tests/bugs/bug-1111041.t +++ b/tests/bugs/bug-1111041.t @@ -25,7 +25,7 @@ TEST $CLI volume set $V0 features.uss enable; EXPECT "1" is_snapd_running $V0 -SNAPD_PID=$(ps aux | grep snapd | grep -v grep | awk '{print $2}'); +SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}'); TEST [ $SNAPD_PID -gt 0 ]; diff --git a/tests/volume.rc b/tests/volume.rc index 3ed0c6887c6..4e798dfc026 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -43,12 +43,12 @@ function remove_brick_status_completed_field { function get_mount_process_pid { local vol=$1 - ps aux | grep glusterfs | grep -E "volfile-id[ =]/?$vol " | awk '{print $2}' | head -1 + ps auxww | grep glusterfs | grep -E "volfile-id[ =]/?$vol " | awk '{print $2}' | head -1 } function get_nfs_pid () { - ps aux | grep "volfile-id\ gluster\/nfs" | awk '{print $2}' | head -1 + ps auxww | grep "volfile-id\ gluster\/nfs" | awk '{print $2}' | head -1 } function read_nfs_pidfile () @@ -112,7 +112,7 @@ function afr_child_up_status { function get_shd_process_pid { local vol=$1 - ps aux | grep glusterfs | grep -E "glustershd/run/glustershd.pid" | awk '{print $2}' | head -1 + ps auxww | grep glusterfs | grep -E "glustershd/run/glustershd.pid" | awk '{print $2}' | head -1 } function generate_shd_statedump { -- cgit