Re: [PATCH blktests 2/3] nvme/060: add test nvme fabrics target resetting during I/O

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

 



On Fri, Apr 04, 2025 at 08:08:31AM +0000, Shinichiro Kawasaki wrote:
> On Mar 18, 2025 / 11:39, Daniel Wagner wrote:
> > Newer kernel support to reset the target via the debugfs. Add a new test
> > case which exercises this interface.
> 
> I find the kernel commit 649fd41420a8 ("nvmet: add debugfs support") enables
> this test. Looking at the kernel commit, I fount this test case depends on the
> kernel config NVME_TARGET_DEBUGFS. So let's add,
> 
>  _have_kernel_option NVME_TARGET_DEBUGFS
> 
> in requires().

Ah yes, this works for this test case!

> > +requires() {
> > +	_nvme_requires
> > +	_have_loop
> > +	_have_fio
> 
> I don't find fio command in this test case. Do I miss it?

No, it's a left over from the development phase.

> > +nvmf_wait_for_state() {
> > +	local def_state_timeout=5
> > +	local subsys_name="$1"
> > +	local state="$2"
> > +	local timeout="${3:-$def_state_timeout}"
> > +	local nvmedev
> > +	local state_file
> > +	local start_time
> > +	local end_time
> > +
> > +	nvmedev=$(_find_nvme_dev "${subsys_name}")
> > +	state_file="/sys/class/nvme-fabrics/ctl/${nvmedev}/state"
> > +
> > +	start_time=$(date +%s)
> > +	while ! grep -q "${state}" "${state_file}"; do
> > +		sleep 1
> > +		end_time=$(date +%s)
> > +		if (( end_time - start_time > timeout )); then
> > +			echo "expected state \"${state}\" not " \
> > +				"reached within ${timeout} seconds"
> > +			return 1
> > +		fi
> > +	done
> > +
> > +	return 0
> > +}
> 
> Is this function used in this test case?

Oops, another leftover.




[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