]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/test/cli/* tests: POSIX Convert grep -P to grep -E (v2) 10319/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 16 Jul 2016 17:01:42 +0000 (19:01 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Wed, 20 Jul 2016 11:42:19 +0000 (13:42 +0200)
 - FreeBSD does not have grep -P
 - [Posix grep]: replace \t by [[:space:]]

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/cli/ceph-authtool/cap-bin.t
src/test/cli/ceph-authtool/cap-invalid.t
src/test/cli/ceph-authtool/cap-overwrite.t
src/test/cli/ceph-authtool/cap.t
src/test/cli/osdmaptool/test-map-pgs.t

index 50efa5c9dd7ef837615434314db76ec0ffdfed5d..6ec76772cbf2b7c675e5d67da8fa8032c18c2d78 100644 (file)
@@ -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)
index c857e26ab5264d829b8101335c7c3480e72eeebb..6b4897cda39e9ce0a798e99a4607a4b4cd0b68b2 100644 (file)
@@ -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)
index 30788dfd4fd8b7ebde18653cd8fe86dbc0c4e843..94146b23f84b960b48573b0ed585cfe02f9efd97 100644 (file)
@@ -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)
index 9681d2acfeb04453cd9d240f66c77c45f81ad4aa..65631f3be5198cbbbb24fcb3cec8556bfca81a66 100644 (file)
@@ -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
index 13b8c5c0900537fe55830eec78560a0259e0f5c3..0c474d76b53d323f44eb19283f28ad50f56ff816 100644 (file)
@@ -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