test, blockdev: simplify the if statement

Change-Id: I88b4e91181ef87264a71bcbddb56d7a71cc0b084
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/369542
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ziye Yang 2017-07-15 00:23:56 +08:00 committed by Jim Harris
parent 6bd54f1bf1
commit 36a0d1e5d1

View File

@ -23,7 +23,7 @@ if [ $(uname -s) = Linux ] && hash sgdisk; then
echo "[Gpt]" >> $testdir/bdev.conf
echo " Disable Yes" >> $testdir/bdev.conf
if [ ! -z "`grep "Nvme0" $testdir/bdev.conf`" ]; then
if grep -q Nvme0 $testdir/bdev.conf; then
modprobe nbd
$testdir/nbd/nbd -c $testdir/bdev.conf -b Nvme0n1 -n /dev/nbd0 &
nbd_pid=$!