From: Shuah Khan <skhan@linuxfoundation.org>
To: Christian Brauner <brauner@kernel.org>,
zhouyuhang <zhouyuhang1010@163.com>
Cc: sforshee@kernel.org, shuah@kernel.org,
linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, zhouyuhang <zhouyuhang@kylinos.cn>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v2] selftests/mount_setattr: fix idmap_mount_tree_invalid failed to run
Date: Mon, 28 Oct 2024 20:42:18 -0600 [thread overview]
Message-ID: <c620491d-7bb9-47f5-bd2f-52d8fc814486@linuxfoundation.org> (raw)
In-Reply-To: <20241028-rodung-kotzen-577438c3b82c@brauner>
On 10/28/24 06:11, Christian Brauner wrote:
> On Mon, Oct 28, 2024 at 04:41:32PM +0800, zhouyuhang wrote:
>> From: zhouyuhang <zhouyuhang@kylinos.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@kylinos.cn>
>> ---
>
> Reviewed-by: Christian Brauner <brauner@kernel.org>
Thank you. Applied to kselftest fixes branch for next rc.
thanks,
-- Shuah
prev parent reply other threads:[~2024-10-29 2:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 8:41 [PATCH v2] selftests/mount_setattr: fix idmap_mount_tree_invalid failed to run zhouyuhang
2024-10-28 12:11 ` Christian Brauner
2024-10-29 2:42 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c620491d-7bb9-47f5-bd2f-52d8fc814486@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=sforshee@kernel.org \
--cc=shuah@kernel.org \
--cc=zhouyuhang1010@163.com \
--cc=zhouyuhang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox