Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt loop tests for upcomming 6.11 #1175

Closed
pevik opened this issue Jul 22, 2024 · 1 comment
Closed

Adapt loop tests for upcomming 6.11 #1175

pevik opened this issue Jul 22, 2024 · 1 comment
Labels

Comments

@pevik
Copy link
Member

pevik commented Jul 22, 2024

Gulam Mohamed reported [1] a problem with 18048c1af783 ("loop: Fix a race between loop detach and loop open") [2] which will be in upcomming 6.11. Various tests fail due the device is closed at the end of the test and the test cases are expecting for the results which can occur after the device is detached.

Gulam reported these tests are failing:

  • ioctl04, ioctl05, ioctl06, ioctl07, ioctl09
  • ioctl_loop01, ioctl_loop02, ioctl_loop03, ioctl_loop04, ioctl_loop05, ioctl_loop06, ioctl_loop07

I did some testing via rapido-linux and only these fail (ioctl_loop05 not tested):

$ uname -r
6.10.0-rc3-00128-g18048c1af783

# ./ioctl_loop02 # also ioctl_loop07
...
ioctl_loop02.c:54: TINFO: Using LOOP_CONFIGURE with read_only flag
ioctl_loop02.c:61: TBROK: ioctl(5,(0x4C0A),...) failed: EBUSY (16)

# ./ioctl_loop06
...
ioctl_loop06.c:74: TINFO: Using LOOP_CONFIGURE with block_size < 512
ioctl_loop06.c:67: TFAIL: Set block size failed expected EINVAL got: EBUSY (16)
ioctl_loop06.c:74: TINFO: Using LOOP_CONFIGURE with block_size > PAGE_SIZE
ioctl_loop06.c:67: TFAIL: Set block size failed expected EINVAL got: EBUSY (16)
ioctl_loop06.c:74: TINFO: Using LOOP_CONFIGURE with block_size != power_of_2
ioctl_loop06.c:67: TFAIL: Set block size failed expected EINVAL got: EBUSY (16)

[1] https://lore.kernel.org/ltp/IA1PR10MB724059C5A7A69CE2A4AF257698DF2@IA1PR10MB7240.namprd10.prod.outlook.com/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18048c1af7836b8e31739d9eaefebc2bf76261f7
[3] https://lore.kernel.org/ltp/20240711135507.GA84439@pevik/

@pevik pevik added the bug label Jul 22, 2024
@pevik pevik pinned this issue Aug 7, 2024
jrguzman-ms pushed a commit to msft-mirror-aosp/platform.external.ltp that referenced this issue Aug 22, 2024
Since commit 18048c1af783 ("loop: Fix a race between loop detach and loop open")
detach operation is deferred to the last close of the device.

Make tst_detach_device_by_fd() also close dev_fd, and leave it up to
caller to re-open it for further use.

Closes: linux-test-project/ltp#1175

Reported-by: Gulam Mohamed <[email protected]>
Signed-off-by: Jan Stancek <[email protected]>
Reviewed-by: Petr Vorel <[email protected]>
Tested-by: Petr Vorel <[email protected]>
Reviewed-by: Li Wang <[email protected]>

(cherry picked from commit c02d8dd)
Bug: 358122883
Test: atest vts_ltp_test_x86_64:syscalls.ioctl_loop06_64bit
Change-Id: I2cf97f50765190503e66af4eed546dbd90ac90cd
Signed-off-by: Edward Liaw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant