qemu-cr16/tests
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
..
bench tests/bench: Rename test_akcipher_keys.inc -> test_akcipher_keys.c.inc 2024-09-20 10:08:24 +03:00
data tests/data/acpi/loongarch64: Update expected DSDT.* 2025-10-09 19:09:10 +08:00
decode decodetree: Infer argument set before inferring format 2025-07-25 10:31:45 +01:00
docker * i386: fix migration issues in 10.1 2025-10-09 07:59:01 -07:00
fp fpu: allow flushing of output denormals to be after rounding 2025-02-11 16:22:07 +00:00
functional tests/functional: ensure GDB client is stopped on error 2025-10-16 17:44:32 +02:00
guest-debug tests, scripts: Don't import print_function from __future__ 2025-09-16 17:31:53 +01:00
image-fuzzer
include meson: fix Windows build 2025-06-16 13:16:27 -04:00
keys
lcitool tests/lcitool: bump custom runner packages to Ubuntu 24.04 2025-10-07 07:33:39 +01:00
migration-stress guestperf: Add test result data into report 2025-02-14 15:19:07 -03:00
multiboot
perf/block/qcow2
qapi-schema qapi: switch to use QEMU_TEST_REGENERATE env var 2025-09-16 13:31:40 -04:00
qemu-iotests iotests/check: always enable all python warnings 2025-09-15 14:36:02 -04:00
qtest tests/data/acpi/loongarch64: Update expected DSDT.* 2025-10-09 19:09:10 +08:00
rocker
tcg tests/tcg/multiarch/linux/linux-test: Don't try to test atime update 2025-10-20 10:37:48 +01:00
tracetool tracetool/syslog: add Rust support 2025-10-01 11:22:07 -04:00
tsan system/physmem: Drop 'cpu_' prefix in Physical Memory API 2025-10-07 05:03:56 +02:00
uefi-test-tools uefi-test-tools:: Add LoongArch64 support 2025-06-01 06:38:53 -04:00
unit migration: Remove error variant of vmstate_save_state() function 2025-10-03 09:48:02 -04:00
vm tests/freebsd: enable Rust 2025-09-30 19:33:25 +04:00
dbus-vmstate-daemon.sh
Makefile.include tests: Evict stale files in the functional download cache after a while 2025-10-16 17:44:32 +02:00
meson.build tracetool: add test suite for tracetool with reference output 2025-09-16 13:31:40 -04:00
test-qht-par.c
vhost-user-bridge.c