Bug 1217010 - [Build 20231109] ltp: openQA test fails in dio04
Summary: [Build 20231109] ltp: openQA test fails in dio04
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Petr Vorel
QA Contact: E-mail List
URL: https://openqa.opensuse.org/tests/371...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-10 07:20 UTC by Dominique Leuenberger
Modified: 2023-11-22 21:15 UTC (History)
5 users (show)

See Also:
Found By: openQA
Services Priority:
Business Priority:
Blocker: Yes
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Leuenberger 2023-11-10 07:20:24 UTC
## Observation

diotest4    3  TFAIL  :  diotest4.c:112: read allows odd count. returns 1: Success
diotest4    4  TFAIL  :  diotest4.c:127: write allows odd count.returns 1: Success
diotest4    5  TFAIL  :  diotest4.c:179: Odd count of read and write


openQA test in scenario opensuse-Tumbleweed-JeOS-for-kvm-and-xen-x86_64-jeos-ltp-dio@uefi_virtio-2G fails in
[dio04](https://openqa.opensuse.org/tests/3713969/modules/dio04/steps/7)

## Test suite description



## Reproducible

Fails since (at least) Build [20231109](https://openqa.opensuse.org/tests/3713269)


## Expected result

Last good: [20231108](https://openqa.opensuse.org/tests/3711836) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=JeOS-for-kvm-and-xen&machine=uefi_virtio-2G&test=jeos-ltp-dio&version=Tumbleweed)
Comment 1 Petr Vorel 2023-11-13 08:37:45 UTC
The problem is very likely related to new O_DIRECT support on tmpfs [1] on 6.6.1-1-default. It needs to be checked, whether it's a test bug (likely) or really bug in the kernel implementation.

Previously, on 6.5.9-1, all dio tests were skipped (TCONF) due missing O_DIRECT support on tmpfs (on /tmp).

Also, because of this skipping, we set openQA variable LTP_ENV as TMPDIR=/var/tmp/ on ltp_dio job, which is used on kernel tests on o3. That's why we didn't notice. But somebody created jeos-ltp-dio without this setup.

IMHO we should

1) add in LTP upstream .all_filesystems = 1 to run at least on some filesystems (and after that remove TMPDIR=/var/tmp/ setup)

2) unify jeos-ltp-dio with ltp_dio (and generally all jeos-ltp-* with their ltp_*).

[1] https://kernelnewbies.org/Linux_6.6#TMPFS
Comment 2 Petr Vorel 2023-11-13 08:43:00 UTC
aa5b9178c019 ("mm: invalidation check mapping before folio_contains")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e88e0d366f9cfbb810b0c8509dc5d130d5a53e02
Comment 3 Petr Vorel 2023-11-13 16:51:50 UTC
(In reply to Petr Vorel from comment #2)
> aa5b9178c019 ("mm: invalidation check mapping before folio_contains")
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
> ?id=e88e0d366f9cfbb810b0c8509dc5d130d5a53e02

I overlook the
Comment 4 Petr Vorel 2023-11-13 17:01:04 UTC
(In reply to Petr Vorel from comment #2)
> aa5b9178c019 ("mm: invalidation check mapping before folio_contains")
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
> ?id=e88e0d366f9cfbb810b0c8509dc5d130d5a53e02

I overlook in the commit message, that author itself noticed tests failing on tmpfs:

	dio01 through dio30, except for dio04 and dio10, which fail because
	tmpfs dio read and write allow odd count: tmpfs could be made stricter,
	but would that be an improvement?

@Jan, reading your ack on v1 [1] and also on v2 [2] (where you maintainers discussed only amount of code duplication and not the fact that LTP tests failing, I suppose implementation is accepted and we need to make test on tmpfs less strict, right?

[1] https://lore.kernel.org/all/20230809095447.7iturpglkvbzyvmg@quack3/
[2] https://lore.kernel.org/all/20230811085632.hfmdzni2yzgmcy44@quack3/
Comment 5 Jan Kara 2023-11-22 15:25:02 UTC
Yes, tmpfs has no reason to reject direct IO of any size so it would be good if LTP test can be relaxed. As far as I'm checking ltp/testcases/kernel/io/direct_io/diotest4.c it seems there are already some filesystems that have exception (NFS, FUSE, BTRFS) so adding one more is likely no big deal?
Comment 6 Petr Vorel 2023-11-22 20:45:45 UTC
(In reply to Jan Kara from comment #5)
> Yes, tmpfs has no reason to reject direct IO of any size so it would be good
> if LTP test can be relaxed. As far as I'm checking
> ltp/testcases/kernel/io/direct_io/diotest4.c it seems there are already some
> filesystems that have exception (NFS, FUSE, BTRFS) so adding one more is
> likely no big deal?

Thanks for confirmation that there is no plan to further fix tmpfs. And thanks for a hint, I'll send a patch shortly.

I guess we can close this as invalid (bug in the test).
Comment 7 Petr Vorel 2023-11-22 20:53:09 UTC
(In reply to Petr Vorel from comment #2)
> aa5b9178c019 ("mm: invalidation check mapping before folio_contains")

The commit hash and message is actually:
e88e0d366f9c ("tmpfs: trivial support for direct IO")

> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
> ?id=e88e0d366f9cfbb810b0c8509dc5d130d5a53e02
Comment 8 Petr Vorel 2023-11-22 21:15:26 UTC
Patch fixing the test sent, it should be merged soon, thus closing as invalid:
https://lore.kernel.org/ltp/20231122211318.31358-1-pvorel@suse.cz/