mbox series

[blktests,v2,0/2] fix nbd/002

Message ID 20240417104209.2898526-1-shinichiro.kawasaki@wdc.com (mailing list archive)
Headers show
Series fix nbd/002 | expand

Message

Shinichiro Kawasaki April 17, 2024, 10:42 a.m. UTC
Recently, CKI project found blktests nbd/002 failure. The test case sets up the
connection to the nbd device, then checks partition existence in the device to
confirm that the kernel reads the partition table in the device. Usually, this
partition read by kernel is completed before the test script checks the
partition existence. However, the partition read often completes after the
partition existence check, then the test case fails. I think the test script
checks the partition existence too early, and this should be fixed in the test
script.

During this investigation, I noticed that the test case nbd/002 handles the
ioctl interface and the netlink interface opposite. The first patch fixes this
wrong interface handling. The second patch addresses the too early partition
existence check issue.

Link to v1 patch: https://lore.kernel.org/linux-block/20240319085015.3901051-1-shinichiro.kawasaki@wdc.com/

Changes from v1:
* Added another patch to fix ioctl/netlink interface handling mistake
* Avoid the nbd/002 failure by repeating the partition existence check

Shin'ichiro Kawasaki (2):
  nbd/002: fix wrong -L/-nonetlink option usage
  nbd/002: repeat partition existence check for ioctl interface

 tests/nbd/002 | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

Comments

Yi Zhang April 21, 2024, 12:29 p.m. UTC | #1
Cannot reproduce the failure within 10000 cycles test now, thanks.

Tested-by: Yi Zhang <yi.zhang@redhat.com>




On Wed, Apr 17, 2024 at 6:42 PM Shin'ichiro Kawasaki
<shinichiro.kawasaki@wdc.com> wrote:
>
> Recently, CKI project found blktests nbd/002 failure. The test case sets up the
> connection to the nbd device, then checks partition existence in the device to
> confirm that the kernel reads the partition table in the device. Usually, this
> partition read by kernel is completed before the test script checks the
> partition existence. However, the partition read often completes after the
> partition existence check, then the test case fails. I think the test script
> checks the partition existence too early, and this should be fixed in the test
> script.
>
> During this investigation, I noticed that the test case nbd/002 handles the
> ioctl interface and the netlink interface opposite. The first patch fixes this
> wrong interface handling. The second patch addresses the too early partition
> existence check issue.
>
> Link to v1 patch: https://lore.kernel.org/linux-block/20240319085015.3901051-1-shinichiro.kawasaki@wdc.com/
>
> Changes from v1:
> * Added another patch to fix ioctl/netlink interface handling mistake
> * Avoid the nbd/002 failure by repeating the partition existence check
>
> Shin'ichiro Kawasaki (2):
>   nbd/002: fix wrong -L/-nonetlink option usage
>   nbd/002: repeat partition existence check for ioctl interface
>
>  tests/nbd/002 | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)
>
> --
> 2.44.0
>


--
Best Regards,
  Yi Zhang
Shinichiro Kawasaki April 25, 2024, 11:31 a.m. UTC | #2
On Apr 21, 2024 / 20:29, Yi Zhang wrote:
> Cannot reproduce the failure within 10000 cycles test now, thanks.
> 
> Tested-by: Yi Zhang <yi.zhang@redhat.com>

Thanks for the test. I've applied the patches.