From: Shuah Khan <skhan@linuxfoundation.org>
To: Dylan Hatch <dylanbhatch@google.com>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/proc: Fix proc-pid-vm for vsyscall=xonly.
Date: Fri, 17 Jun 2022 16:27:31 -0600 [thread overview]
Message-ID: <a5f46e4e-a472-77ce-f61e-b2f9922bdd50@linuxfoundation.org> (raw)
In-Reply-To: <CADBMgpx9hwHaWe=m2kQhKOJFWnLSejoWa6wz1VECEkLhWq4qog@mail.gmail.com>
On 6/17/22 4:05 PM, Dylan Hatch wrote:
> On Fri, Jun 17, 2022 at 12:38 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
>>
>> On 6/17/22 12:45 PM, Dylan Hatch wrote:
>>> On Thu, Jun 16, 2022 at 4:01 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
>>>>
>
>>
>> It depends on the goal of the test. Is the test looking to see if the
>> probe fails with insufficient permissions, then you are changing the
>> test to not check for that condition.
>
> The goal of the test is to validate the output of /proc/$PID/maps, and
> the memory probe is only needed as setup to determine what the
> expected output should be. This used to be sufficient, but now it can
> no longer fully disambiguate it with the introduction of
> vsyscall=xonly. The solution proposed here is to disambiguate it by
> also checking the length read from /proc/$PID/maps.
>
>>
Makes sense. However the question is does this test need to be enhanced
with the addition of vsyscall=xonly?
>> I would say in this case, the right approach would be to leave the test
>> as is and report expected fail and add other cases.
>>
>> The goal being adding more coverage and not necessarily opt for a simple
>> solution.
>
> What does it mean to report a test as expected fail? Is this a
> mechanism unique to kselftest? I agree adding another test case would
> work, but I'm unsure how to do it within the framework of kselftest.
> Ideally, there would be separate test cases for vsyscall=none,
> vsyscall=emulate, and vsyscall=xonly, but these options can be toggled
> both in the kernel config and on the kernel command line, meaning (to
> the best of my knowledge) these test cases would have to be built
> conditionally against the conflig options and also parse the command
> line for the 'vsyscall' option.
>
Expected fail isn't unique kselftest. It is a testing criteria where
a test is expected to fail. For example if a file can only be opened
with privileged user a test that runs and looks for failure is an
expected to fail case - we are looking for a failure.
A complete battery of tests for vsyscall=none, vsyscall=emulate,
vsyscall=xonly would test for conditions that are expected to pass
and fail based on the config.
tools/testing/selftests/proc/config doesn't have any config options
that are relevant to VSYSCALL
Can you please send me the how you are running the test and what the
failure output looks like?
thanks,
-- Shuah
next prev parent reply other threads:[~2022-06-17 22:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 21:10 [PATCH] selftests/proc: Fix proc-pid-vm for vsyscall=xonly Dylan Hatch
2022-06-16 23:01 ` Shuah Khan
2022-06-17 18:45 ` Dylan Hatch
2022-06-17 19:38 ` Shuah Khan
2022-06-17 22:05 ` Dylan Hatch
2022-06-17 22:27 ` Shuah Khan [this message]
2022-06-22 0:18 ` Dylan Hatch
2022-06-22 17:15 ` Shuah Khan
[not found] ` <CADBMgpz3z_hB_5BVVD5-4r3qYCVc_p_SrYKZLwaLg9Fy+h2p6g@mail.gmail.com>
2022-07-11 23:15 ` Dylan Hatch
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=a5f46e4e-a472-77ce-f61e-b2f9922bdd50@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=dylanbhatch@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
/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