On Fri, Jun 17, 2022 at 12:38 PM Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> wrote:
On 6/17/22 12:45 PM, Dylan Hatch wrote:
On Thu, Jun 16, 2022 at 4:01 PM Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> 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.
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.