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

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Fri Dec 10 03:34:37 CET 2021


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


More information about the ltp mailing list