Re: [LTP] [PATCH v3 1/2] library: add cmd check handler in needs_cmds

xuyang2018.jy
2021-12-10T02:34:57Z

Hi Petr
> Hi Xu,
>
> Reviewed-by: Petr Vorel<pvorel@suse.cz>
>
> Very nice code, nice tests, thanks!
>
>> diff --git a/lib/newlib_tests/test_needs_cmds01.c b/lib/newlib_tests/test_needs_cmds01.c
>> new file mode 100644
>> index 000000000..92305ee97
>> --- /dev/null
>> +++ b/lib/newlib_tests/test_needs_cmds01.c
>> @@ -0,0 +1,25 @@
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> +/*
>> + * Copyright (c) 2021 Yang Xu<xuyang2018.jy@fujitsu.com>
>> + */
>> +
>> +#include<stdio.h>
> All<stdio.h> in the tests aren't needed, please remove it before merge.
I remove stdio.h for these lib test cases and add stdio.h in tst_cmd.c
since there used popen() function.
>
> nit: I'd also call tests tst_needs_cmds*.c (tst_ prefix instead of test_) as
> most of the tests in the library takes this scheme, but that's very minor.
I have renamed to tst_needs_cmds*.c and merged.

Best Regards
Yang Xu
>
> Kind regards,
> Petr