Re: [PATCH blktests 1/2] nvme/{rc,017,031}: replace def_file_path with _nvme_def_file_path()

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

 



On Thu, Oct 12, 2023 at 10:12 AM Shin'ichiro Kawasaki
<shinichiro.kawasaki@xxxxxxx> wrote:
>
> The commit b6356f6 ("nvme/rc: Add common file_path name define") defined
> a global variable 'def_file_path' in nvme/rc, which refers TMPDIR.
> However, when nvme/rc is sourced and def_file_path is defined for the
> nvme test group, TMPDIR is not yet defined since TMPDIR is defined for
> each test case. Then an unexpected path is set to def_file_path and
> temporary files are created at the unexpected path.
>
> Fix this by replacing the global variable def_file_path with a helper
> function _nvme_def_file_path(). This helper function allows to refer
> TMPDIR not at nvme/rc source timing but in test() or test_device()
> context of each test case.
>
> Reported-by: Yi Zhang <yi.zhang@xxxxxxxxxx>
> Fixes: b6356f6 ("nvme/rc: Add common file_path name define")
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>

LGTM, thanks for the fix.

Reviewed-by: Yi Zhang <yi.zhang@xxxxxxxxxx>





[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