Re: [PATCH v3 5/5] lib/test_sysctl: support testing of sysctl. boot parameter

From: Vlastimil Babka
Date: Fri May 15 2020 - 12:02:22 EST


On 5/13/20 3:17 PM, Luis Chamberlain wrote:
> On Wed, May 13, 2020 at 7:15 AM Luis Chamberlain <mcgrof@xxxxxxxxxx> wrote:
>> > >
>> > > You want to:
>> > >
>> > >
>> > > # Kselftest framework requirement - SKIP code is 4.
>> > > ksft_skip=4
>> > >
>> > >> sysctl_test_0007()
>> > >> {
>> > >> TARGET="${SYSCTL}/boot_int"
>> > >> + if [ ! -f $TARGET ]; then
>> > >> + echo "Skipping test for $TARGET as it is not present ..."
>> > >> + return 0
>> > >> + fi
>> > >
>> > > And return 4 instead.
>> >
>> > If I return it from the function, nobody will care, AFAICS. If I 'exit
>> > $ksft_skip', is that correct if it's just a single test out of 7?
>>
>> yes please do that.
>
> Ah but once we add test_0008() it may be supported.. so I think return
> would be OK

OK

----8<----