[LTP] 回复: [PATCH v2 2/2] Refactor and merge symlink04/05 using new LTP API

Yang Xu (Fujitsu) xuyang2018.jy@fujitsu.com
Thu Oct 26 08:13:52 CEST 2023


Hi Petr,

>Hi Xu,

>> symlink04 and symlink05 has been merged together, testing
>> the results of symlink(2) for the existence or non-existence
>> of a file
>> + * Copyright (c) International Business Machines  Corp., 2001
>> + * Copyright (c) Linux Test Project, 2003-2023
>nit: IMHO LTP copyright was from 2001.

OK.

>> + * Author: 07/2001 John George
>>   */

>...
>> +     TST_EXP_PASS(symlink(*tc->srcfile, SYMFILE), "symlink(%s, %s)",
>> +                  *tc->srcfile, SYMFILE);

>nit: I would use just:
>TST_EXP_PASS(symlink(*tc->srcfile, SYMFILE));

>this:
>symlink04.c:45: TFAIL: symlink(testfile, slink_file) failed: EFAULT (14)

>is not much more informative than this:
>symlink04.c:47: TFAIL: symlink(*tc->srcfile, SYMFILE) failed: EFAULT (14)

>Reviewed-by: Petr Vorel <pvorel@suse.cz>

Yes.

Best Regards
Yang Xu

>Kind regards,
>Petr

________________________________
发件人: Petr Vorel <pvorel@suse.cz>
发送时间: 2023年10月26日 7:09
收件人: Xu, Yang/徐 杨 <xuyang2018.jy@fujitsu.com>
抄送: ltp@lists.linux.it <ltp@lists.linux.it>
主题: Re: [LTP] [PATCH v2 2/2] Refactor and merge symlink04/05 using new LTP API

Hi Xu,

> symlink04 and symlink05 has been merged together, testing
> the results of symlink(2) for the existence or non-existence
> of a file
> + * Copyright (c) International Business Machines  Corp., 2001
> + * Copyright (c) Linux Test Project, 2003-2023
nit: IMHO LTP copyright was from 2001.

> + * Author: 07/2001 John George
>   */

...
> +     TST_EXP_PASS(symlink(*tc->srcfile, SYMFILE), "symlink(%s, %s)",
> +                  *tc->srcfile, SYMFILE);

nit: I would use just:
TST_EXP_PASS(symlink(*tc->srcfile, SYMFILE));

this:
symlink04.c:45: TFAIL: symlink(testfile, slink_file) failed: EFAULT (14)

is not much more informative than this:
symlink04.c:47: TFAIL: symlink(*tc->srcfile, SYMFILE) failed: EFAULT (14)

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list