[LTP] [PATCH 02/13] lib: Replace path_exist() with tst_path_exists()

Petr Vorel pvorel@suse.cz
Thu Dec 19 15:31:46 CET 2024


Hi Cyril,

> Move and rename the path_exist() function from
> testcases/kernel/mem/lib/ to the to level library.
+1

> This removes mem.h dependency from mem/cpuset/ test.
+1

> diff --git a/include/tst_fs.h b/include/tst_fs.h
> index 835f3511c..f6ac6a40d 100644
> --- a/include/tst_fs.h
> +++ b/include/tst_fs.h
> @@ -145,6 +145,16 @@ int tst_dir_is_empty_(void (*cleanup)(void), const char *name, int verbose);
>   */
>  int tst_get_path(const char *prog_name, char *buf, size_t buf_len);

> +/**
> + * tst_path_exists()
nit: any short desc?

> + *
> + * @param fmt A printf-like format used to construct the path.
> + * @param ... A printf-like parameter list.
> + * @return Non-zero if path exists, zero otherwise.
> + */

Thanks for taking care of the docs. I guess this is doxygen syntax right?
Could you please before merge fix doc syntax - use kernel doc formatting? (no
param, return: and add short desc for the function).

/**
 * tst_path_exists() - check path exists
 *
 * @fmt: A printf-like format used to construct the path.
 * @... A printf-like parameter list.
 * return: Non-zero if path exists, zero otherwise.
 */

This will apply at least to the first commit as well.

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

Kind regards,
Petr


More information about the ltp mailing list