qemu-cr16/tests/tcg/multiarch
Peter Maydell 77dc9d662f tests/tcg/multiarch/linux/linux-test: Don't try to test atime update
The linux-test test includes an attempt to check the utime and stat
syscalls by setting the atime and mtime of a file to specific values,
and then calling stat() to check that the values read back correctly.

Unfortunately this is flaky, as it will fail if some other process
(for instance a virus scanner, backup program, etc) gets in and reads
the file between the utime() and stat() call, resulting in a host
syscall sequence like this:

utimensat(AT_FDCWD, "file2",
  [{tv_sec=1001, tv_nsec=0} /* 1970-01-01T01:16:41+0100 */,
   {tv_sec=1000, tv_nsec=0} /* 1970-01-01T01:16:40+0100 */], 0) = 0
# successfully set atime to 1001 and mtime to 1000
statx(AT_FDCWD, "file2", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT,
  STATX_BASIC_STATS,
  {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID,
   stx_blksize=4096, stx_attributes=0, stx_nlink=1, stx_uid=32808,
   stx_gid=32808, stx_mode=S_IFREG|0600, stx_ino=21659016,
   stx_size=100, stx_blocks=8,
   stx_attributes_mask=STATX_ATTR_COMPRESSED|STATX_ATTR_IMMUTABLE|
         STATX_ATTR_APPEND|STATX_ATTR_NODUMP|STATX_ATTR_ENCRYPTED|
         STATX_ATTR_AUTOMOUNT|STATX_ATTR_MOUNT_ROOT|STATX_ATTR_VERITY|
         STATX_ATTR_DAX,
   stx_atime={tv_sec=1760091862, tv_nsec=63509009} /* 2025-10-10T11:24:22.063509009+0100 */,
   stx_ctime={tv_sec=1760091862, tv_nsec=63509009} /* 2025-10-10T11:24:22.063509009+0100 */,
   stx_mtime={tv_sec=1000, tv_nsec=0} /* 1970-01-01T01:16:40+0100 */,
   stx_rdev_major=0, stx_rdev_minor=0, stx_dev_major=252,
   stx_dev_minor=0, stx_mnt_id=0x1f}) = 0
# but when we statx the file, we get back an mtime of 1000
# but an atime corresponding to when the other process read it

and which will cause the test program to fail with the error
message "stat time".

In theory we could defend against this by e.g.  operating on files in
a dummy loopback mount filesystem which we mounted as 'noatime', but
this isn't worth the hassle.  Just drop the check on atime.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251016150357.876415-4-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-10-20 10:37:48 +01:00
..
arm-compat-semi tests/tcg: update licenses to GPLv2 as intended 2024-02-28 09:09:04 +00:00
gdbstub tests, scripts: Don't import print_function from __future__ 2025-09-16 17:31:53 +01:00
libs tests/tcg: update licenses to GPLv2 as intended 2024-02-28 09:09:04 +00:00
linux tests/tcg/multiarch/linux/linux-test: Don't try to test atime update 2025-10-20 10:37:48 +01:00
system tests/tcg: Fix run for tests with specific plugin 2025-08-01 16:48:50 +01:00
catch-syscalls.c tests/tcg: Add the syscall catchpoint gdbstub test 2024-02-09 17:52:40 +00:00
check-plugin-output.sh tests/tcg/multiarch: add test for plugin memory access 2024-09-19 15:58:01 +01:00
float_convd.c tests/tcg: update licenses to GPLv2 as intended 2024-02-28 09:09:04 +00:00
float_convs.c tests/tcg: update licenses to GPLv2 as intended 2024-02-28 09:09:04 +00:00
float_helpers.h tests/tcg: update licenses to GPLv2 as intended 2024-02-28 09:09:04 +00:00
float_madds.c tests/tcg: update licenses to GPLv2 as intended 2024-02-28 09:09:04 +00:00
fnmsub.c fpu: Process float_muladd_negate_result after rounding 2025-07-10 11:53:10 -06:00
follow-fork-mode.c tests/tcg: Add two follow-fork-mode tests 2024-03-06 12:35:19 +00:00
late-attach.c tests/tcg: Add late gdbstub attach test 2025-02-10 13:47:59 +00:00
Makefile.target tests/tcg/multiarch: Add tb-link test 2025-09-24 10:29:40 -07:00
munmap-pthread.c tests/tcg/multiarch: add vma-pthread.c 2023-01-05 11:41:29 -08:00
noexec.c.inc target/s390x: Make translator stop before the end of a page 2022-09-06 08:04:26 +01:00
nop_func.h tests/tcg/multiarch: add vma-pthread.c 2023-01-05 11:41:29 -08:00
overflow.c tests/tcg: Test overflow conditions 2022-06-03 08:03:28 +02:00
prot-none.c tests/tcg: Add the PROT_NONE gdbstub test 2024-01-29 20:48:49 +10:00
README
segfault.c tests/tcg: Add multiarch test for Xfer:siginfo:read stub 2024-03-13 11:43:52 +00:00
sha1.c tests/tcg/sha1: remove endian include 2021-10-12 08:37:05 +01:00
sha512.c other architectures: spelling fixes 2023-07-25 17:14:07 +03:00
sigbus.c tests/tcg/multiarch: Adjust sigbus.c 2023-06-06 10:19:39 +01:00
signals.c tests/tcg: add a multiarch signals test to stress test signal delivery 2021-06-07 14:42:42 +01:00
sigreturn-sigmask.c tests/tcg: Test that sigreturn() does not corrupt the signal mask 2024-11-16 08:42:24 -08:00
tb-link.c tests/tcg/multiarch: Add tb-link test 2025-09-24 10:29:40 -07:00
test-aes-main.c.inc tests/multiarch: Add test-aes 2023-07-08 07:30:17 +01:00
test-mmap.c tests/tcg: make test-mmap a little less aggressive 2021-07-14 14:33:53 +01:00
test-plugin-mem-access.c tests/tcg/multiarch: add test for plugin memory access 2024-09-19 15:58:01 +01:00
testthread.c
threadcount.c tests/tcg: add new threadcount test 2020-05-27 14:26:49 +01:00
vma-pthread.c tests/tcg/multiarch: add vma-pthread.c 2023-01-05 11:41:29 -08:00

Multi-architecture linux-user tests