test_name=`basename $t`
group_file=$SRC_DIR/$test_dir/group.list
- if egrep -q "^$test_name" $group_file; then
+ if grep -Eq "^$test_name" $group_file; then
# in group file ... OK
echo $SRC_DIR/$test_dir/$test_name \
>>$tmp.arglist
mnt=$1
name=$2
- $BTRFS_UTIL_PROG sub list $mnt | egrep "\s$name$" | $AWK_PROG '{ print $2 }'
+ $BTRFS_UTIL_PROG sub list $mnt | grep -E "\s$name$" | $AWK_PROG '{ print $2 }'
}
# _require_btrfs_command <command> [<subcommand>|<option>]
_require_btrfs_dev_del_by_devid()
{
- $BTRFS_UTIL_PROG device delete --help | egrep devid > /dev/null 2>&1
+ $BTRFS_UTIL_PROG device delete --help | grep -E devid > /dev/null 2>&1
[ $? -eq 0 ] || _notrun "$BTRFS_UTIL_PROG too old "\
"(must support 'btrfs device delete <devid> /<mnt>')"
}
# Check options to be sure.
# XFS ignores dax option(or changes it to dax=never)
# and goes on if dev underneath does not support dax.
- _fs_options $LOGWRITES_DMDEV | egrep -q "dax(=always|,|$)"
+ _fs_options $LOGWRITES_DMDEV | grep -Eq "dax(=always|,|$)"
ret=$?
_log_writes_cleanup
if [ $ret -ne 0 ]; then
fi
- if egrep -i 'onl|ready' $tmp.status | grep -iv 'not ready' >/dev/null; then
+ if grep -Ei 'onl|ready' $tmp.status | grep -iv 'not ready' >/dev/null; then
:
else
echo "ERROR: $dumptape is not online"
i=0
while [ $i -lt 20 ]; do
echo "Checking status..." >>$seqres.full
- if _mt status 2>&1 | tee -a $seqres.full | egrep -i "onl|ready" >/dev/null; then
+ if _mt status 2>&1 | tee -a $seqres.full | grep -Ei "onl|ready" >/dev/null; then
break;
else
sleep 1
# some older kernels and is ext4-specific anyway.)
mkdir $SCRATCH_MNT/tmpdir
if _set_encpolicy $SCRATCH_MNT/tmpdir 2>&1 >>$seqres.full | \
- egrep -q 'Inappropriate ioctl for device|Operation not supported'
+ grep -Eq 'Inappropriate ioctl for device|Operation not supported'
then
_notrun "kernel does not support $FSTYP encryption"
fi
local keyspec=$(_generate_session_encryption_key)
fi
if _set_encpolicy $dir $keyspec $set_encpolicy_args \
- 2>&1 >>$seqres.full | egrep -q 'Invalid argument'; then
+ 2>&1 >>$seqres.full | grep -Eq 'Invalid argument'; then
_notrun "kernel does not support encryption policy: '$set_encpolicy_args'"
fi
# fscrypt allows setting policies with modes it knows about, even
# verbose output
_filter_fstrim()
{
- egrep -o "[0-9]+ bytes" | $AWK_PROG '{print $1}'
+ grep -Eo "[0-9]+ bytes" | $AWK_PROG '{print $1}'
}
# Remove the ending dot appended to mount error message, util-linux 2.30
else
echo "${fuzzkey}"
fi
- done | egrep "${filter}"
+ done | grep -E "${filter}"
}
# Navigate to some part of the filesystem and print the field info.
-# The first argument is an egrep filter for the fields
+# The first argument is an grep filter for the fields
# The rest of the arguments are xfs_db commands to locate the metadata.
_scratch_xfs_list_metadata_fields() {
filter="$1"
}
# Fuzz some of the fields of some piece of metadata
-# The first argument is an egrep filter for the field names
+# The first argument is an grep filter for the field names
# The second argument is the repair mode (online, offline, both)
# The rest of the arguments are xfs_db commands to locate the metadata.
#
# Inject our quota mount options
if echo "${MOUNT_OPTIONS}" | grep -q "${quota}"; then
return
- elif echo "${MOUNT_OPTIONS}" | egrep -q '(quota|noenforce)'; then
+ elif echo "${MOUNT_OPTIONS}" | grep -Eq '(quota|noenforce)'; then
_qmount_option "${quota}"
else
export MOUNT_OPTIONS="$MOUNT_OPTIONS -o ${quota}"
_cat_passwd | grep -q '^nobody'
[ $? -ne 0 ] && _notrun "password file does not contain user nobody."
- _cat_group | egrep -q '^no(body|group)'
+ _cat_group | grep -Eq '^no(body|group)'
[ $? -ne 0 ] && _notrun "group file does not contain nobody/nogroup."
}
_choose_gid()
{
- _cat_group | egrep '^no(body|group)' | perl -ne '@a = split(/:/); END { printf "id=%d name=%s\n", $a[2],$a[0] }'
+ _cat_group | grep -E '^no(body|group)' | perl -ne '@a = split(/:/); END { printf "id=%d name=%s\n", $a[2],$a[0] }'
}
_choose_prid()
# Report the block usage of root, $qa_user, and nobody
_report_quota_blocks() {
- repquota $1 | egrep "^($qa_user|root|nobody)" | awk '{print $1, $3, $4, $5}' | sort -r
+ repquota $1 | grep -E "^($qa_user|root|nobody)" | awk '{print $1, $3, $4, $5}' | sort -r
}
# Report the inode usage of root, $qa_user, and nobody
_report_quota_inodes() {
- repquota $1 | egrep "^($qa_user|root|nobody)" | awk '{print $1, $6, $7, $8}' | sort -r
+ repquota $1 | grep -E "^($qa_user|root|nobody)" | awk '{print $1, $6, $7, $8}' | sort -r
}
# Determine which type of quota we're using
{
local hugepgsz=$(awk '/Hugepagesize/ {print $2}' /proc/meminfo)
# Call _notrun if $hugepgsz is not a number
- echo "$hugepgsz" | egrep -q ^[0-9]+$ || \
+ echo "$hugepgsz" | grep -E -q ^[0-9]+$ || \
_notrun "Cannot get the value of Hugepagesize"
echo $((hugepgsz * 1024))
}
case $FSTYP in
xfs)
# don't override MKFS_OPTIONS that set a block size.
- echo $MKFS_OPTIONS |egrep -q "b?size="
+ echo $MKFS_OPTIONS |grep -E -q "b?size="
if [ $? -eq 0 ]; then
_scratch_mkfs_xfs -d size=$fssize $rt_ops
else
case $FSTYP in
xfs)
- if echo "$MKFS_OPTIONS" | egrep -q "b?size="; then
+ if echo "$MKFS_OPTIONS" | grep -E -q "b?size="; then
MKFS_OPTIONS=$(echo "$MKFS_OPTIONS" | sed -r "s/(b?size=)[0-9]+k?/\1$blocksize/")
else
MKFS_OPTIONS+=" -b size=$blocksize"
fi
- if echo "$MKFS_OPTIONS" | egrep -q "(su|sunit|sw|swidth)="; then
+ if echo "$MKFS_OPTIONS" | grep -E -q "(su|sunit|sw|swidth)="; then
MKFS_OPTIONS=$(echo "$MKFS_OPTIONS" | sed -r \
-e "s/(su|sunit)=[0-9kmg]+/su=$sunit_bytes/" \
-e "s/(sw|swidth)=[0-9kmg]+/sw=$swidth_mult/")
{
case "$FSTYP" in
glusterfs)
- echo $SCRATCH_DEV | egrep -q ":/?" > /dev/null 2>&1
+ echo $SCRATCH_DEV | grep -E -q ":/?" > /dev/null 2>&1
if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
_notrun "this test requires a valid \$SCRATCH_DEV"
fi
{
case "$FSTYP" in
glusterfs)
- echo $TEST_DEV | egrep -q ":/?" > /dev/null 2>&1
+ echo $TEST_DEV | grep -E -q ":/?" > /dev/null 2>&1
if [ -z "$TEST_DEV" -o "$?" != "0" ]; then
_notrun "this test requires a valid \$TEST_DEV"
fi
{
local ops=$(_normalize_mount_options "$MOUNT_OPTIONS")
- echo $ops | egrep -qw "dax(=always| |$)" && return 0
+ echo $ops | grep -E -qw "dax(=always| |$)" && return 0
return 1
}
# Test xfs_io chattr support AND
# filesystem FS_IOC_FSSETXATTR support
# 'tPnE' flags are only valid for a directory so check them on a directory.
- if echo "$param" | egrep -q 't|P|n|E'; then
+ if echo "$param" | grep -E -q 't|P|n|E'; then
testio=`$XFS_IO_PROG -F -c "chattr +$param" $testdir 2>&1`
attr_info=`$XFS_IO_PROG -F -r -c "lsattr" $testdir | awk '{print $1}'`
$XFS_IO_PROG -F -r -c "chattr -$param" $testdir 2>&1
"-T")
# Check O_TMPFILE support in xfs_io, kernel and fs
testio=`$XFS_IO_PROG -T -c quit $TEST_DIR 2>&1`
- echo $testio | egrep -q "invalid option|Is a directory" && \
+ echo $testio | grep -E -q "invalid option|Is a directory" && \
_notrun "xfs_io $command support is missing"
echo $testio | grep -q "Operation not supported" && \
_notrun "O_TMPFILE is not supported"
# Filter the knowen errors the UDF Verifier reports.
_udf_test_known_error_filter()
{
- egrep -v "PVD 60 Error: Interchange Level: 1, Maximum Interchange Level: 0|FSD 28 Error: Interchange Level: 1, Maximum Interchange Level: 1,|PVD 72 Warning: Volume Set Identifier: \"\*IRIX UDF\",|Warning: [0-9]+ unused blocks NOT marked as unallocated."
+ grep -E -v "PVD 60 Error: Interchange Level: 1, Maximum Interchange Level: 0|FSD 28 Error: Interchange Level: 1, Maximum Interchange Level: 1,|PVD 72 Warning: Volume Set Identifier: \"\*IRIX UDF\",|Warning: [0-9]+ unused blocks NOT marked as unallocated."
}
rm -f $seqres.checkfs
sleep 1 # Due to a problem with time stamps in udf_test
- $here/src/udf_test $opt_arg $device | tee $seqres.checkfs | egrep "Error|Warning" | \
+ $here/src/udf_test $opt_arg $device | tee $seqres.checkfs | grep -E "Error|Warning" | \
_udf_test_known_error_filter | \
- egrep -iv "Error count:.*[0-9]+.*total occurrences:.*[0-9]+|Warning count:.*[0-9]+.*total occurrences:.*[0-9]+" && \
+ grep -E -iv "Error count:.*[0-9]+.*total occurrences:.*[0-9]+|Warning count:.*[0-9]+.*total occurrences:.*[0-9]+" && \
echo "Warning UDF Verifier reported errors see $seqres.checkfs." && return 1
return 0
}
_try_scratch_mount "-o $option" > /dev/null 2>&1 || return 1
- if _fs_options $SCRATCH_DEV | egrep -q "dax(=always|,|$)"; then
+ if _fs_options $SCRATCH_DEV | grep -E -q "dax(=always|,|$)"; then
_scratch_unmount
return 0
else
shift
while [ $# -gt 0 ]; do
local pattern=$1
- echo "$pattern" | egrep -q "dax(=always|$)" && \
+ echo "$pattern" | grep -E -q "dax(=always|$)" && \
pattern="dax(=always| |$)"
- if echo $mnt_opts | egrep -q "$pattern"; then
+ if echo $mnt_opts | grep -E -q "$pattern"; then
_notrun "mount option \"$1\" not allowed in this test"
fi
shift
# _dmesg_since_test_start.
_check_dmesg_for()
{
- _dmesg_since_test_start | egrep -q "$1"
+ _dmesg_since_test_start | grep -E -q "$1"
}
# Default filter for dmesg scanning.
test -e "$filter_file" && extra_filter="-f $filter_file"
- egrep -v -e "BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low" \
+ grep -E -v -e "BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low" \
-e "BUG: MAX_STACK_TRACE_ENTRIES too low" \
$extra_filter
}
local filter=${1:-_check_dmesg_filter}
_dmesg_since_test_start | $filter >$seqres.dmesg
- egrep -q -e "kernel BUG at" \
+ grep -E -q -e "kernel BUG at" \
-e "WARNING:" \
-e "\bBUG:" \
-e "Oops:" \
_filter_dd()
{
- fgrep -v records # lose records in/out lines
+ grep -F -v records # lose records in/out lines
}
# do some controlled corrupting & ensure repair recovers us
# try again without MKFS_OPTIONS because that's what _scratch_do_mkfs
# will do if we pass in the log size option.
if [ $mkfs_status -ne 0 ] &&
- ! egrep -q '(log size.*too small, minimum|external log device.*too small, must be)' $tmp.mkfserr; then
+ ! grep -E -q '(log size.*too small, minimum|external log device.*too small, must be)' $tmp.mkfserr; then
eval "$mkfs_cmd $extra_mkfs_options $SCRATCH_DEV" \
2>$tmp.mkfserr 1>$tmp.mkfsstd
mkfs_status=$?
{
local path="$1"
- if ! ($XFS_IO_PROG -c "stat -v" "$path" 2>&1 | egrep -q '(rt-inherit|realtime)'); then
+ if ! ($XFS_IO_PROG -c "stat -v" "$path" 2>&1 | grep -E -q '(rt-inherit|realtime)'); then
_get_block_size "$path"
return
fi
done
local wr_cmd="write"
- _scratch_xfs_db -x -c "help write" | egrep -q "(-c|-d)" && value="-- ${value}"
- _scratch_xfs_db -x -c "help write" | egrep -q "(-d)" && wr_cmd="${wr_cmd} -d"
+ _scratch_xfs_db -x -c "help write" | grep -E -q "(-c|-d)" && value="-- ${value}"
+ _scratch_xfs_db -x -c "help write" | grep -E -q "(-d)" && wr_cmd="${wr_cmd} -d"
_scratch_xfs_db -x "${cmds[@]}" -c "${wr_cmd} ${key} ${value}"
}
local pquota=0
# Can't have group and project quotas in XFS v4
- echo "$MOUNT_OPTIONS" | egrep -q "(gquota|grpquota|grpjquota=|gqnoenforce)" && gquota=1
- echo "$MOUNT_OPTIONS" | egrep -q "(\bpquota|prjquota|pqnoenforce)" && pquota=1
+ echo "$MOUNT_OPTIONS" | grep -E -q "(gquota|grpquota|grpjquota=|gqnoenforce)" && gquota=1
+ echo "$MOUNT_OPTIONS" | grep -E -q "(\bpquota|prjquota|pqnoenforce)" && pquota=1
if [ $gquota -gt 0 ] && [ $pquota -gt 0 ]; then
export MOUNT_OPTIONS=$(echo $MOUNT_OPTIONS \
_run_btrfs_util_prog filesystem show -m $SCRATCH_MNT
# Skip -r test for configs without mirror OR replace cancel
- if echo $mkfs_options | egrep -qv "raid1|raid5|raid6|raid10" || \
+ if echo $mkfs_options | grep -E -qv "raid1|raid5|raid6|raid10" || \
[ "${with_cancel}Q" = "cancelQ" ]; then
_scratch_unmount > /dev/null 2>&1
_scratch_dev_pool_put
$BTRFS_UTIL_PROG filesystem show -m $SCRATCH_MNT | _filter_btrfs_filesystem_show
error_devid=`$BTRFS_UTIL_PROG filesystem show -m $SCRATCH_MNT |\
- egrep $DMERROR_DEV | $AWK_PROG '{print $2}'`
+ grep -E $DMERROR_DEV | $AWK_PROG '{print $2}'`
snapshot_cmd="$BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT"
snapshot_cmd="$snapshot_cmd $SCRATCH_MNT/snap_\`date +'%H_%M_%S_%N'\`"
$BTRFS_UTIL_PROG filesystem show -m $SCRATCH_MNT | _filter_btrfs_filesystem_show
error_devid=`$BTRFS_UTIL_PROG filesystem show -m $SCRATCH_MNT |\
- egrep $DMERROR_DEV | $AWK_PROG '{print $2}'`
+ grep -E $DMERROR_DEV | $AWK_PROG '{print $2}'`
snapshot_cmd="$BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT"
snapshot_cmd="$snapshot_cmd $SCRATCH_MNT/snap_\`date +'%H_%M_%S_%N'\`"
# BTRFS error (device sdc): parent transid verify failed on 32243712 wanted 24 \
# found 27
#
-_dmesg_since_test_start | egrep -e '\bBTRFS error \(device .*?\):'
+_dmesg_since_test_start | grep -E -e '\bBTRFS error \(device .*?\):'
status=0
exit
# case, so we don't have a mismatch with the golden output in case we
# run with a non default $LOAD_FACTOR (default is 1). We only want the
# mismatch with the golden output in case there's a checksum failure.
- $FSSUM_PROG -r "$snap_csum" "$snap_copy" | egrep -v '^OK$'
+ $FSSUM_PROG -r "$snap_csum" "$snap_copy" | grep -E -v '^OK$'
done
echo "Silence is golden"
echo "++ check fs (2)" >> $seqres.full
_check_scratch_fs >> $seqres.full 2>&1
-egrep -q '(did not fix|makes no progress)' $seqres.full && echo "e2fsck failed" | tee -a $seqres.full
+grep -E -q '(did not fix|makes no progress)' $seqres.full && echo "e2fsck failed" | tee -a $seqres.full
if [ "$(wc -l < "$ROUND2_LOG")" -ne 8 ]; then
echo "e2fsck did not fix everything" | tee -a $seqres.full
fi
_scratch_cycle_mount
fbytes() {
- egrep -v '(61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62)'
+ grep -E -v '(61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62)'
}
reader() {
_scratch_cycle_mount
fbytes() {
- egrep -v '(61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62)'
+ grep -E -v '(61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62)'
}
reader() {
testf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
echo "Uniqueness of keys?"
-crazy_keys="$(_getfattr --absolute-names -d "${testfile}" | egrep -c '(french_|chinese_|greek_|arabic_|urk)')"
+crazy_keys="$(_getfattr --absolute-names -d "${testfile}" | grep -E -c '(french_|chinese_|greek_|arabic_|urk)')"
expected_keys=11
test "${crazy_keys}" -ne "${expected_keys}" && echo "Expected ${expected_keys} keys, saw ${crazy_keys}."
# Different with generic/164,165, mread copies data from mmapped area
# one-byte-at-a-time, which may cause races during reflink_range().
# So the result of _mread_range() may be a mix of 61 and 62.
- egrep -v '((61|62) ){15}(61|62)'
+ grep -E -v '((61|62) ){15}(61|62)'
}
reader() {
echo "holes is in range"
else
# quick check - how many holes did we get?
- count=`xfs_bmap $out | egrep -c ': hole'`
+ count=`xfs_bmap $out | grep -E -c ': hole'`
# blocks can end up adjacent, therefore number of holes varies
_within_tolerance "holes" $count $_holes 10% -v
fi
if [ $failed -eq 0 ]
then
# quick check - how many holes did we get?
- count=`xfs_bmap $out | egrep -c ': hole'`
+ count=`xfs_bmap $out | grep -E -c ': hole'`
echo " $count hole(s) detected"
# and how big was the file?
_filesize $out
#
_filter_bad_ids()
{
- egrep -v 'bad user id 0xffffffff|bad group id 0xffffffff'
+ grep -E -v 'bad user id 0xffffffff|bad group id 0xffffffff'
}
# real QA test starts here
# Filter out the housekeeping files of xfsrestore
#
$AWK_PROG 'NF == 9 { print $5, $9 }' |\
- egrep -v 'dumpdir|housekeeping|dirattr|dirextattr|namreg|state|tree'
+ grep -E -v 'dumpdir|housekeeping|dirattr|dirextattr|namreg|state|tree'
}
# real QA test starts here
if [ $i -gt 0 ]; then
sleep 2
_modify_level $i
- fi
+ fi
_stable_fs
sleep 2
find $__dir -exec $here/src/lstat64 -t {} \; |\
sed -e 's/.*dumpdir/dumpdir/' -e '/^dumpdir /d' |\
sed -e 's/.*restoredir/restoredir/' -e '/^restoredir /d' |\
- egrep -v 'housekeeping|dirattr|dirextattr|namreg|state|tree' |\
+ grep -E -v 'housekeeping|dirattr|dirextattr|namreg|state|tree' |\
awk '$3 ~ /^d/ { $2 = "XXX" } {print}' |\
LC_COLLATE=POSIX sort
}
echo "++ check fs (2)" >> $seqres.full
_repair_scratch_fs >> $seqres.full 2>&1
-egrep -q '(did not fix|makes no progress)' $seqres.full && echo "xfs_repair failed" | tee -a $seqres.full
+grep -E -q '(did not fix|makes no progress)' $seqres.full && echo "xfs_repair failed" | tee -a $seqres.full
if [ "$(wc -l < "$ROUND2_LOG")" -ne 8 ]; then
echo "xfs_repair did not fix everything" | tee -a $seqres.full
fi
#
cat /usr/include/xfs/xfs*.h | indent |\
_attribute_filter |\
-egrep '(} *xfs_.*_t|^struct xfs_[a-z0-9_]*$)' |\
-egrep -v -f $tmp.ignore |\
+grep -E '(} *xfs_.*_t|^struct xfs_[a-z0-9_]*$)' |\
+grep -E -v -f $tmp.ignore |\
sed -e 's/^.*}[[:space:]]*//g' -e 's/;.*$//g' -e 's/_t, /_t\n/g' |\
sort | uniq |\
awk '{printf("printf(\"sizeof(%s) = %%zu\\n\", sizeof(%s));\n", $0, $0);}' |\
(echo "sb 0"; sleep 0.5;
echo "p magicnum"; sleep 0.5;
echo "source $tmp.a"; sleep 0.5;
- echo "p magicnum"; sleep 0.5) | _scratch_xfs_db 2>&1 | sed -e 's/xfs_db> //g' -e 's/0x58465342/XFS_MAGIC/g' | egrep '(This is file|magicnum =)'
+ echo "p magicnum"; sleep 0.5) | _scratch_xfs_db 2>&1 | sed -e 's/xfs_db> //g' -e 's/0x58465342/XFS_MAGIC/g' | grep -E '(This is file|magicnum =)'
# success, all done
status=0
# file_offset file_end physical_offset physical_end
rtfile_exts() {
$XFS_IO_PROG -c 'bmap -elp' $rtfile | \
- egrep -v '(^/|EXT:|hole)' | \
+ grep -E -v '(^/|EXT:|hole)' | \
tr ':.[]' ' ' | \
while read junk foff fend physoff physend junk; do
echo "$foff $fend $physoff $physend"
{
tee -a $seqres.full | \
sed -e "s/core.forkoff/forkoff/g" | \
- egrep '^u.sfdir2|^u.sfdir3|^a.sfattr|forkoff' | \
- egrep -v 'inumber|parent' | \
+ grep -E '^u.sfdir2|^u.sfdir3|^a.sfattr|forkoff' | \
+ grep -E -v 'inumber|parent' | \
sed -e s/sfdir3/sfdir2/g | \
grep -v filetype
}
_require_command "$(type -P $CAT)" $CAT
for COMMAND in `$XFS_IO_PROG -c help | awk '{print $1}' | grep -v "^Use"`; do
- $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
+ $CAT "$MANPAGE" | grep -E -q "^\.B.*$COMMAND" || \
echo "$COMMAND not documented in the xfs_io manpage"
done
do_repquota()
{
- repquota $SCRATCH_MNT | egrep '^(fsgqa|root|nobody)' | sort -r
+ repquota $SCRATCH_MNT | grep -E '^(fsgqa|root|nobody)' | sort -r
}
rm -f "$seqres.full"
echo "Concurrent repair"
filter_output() {
- egrep -v '(Device or resource busy|Invalid argument)'
+ grep -E -v '(Device or resource busy|Invalid argument)'
}
freeze_loop() {
end="$1"
char *str;
} syms[] = {
ENDL
-egrep '(__print_flags|__print_symbolic)' $ftrace_dir*/*/format | \
+grep -E '(__print_flags|__print_symbolic)' $ftrace_dir*/*/format | \
sed -f $sedprog | grep '^{' | sort | uniq >> $cprog
cat >> $cprog << ENDL
};
_require_command "$(type -P $CAT)" $CAT
for COMMAND in `$XFS_SPACEMAN_PROG -c help $TEST_DIR | awk '{print $1}' | grep -v "^Use"`; do
- $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
+ $CAT "$MANPAGE" | grep -E -q "^\.B.*$COMMAND" || \
echo "$COMMAND not documented in the xfs_spaceman manpage"
done
$MKFS_XFS_PROG $file >> /dev/null
for COMMAND in `$XFS_DB_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do
- $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
+ $CAT "$MANPAGE" | grep -E -q "^\.B.*$COMMAND" || \
echo "$COMMAND not documented in the xfs_db manpage"
done
_require_command "$(type -P $CAT)" $CAT
for COMMAND in `$XFS_QUOTA_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do
- $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
+ $CAT "$MANPAGE" | grep -E -q "^\.B.*$COMMAND" || \
echo "$COMMAND not documented in the xfs_quota manpage"
done
echo "Concurrent fsmap and freeze"
filter_output() {
- egrep -v '(Device or resource busy|Invalid argument)'
+ grep -E -v '(Device or resource busy|Invalid argument)'
}
freeze_loop() {
end="$1"
fi
_dmesg_since_test_start | tac | sed -ne "0,\#${kmsg}#p" | tac | \
- egrep -q 'Metadata corruption detected at' && hasmsg=1
+ grep -E -q 'Metadata corruption detected at' && hasmsg=1
_scratch_unmount > /dev/null 2>&1
[ $mounted -eq 0 -o $hasmsg -eq 1 ] || \
formatted_blksz="$(_get_block_size $SCRATCH_MNT)"
test "$formatted_blksz" -ne "$dbsize" && \
_notrun "Tried to format with $dbsize blocksize, got $formatted_blksz."
-$XFS_INFO_PROG $SCRATCH_MNT | egrep -q 'realtime.*blocks=0' && \
+$XFS_INFO_PROG $SCRATCH_MNT | grep -E -q 'realtime.*blocks=0' && \
_notrun "Filesystem should have a realtime volume"
echo "Consume free space"
check_dmesg_for_since_tag()
{
- dmesg_since_test_tag | egrep -q "$1"
+ dmesg_since_test_tag | grep -E -q "$1"
}
echo "Silence is golden."