Re: [bug report] most of blktests nvme/ failed on the latest linux tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 29/06/2023 10:36, Daniel Wagner wrote:
On Wed, Jun 28, 2023 at 02:00:57PM +0300, Max Gurtovoy wrote:
  > --- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -14,8 +14,23 @@ def_remote_wwnn="0x10001100aa000001"
   def_remote_wwpn="0x20001100aa000001"
   def_local_wwnn="0x10001100aa000002"
   def_local_wwpn="0x20001100aa000002"
-def_hostnqn="$(cat /etc/nvme/hostnqn 2> /dev/null)"
-def_hostid="$(cat /etc/nvme/hostid 2> /dev/null)"
+
+if [ -f "/etc/nvme/hostid" ]; then
+	def_hostid="$(cat /etc/nvme/hostid 2> /dev/null)"
+else
+	def_hostid="$(uuidgen)"
+fi
+if [ -z "$def_hostid" ] ; then
+	def_hostid="0f01fb42-9f7f-4856-b0b3-51e60b8de349"
+fi
+
+if [ -f "/etc/nvme/hostnqn" ]; then
+	def_hostnqn="$(cat /etc/nvme/hostnqn 2> /dev/null)"
+fi
+if [ -z "$def_hostnqn" ] ; then
+	def_hostnqn="nqn.2014-08.org.nvmexpress:uuid:${def_hostid}"
+fi

Is there a specific reason why we want to read the /etc/nvme/hostnqn file at
all? Can't we just use a fixes hostid/hostnqn?

Yes, this will do the job but I guess the initial thought was to use the same hostnqn/hostid that one configured to the host also for testing.

I don't have a real preference between the two.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux