Skip to content

nvme/039 assumes too much #224

@igaw

Description

@igaw

nvme/039 started to fail with the current nvme-cli master. nvme-cli started to probe if the 64bit ioctl can be used with

	ret = ioctl(hdl->fd, NVME_IOCTL_ADMIN64_CMD, &dummy);
	if (ret > 0)
		hdl->ioctl64 = true;

and the tests does:

inject_access_denied_on_identify()
{
	# Inject a 'Access Denied' (0x286) status error on an
	# Identify admin command
	_nvme_enable_err_inject "$1" 0 100 1 0x286 1

	nvme admin-passthru /dev/"$1" --opcode=0x06 --data-len=4096 \
	    --cdw10=1 -r 2> /dev/null 1>&2

	_nvme_disable_err_inject "$1"

	if ${nvme_verbose_errors}; then
		last_dmesg 1 | grep "Access Denied (" | \
		    sed 's/nvme.*://g'
	else
		last_dmesg 1 | grep "Admin Cmd(" | \
		    sed 's/Admin Cmd/Identify/g' | \
		    sed 's/I\/O Error/Access Denied/g' | \
		    sed 's/nvme.*://g'
	fi
}

nvme/039 assumes after setting up the fault injection the next command will be the passthru command it issues. I don't think this is a very reliable approach IMO.

see linux-nvme/nvme-cli#3070

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions