Print this page
12181 zvol swap tests should avoid grep -w
*** 24,33 ****
--- 24,34 ----
# Use is subject to license terms.
#
#
# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+ # Copyright 2020 Joyent, Inc.
#
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/zvol/zvol.cfg
*** 131,138 ****
if [[ -z $device ]] ; then
log_note "No device specified."
return 1
fi
! swap -l | grep -w $device > /dev/null 2>&1
return $?
}
--- 132,140 ----
if [[ -z $device ]] ; then
log_note "No device specified."
return 1
fi
! swap -l | awk 'NR > 1 { print $1 }' | \
! grep "^$device\$" > /dev/null 2>&1
return $?
}