在 2015/1/27 22:46, Cyril Hrubis 写道:
> Hi!
>>  static void test_emlink(void)
>>  {
>> -    if (max_subdirs == 0) {
>> +    if (max_subdirs == 0 || max_subdirs == -1) {
> 
> Hmm, can't we just return 0 as well when the code that tries to figure
> out max_subdirs was skipped?
> 
> Or is there really reason why we need to differentiate between these two
> conditions?
This is also what I'm a little confused. Use different return values, I just
think we should distinguish different situations. If it returns -1 (or some
other appropriate values), then we can just skip the test, and this is why
I passed TPASS to tst_resm() in v2. If it returns 0, which means the fs has
the limit, but we cannot reach it, something may go wrong (or be changed).
> 
>>              tst_resm(TCONF, "EMLINK test is not appropriate");
>>              return;
>>      }
>> diff --git a/testcases/kernel/syscalls/renameat/renameat01.c 
>> b/testcases/kernel/syscalls/renameat/renameat01.c
>> index bb5e6df..11b82f1 100644
>> --- a/testcases/kernel/syscalls/renameat/renameat01.c
>> +++ b/testcases/kernel/syscalls/renameat/renameat01.c
>> @@ -211,7 +211,8 @@ static void setup(void)
>>  
>>  static void renameat_verify(const struct test_case_t *tc)
>>  {
>> -    if (tc->exp_errno == EMLINK && max_subdirs == 0) {
>> +    if (tc->exp_errno == EMLINK &&
>> +        (max_subdirs == 0 || max_subdirs == -1)) {
>>              tst_resm(TCONF, "EMLINK test is not appropriate");
>>              return;
>>      }
>> -- 
>> 1.8.3.4
>>
> 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to