linux/tools
zhouyuhang fa0122eaca selftests/mount_setattr: fix idmap_mount_tree_invalid failed to run
Test case idmap_mount_tree_invalid failed to run on the newer kernel
with the following output:

 #  RUN           mount_setattr_idmapped.idmap_mount_tree_invalid ...
 # mount_setattr_test.c:1428:idmap_mount_tree_invalid:Expected sys_mount_setattr(open_tree_fd, "", AT_EMPTY_PATH, &attr,  sizeof(attr)) (0) ! = 0 (0)
 # idmap_mount_tree_invalid: Test terminated by assertion

This is because tmpfs is mounted at "/mnt/A", and tmpfs already
contains the flag FS_ALLOW_IDMAP after the commit 7a80e5b8c6 ("shmem:
support idmapped mounts for tmpfs"). So calling sys_mount_setattr here
returns 0 instead of -EINVAL as expected.

Ramfs does not support idmap mounts, so we can use it here to test invalid mounts,
which allows the test case to pass with the following output:

 # Starting 1 tests from 1 test cases.
 #  RUN           mount_setattr_idmapped.idmap_mount_tree_invalid ...
 #            OK  mount_setattr_idmapped.idmap_mount_tree_invalid
 ok 1 mount_setattr_idmapped.idmap_mount_tree_invalid
 # PASSED: 1 / 1 tests passed.

Link: https://lore.kernel.org/all/20241028084132.3212598-1-zhouyuhang1010@163.com/
Signed-off-by: zhouyuhang <zhouyuhang@kylinos.cn>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-10-28 21:16:47 -06:00
..
accounting
arch selftests: vDSO: unconditionally build chacha test 2024-10-08 15:21:29 -06:00
bootconfig
bpf bpftool: Fix undefined behavior in qsort(NULL, 0, ...) 2024-09-10 11:40:55 -07:00
build perf build: Remove unused feature test target 2024-09-10 17:32:47 -03:00
certs
cgroup
counter
crypto crypto: tools/ccp - Remove unused variable 2024-08-30 18:22:30 +08:00
debugging
firewire
firmware
gpio tools: gpio: rm .*.cmd on make clean 2024-09-02 12:27:35 +02:00
hv hyperv-next for v6.12 2024-09-19 08:15:30 +02:00
iio tools: iio: rm .*.cmd when make clean 2024-09-05 19:27:13 +01:00
include more s390 updates for 6.12 merge window 2024-09-28 09:11:46 -07:00
kvm/kvm_stat
laptop
leds
lib memblock: updates for 6.12-rc1 2024-09-25 11:35:19 -07:00
memory-model tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt 2024-09-13 23:56:44 -07:00
mm Many singleton patches - please see the various changelogs for details. 2024-09-21 08:20:50 -07:00
net NFSD 6.12 Release Notes 2024-09-23 12:01:45 -07:00
objtool LoongArch changes for v6.12 2024-09-27 10:14:35 -07:00
pci tools: PCI: Remove unused BILLION macro 2024-09-13 22:37:06 +00:00
pcmcia
perf perf trace: Mark the 'head' arg in the set_robust_list syscall as coming from user space 2024-09-11 17:25:45 -03:00
power linux-cpupower-6.12-rc1-fixes 2024-09-24 12:57:46 -07:00
rcu tools/rcu: Remove RCU Tasks Rude asynchronous APIs from rcu-updaters.sh 2024-07-29 07:39:32 +05:30
sched_ext sched_ext: Provide a sysfs enable_seq counter 2024-09-23 06:53:02 -10:00
scripts
sound ASoC: dapm-graph: show path name for non-static routes 2024-08-23 11:03:00 +01:00
spi spi: spidev_fdx: Fix the wrong format specifier 2024-09-04 16:50:33 +01:00
testing selftests/mount_setattr: fix idmap_mount_tree_invalid failed to run 2024-10-28 21:16:47 -06:00
thermal
time
tracing rtla/osnoise: Prevent NULL dereference in error handling 2024-08-09 13:03:15 -04:00
usb tools: usb: p9_fwd: add usb gadget packet forwarder script 2024-09-03 09:57:08 +02:00
verification tools/verification: Use pkg-config in lib_setup of Makefile.config 2024-07-17 13:14:51 -07:00
virtio tools/virtio:Fix the wrong format specifier 2024-09-10 02:51:48 -04:00
wmi
workqueue
writeback
Makefile