[LTP] [PATCH v2 2/2] lib: Create tst_tmpdir.h

Avinesh Kumar akumar@suse.de
Tue Jun 25 17:11:26 CEST 2024


Hi Petr,

...
> diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
> index bcc788390..0f1b15ca4 100644
> --- a/lib/tst_tmpdir.c
> +++ b/lib/tst_tmpdir.c
> @@ -72,6 +72,7 @@
>  
>  #include "test.h"
>  #include "safe_macros.h"
> +#include "tst_tmpdir.h"
>  #include "ltp_priv.h"
>  #include "lapi/futex.h"
>  

I think we also need to include tst_tmpdir.h in tst_test.h, else we are
introducing implicit declaration warning in all tests where we use
tst_purge_dir() function.
e.g. creat08.c

creat08.c: In function ‘run’:
creat08.c:128:9: warning: implicit declaration of function ‘tst_purge_dir’ [-Wimplicit-function-declaration]
  128 |         tst_purge_dir(tmpdir);
      |         ^~~~~~~~~~~~~
CC testcases/kernel/syscalls/creat/creat08

> 


Regards,
Avinesh





More information about the ltp mailing list