summaryrefslogtreecommitdiffstats
path: root/tests/basic
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-02-19 17:54:03 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-02-23 22:46:56 -0800
commita46325cd37806a8e9d1abbb121d4e854799042ae (patch)
treed9e9401f67842a00e1da22fd6537d95eec56d125 /tests/basic
parent21cf6ac8b852a04ded1e5399240292d0795035f6 (diff)
Fix for test uss.t and bug-1167580-set-proper-uid-and-gid-during-nfs-access.t
testcase uss.t and bug-1167580-set-proper-uid-and-gid-during-nfs-access.t uses below method to generate random string cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 8 | head -n 1 Doing a cat on /dev/urandom can consume more CPU usage. Change to: uuidgen | tr -dc 'a-zA-Z' | head -c 8 Backport of http://review.gluster.org/#/c/9703/ Change-Id: Id08ec47e39b12f956e266d30cc5327b5b70c2fb0 Reviewed-on: http://review.gluster.org/9728 BUG: 1165938 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-by: Justin Clift <justin@gluster.org> Tested-by: Justin Clift <justin@gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/uss.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/basic/uss.t b/tests/basic/uss.t
index a90919ca0f6..eeccb28be05 100644
--- a/tests/basic/uss.t
+++ b/tests/basic/uss.t
@@ -54,7 +54,7 @@ TEST $CLI snapshot create snap4 $V0;
## Test that features.uss takes only options enable/disable and throw error for
## any other argument.
for i in {1..10}; do
- RANDOM_STRING=`cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 8 | head -n 1`
+ RANDOM_STRING=$(uuidgen | tr -dc 'a-zA-Z' | head -c 8)
TEST_IN_LOOP ! $CLI volume set $V0 features.uss $RANDOM_STRING
done