[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241028-rodung-kotzen-577438c3b82c@brauner>
Date: Mon, 28 Oct 2024 13:11:26 +0100
From: Christian Brauner <brauner@...nel.org>
To: zhouyuhang <zhouyuhang1010@....com>
Cc: sforshee@...nel.org, shuah@...nel.org, linux-fsdevel@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org, zhouyuhang <zhouyuhang@...inos.cn>
Subject: Re: [PATCH v2] selftests/mount_setattr: fix idmap_mount_tree_invalid
failed to run
On Mon, Oct 28, 2024 at 04:41:32PM +0800, zhouyuhang wrote:
> From: zhouyuhang <zhouyuhang@...inos.cn>
>
> 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 7a80e5b8c6fa ("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.
>
> Signed-off-by: zhouyuhang <zhouyuhang@...inos.cn>
> ---
Reviewed-by: Christian Brauner <brauner@...nel.org>
Powered by blists - more mailing lists