Commit 0e2b281b authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

test/setup: Ignore atari partition table



It seems some versions of blkid report improper atari as an installed
partition table on devices filled with random data. Ignore that case
for now so the tests are able to find usuable nvme device.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: If6604ddf7099d3a98cfa36caab1e806d5f931886
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9143


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent a595959d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -184,7 +184,11 @@ for block in "/sys/block/nvme"*; do
	# there's any metadata (pt, fs, etc.) present on the drive.
	# If the drive's size is less than 2G, skip it as we need
	# something bigger for the tests.
	if ! blkid "/dev/${block##*/}" && (($(sec_size_to_bytes "${block##*/}") >= min_disk_size)); then
	# FIXME: Special case to ignore atari as a potential false
	# positive:
	# https://github.com/spdk/spdk/issues/2079
	pt=$(blkid -s PTTYPE -o value "/dev/${block##*/}") || pt=none
	if [[ $pt == none || $pt == atari ]] && (($(sec_size_to_bytes "${block##*/}") >= min_disk_size)); then
		blocks+=("${block##*/}")
		blocks_to_pci["${block##*/}"]=$pci
	fi