[PATCH 6/9] nvme/041: test different key types

Sagi Grimberg sagi at grimberg.me
Mon Nov 22 01:45:07 PST 2021


>>> +test() {
>>> +    local port
>>> +    local genctr
>>> +    local subsys="blktests-subsystem-"
>>> +    local hostid="$(uuidgen)"
>>> +    local hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
>>> +    local scratch="/tmp/blktest-ns1.img"
>>> +    local nvme_trtype="tcp"
>>> +    local hostkey
>>> +
>>> +    echo "Running ${TEST_NAME}"
>>> +
>>> +    hostkey="$(nvme gen-dhchap-key -n ${subsys}1 2> /dev/null)"
>>> +    if [ $? -ne 0 ] ; then
>>> +        echo "nvme gen-dhchap-key command missing"
>>> +        return 1
>>> +    fi
>>
>> Don't we want to test different secret formats?
> 
> We do.
> But this is just a check if the nvme cli contains functionality for
> generating keys in the first place.
> 
> Maybe we should make this a requirement (like
> _requre_nvme_trtype_is_fabrics).

Absolutely.



More information about the Linux-nvme mailing list