[LTP] [PATCH v3 1/2] syscalls/fcntl30: clean up && add more range test
Yang Xu
xuyang2018.jy@cn.fujitsu.com
Thu Mar 19 06:10:06 CET 2020
Hi Cyril
> Hi!
>> Ping.
>> diff as below:
>> diff --git a/testcases/kernel/syscalls/fcntl/fcntl30.c
>> b/testcases/kernel/syscalls/fcntl/fcntl30.c
>> index 860d42e8d..28cdee165 100644
>> --- a/testcases/kernel/syscalls/fcntl/fcntl30.c
>> +++ b/testcases/kernel/syscalls/fcntl/fcntl30.c
>> @@ -31,8 +31,7 @@ static struct tcase {
>> {0, 0, 0, 1, "set a value of below page size"},
>> {0, 0, 0, 1, "set a normal value"},
>> {0, 0, 1, 1, "set a value of below page size"},
>> - {0, 0, 1, 1, "set a normal value"},
>> - {0, 0, 1, 1, "set a max value"},
>> + {0, 0, 1, 1, "set a normal value(8M)"},
>> {0, 0, 1, 0, "set a value beyond max"},
>> };
>>
>> @@ -145,13 +144,10 @@ static void setup(void)
>> tcases[2].setsize = (1 << pg_shift) - 1;
>> tcases[2].expsize = 1 << pg_shift;
>>
>> - tcases[3].setsize = 2 << pg_shift;
>> - tcases[3].expsize = 2 << pg_shift;
>> + tcases[3].setsize = 1 << 23;
>> + tcases[3].expsize = 1 << 23;
>>
>> - tcases[4].setsize = 1 << shift;
>> - tcases[4].expsize = 1 << shift;
>> -
>> - tcases[5].setsize = (1 << shift) + 1;
>> + tcases[4].setsize = (1 << shift) + 1;
>>
>> pw = SAFE_GETPWNAM("nobody");
>> }
>
> Do we have to keep the shift in here?
>
> Given that we are not aiming at a precise value now, we should be fine
> as long as we request the buffer to be a few megabytes in lenght and we
> can drop all the arch specific code from here, right?
Yes, if we don't want to test ENOMEM error, this arch specific code can
be removed. Since only few people will set so large pipe size and
trigger this error, I think we can remove this.
Best Regards
Yang Xu
>
More information about the ltp
mailing list