ZTS: Use POSIX-compatible space character class

FreeBSD recently integrated a change which causes \s in a regex to
throw an error instead of silently being misinterpreted as an s.

Change the regex in zpool_colors.ksh to use [[:space:]].

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #10651
This commit is contained in:
Ryan Moeller 2020-07-31 21:11:21 -04:00 committed by GitHub
parent 25499e2139
commit 721ed01548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ log_note "$(faketty TERM=xterm-256color ZFS_COLOR=1 zpool status)"
# Replace the escape codes with "ESC" so they're easier to grep # Replace the escape codes with "ESC" so they're easier to grep
out="$(faketty TERM=xterm-256color ZFS_COLOR=1 zpool status | \ out="$(faketty TERM=xterm-256color ZFS_COLOR=1 zpool status | \
grep -E 'pool:|DEGRADED' | \ grep -E 'pool:|DEGRADED' | \
sed -r 's/\s+//g;'$(echo -e 's/\033/ESC/g'))" sed -r 's/[[:space:]]+//g;'$(echo -e 's/\033/ESC/g'))"
log_note "$(echo $out)" log_note "$(echo $out)"