mirror of
https://github.com/ceph/ceph
synced 2025-01-18 09:02:08 +00:00
osdmaptool/test-map-pgs.t: fix escaping to fix run
Run failed always running into the '|| cat $OUT' case due to bad escaping of '\t'. This is caused by different shells on different distros (e.g. bash on SUSE vs dash on Ubuntu). Use 'grep -P ' and fix the regex to make it shell independet. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
235f4ca6dc
commit
be70c1ffe3
@ -24,8 +24,7 @@
|
||||
pool 1 pg_num 8000
|
||||
pool 2 pg_num 8000
|
||||
$ TOTAL=$((POOL_COUNT * $PG_NUM))
|
||||
$ PATTERN=$(echo "size $SIZE\t$TOTAL")
|
||||
$ grep "$PATTERN" $OUT || cat "$OUT"
|
||||
$ grep -P "size $SIZE\t$TOTAL" $OUT || cat $OUT
|
||||
size 3\t24000 (esc)
|
||||
$ STATS_CRUSH=$(grep '^ avg ' "$OUT")
|
||||
#
|
||||
@ -39,8 +38,7 @@
|
||||
pool 1 pg_num 8000
|
||||
pool 2 pg_num 8000
|
||||
$ TOTAL=$((POOL_COUNT * $PG_NUM))
|
||||
$ PATTERN=$(echo "size $SIZE\t$TOTAL")
|
||||
$ grep "$PATTERN" $OUT || cat "$OUT"
|
||||
$ grep -P "size $SIZE\t$TOTAL" $OUT || cat $OUT
|
||||
size 3\t24000 (esc)
|
||||
$ STATS_RANDOM=$(grep '^ avg ' "$OUT")
|
||||
# it is almost impossible to get the same stats with random and crush
|
||||
|
Loading…
Reference in New Issue
Block a user