autotest: only delete partitions on NVMe namespaces

Don't try to delete partitions on NVMe block devices that are already
partitions.  For example, clean up nvme0n1 but not nvme0n1p1.

Change-Id: I1f642abd7f6ff6b9b6c08d65afee04b9bc9a3430
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-10-04 09:44:55 -07:00
parent 2f777920c9
commit 1085e6fd40

View File

@ -49,7 +49,7 @@ if [ $(uname -s) = Linux ]; then
sleep 10
# Delete all partitions on NVMe devices
devs=`lsblk -l -o NAME | grep nvme`
devs=`lsblk -l -o NAME | grep nvme | grep -v p`
for dev in $devs; do
parted -s /dev/$dev mklabel msdos
done