From: Willem Jan Withagen Date: Sat, 16 Jul 2016 17:01:42 +0000 (+0200) Subject: src/test/cli/* tests: POSIX Convert grep -P to grep -E (v2) X-Git-Tag: ses5-milestone5~311^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4dd92f99ee270ce62ce7eae5fe32397d31df25e6;p=ceph.git src/test/cli/* tests: POSIX Convert grep -P to grep -E (v2) - FreeBSD does not have grep -P - [Posix grep]: replace \t by [[:space:]] Signed-off-by: Willem Jan Withagen --- diff --git a/src/test/cli/ceph-authtool/cap-bin.t b/src/test/cli/ceph-authtool/cap-bin.t index 50efa5c9dd7e..6ec76772cbf2 100644 --- a/src/test/cli/ceph-authtool/cap-bin.t +++ b/src/test/cli/ceph-authtool/cap-bin.t @@ -2,5 +2,5 @@ creating kring $ ceph-authtool --cap osd 'allow rx pool=swimming' kring - $ ceph-authtool kring --list|grep -P '^\tcaps ' + $ ceph-authtool kring --list|grep -E '^[[:space:]]caps ' \tcaps osd = "allow rx pool=swimming" (esc) diff --git a/src/test/cli/ceph-authtool/cap-invalid.t b/src/test/cli/ceph-authtool/cap-invalid.t index c857e26ab526..6b4897cda39e 100644 --- a/src/test/cli/ceph-authtool/cap-invalid.t +++ b/src/test/cli/ceph-authtool/cap-invalid.t @@ -3,10 +3,10 @@ # TODO is this nice? $ ceph-authtool --cap osd 'broken' kring - $ ceph-authtool kring --list|grep -P '^\tcaps ' + $ ceph-authtool kring --list|grep -E '^[[:space:]]caps ' \tcaps osd = "broken" (esc) # TODO is this nice? $ ceph-authtool --cap xyzzy 'broken' kring - $ ceph-authtool kring --list|grep -P '^\tcaps ' + $ ceph-authtool kring --list|grep -E '^[[:space:]]caps ' \tcaps xyzzy = "broken" (esc) diff --git a/src/test/cli/ceph-authtool/cap-overwrite.t b/src/test/cli/ceph-authtool/cap-overwrite.t index 30788dfd4fd8..94146b23f84b 100644 --- a/src/test/cli/ceph-authtool/cap-overwrite.t +++ b/src/test/cli/ceph-authtool/cap-overwrite.t @@ -2,10 +2,10 @@ creating kring $ ceph-authtool --cap osd 'allow rx pool=swimming' kring - $ ceph-authtool kring --list|grep -P '^\tcaps ' + $ ceph-authtool kring --list|grep -E '^[[:space:]]caps ' \tcaps osd = "allow rx pool=swimming" (esc) # TODO it seems --cap overwrites all previous caps; is this wanted? $ ceph-authtool --cap mds 'allow' kring - $ ceph-authtool kring --list|grep -P '^\tcaps ' + $ ceph-authtool kring --list|grep -E '^[[:space:]]caps ' \tcaps mds = "allow" (esc) diff --git a/src/test/cli/ceph-authtool/cap.t b/src/test/cli/ceph-authtool/cap.t index 9681d2acfeb0..65631f3be519 100644 --- a/src/test/cli/ceph-authtool/cap.t +++ b/src/test/cli/ceph-authtool/cap.t @@ -2,7 +2,7 @@ creating kring $ ceph-authtool --cap osd 'allow rx pool=swimming' kring - $ ceph-authtool kring --list|grep -P '^\tcaps ' + $ ceph-authtool kring --list|grep -E '^[[:space:]]caps ' \tcaps osd = "allow rx pool=swimming" (esc) $ cat kring diff --git a/src/test/cli/osdmaptool/test-map-pgs.t b/src/test/cli/osdmaptool/test-map-pgs.t index 13b8c5c09005..0c474d76b53d 100644 --- a/src/test/cli/osdmaptool/test-map-pgs.t +++ b/src/test/cli/osdmaptool/test-map-pgs.t @@ -22,7 +22,7 @@ $ grep "pg_num $PG_NUM" "$OUT" || cat $OUT pool 0 pg_num 8000 $ TOTAL=$((POOL_COUNT * $PG_NUM)) - $ grep -P "size $SIZE\t$TOTAL" $OUT || cat $OUT + $ grep -E "size $SIZE[[:space:]]$TOTAL" $OUT || cat $OUT size 3\t8000 (esc) $ STATS_CRUSH=$(grep '^ avg ' "$OUT") # @@ -34,7 +34,7 @@ $ grep "pg_num $PG_NUM" "$OUT" || cat $OUT pool 0 pg_num 8000 $ TOTAL=$((POOL_COUNT * $PG_NUM)) - $ grep -P "size $SIZE\t$TOTAL" $OUT || cat $OUT + $ grep -E "size $SIZE[[:space:]]$TOTAL" $OUT || cat $OUT size 3\t8000 (esc) $ STATS_RANDOM=$(grep '^ avg ' "$OUT") # it is almost impossible to get the same stats with random and crush