summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2018-05-03 12:15:52 -0400
committerjiffin tony Thottan <jthottan@redhat.com>2018-06-11 06:40:49 +0000
commit68e3af4cc043a460e814215be2a7953d52b048ba (patch)
treebdcb39dd1d27fa928219ce5b8edb735556fec25f
parent646a57e40685e8fb55b4649a2724ade9714df097 (diff)
use awk to get a specific line from the output instead of cut
cut -d$'\n' is not separating the xattrs shown as part of getfattr output. Hence use awk to get the nth line of getfattr output for nth iteration in the for loop. Change-Id: I1a96cd3f72f4f407f9a783375f78d9a69d5d3885 fixes: bz#1580519 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> (cherry picked from commit bef654f48c14bfd7ce20702edff41052f6f54bdc)
-rwxr-xr-xtests/bugs/posix/bug-990028.t8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/bugs/posix/bug-990028.t b/tests/bugs/posix/bug-990028.t
index 5006a61..bef36a8 100755
--- a/tests/bugs/posix/bug-990028.t
+++ b/tests/bugs/posix/bug-990028.t
@@ -78,7 +78,7 @@ function links_across_directories()
TEST [ $LINES = 2 ]
for i in $(seq 1 2); do
- HL=`getfattr -m "trusted.pgfid.*" -de hex $B0/brick/dir$i/file$i 2>&1 | grep "trusted.pgfid" | cut -d$'\n' -f$i | cut -d'=' -f2`
+ HL=`getfattr -m "trusted.pgfid.*" -de hex $B0/brick/dir$i/file$i 2>&1 | grep "trusted.pgfid" | awk -v n=$i 'NR==n' | cut -d'=' -f2`
TEST_IN_LOOP [ $HL = "0x00000001" ]
done
@@ -155,9 +155,3 @@ links_across_directories;
TEST $CLI volume stop $V0
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