public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] tst_tmpdir: Add 'LTP_' prefix
@ 2023-01-10 18:35 Petr Vorel
  2023-01-11 13:18 ` Avinesh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2023-01-10 18:35 UTC (permalink / raw)
  To: ltp

Follow the approach of the shell API:

    TST_TMPDIR=$(mktemp -d "$TMPDIR/LTP_$TST_ID.XXXXXXXXXX")

Prefix helps to see directories mounted by LTP.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/tst_tmpdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
index d1419a1a40..b73b5c66f7 100644
--- a/lib/tst_tmpdir.c
+++ b/lib/tst_tmpdir.c
@@ -269,7 +269,7 @@ void tst_tmpdir(void)
 	 * use our default TEMPDIR.
 	 */
 	env_tmpdir = tst_get_tmpdir_root();
-	snprintf(template, PATH_MAX, "%s/%.3sXXXXXX", env_tmpdir, TCID);
+	snprintf(template, PATH_MAX, "%s/LTP_%.3sXXXXXX", env_tmpdir, TCID);
 
 	/* Make the temporary directory in one shot using mkdtemp. */
 	if (mkdtemp(template) == NULL) {
-- 
2.39.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH 1/1] tst_tmpdir: Add 'LTP_' prefix
  2023-01-10 18:35 [LTP] [PATCH 1/1] tst_tmpdir: Add 'LTP_' prefix Petr Vorel
@ 2023-01-11 13:18 ` Avinesh Kumar
  2023-01-12 10:33   ` Richard Palethorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Avinesh Kumar @ 2023-01-11 13:18 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi,

Reviewed-by: Avinesh Kumar <akumar@suse.de>

On Wednesday, January 11, 2023 12:05:55 AM IST Petr Vorel wrote:
> Follow the approach of the shell API:
> 
>     TST_TMPDIR=$(mktemp -d "$TMPDIR/LTP_$TST_ID.XXXXXXXXXX")
> 
> Prefix helps to see directories mounted by LTP.
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  lib/tst_tmpdir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
> index d1419a1a40..b73b5c66f7 100644
> --- a/lib/tst_tmpdir.c
> +++ b/lib/tst_tmpdir.c
> @@ -269,7 +269,7 @@ void tst_tmpdir(void)
>  	 * use our default TEMPDIR.
>  	 */
>  	env_tmpdir = tst_get_tmpdir_root();
> -	snprintf(template, PATH_MAX, "%s/%.3sXXXXXX", env_tmpdir, TCID);
> +	snprintf(template, PATH_MAX, "%s/LTP_%.3sXXXXXX", env_tmpdir, TCID);
>  
>  	/* Make the temporary directory in one shot using mkdtemp. */
>  	if (mkdtemp(template) == NULL) {
> 

Regards,
Avinesh




-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH 1/1] tst_tmpdir: Add 'LTP_' prefix
  2023-01-11 13:18 ` Avinesh Kumar
@ 2023-01-12 10:33   ` Richard Palethorpe
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Palethorpe @ 2023-01-12 10:33 UTC (permalink / raw)
  To: Avinesh Kumar; +Cc: ltp

Hello,

Merged, thanks!

Avinesh Kumar <akumar@suse.de> writes:

> Hi,
>
> Reviewed-by: Avinesh Kumar <akumar@suse.de>
>
> On Wednesday, January 11, 2023 12:05:55 AM IST Petr Vorel wrote:
>> Follow the approach of the shell API:
>> 
>>     TST_TMPDIR=$(mktemp -d "$TMPDIR/LTP_$TST_ID.XXXXXXXXXX")
>> 
>> Prefix helps to see directories mounted by LTP.
>> 
>> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>> ---
>>  lib/tst_tmpdir.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
>> index d1419a1a40..b73b5c66f7 100644
>> --- a/lib/tst_tmpdir.c
>> +++ b/lib/tst_tmpdir.c
>> @@ -269,7 +269,7 @@ void tst_tmpdir(void)
>>  	 * use our default TEMPDIR.
>>  	 */
>>  	env_tmpdir = tst_get_tmpdir_root();
>> -	snprintf(template, PATH_MAX, "%s/%.3sXXXXXX", env_tmpdir, TCID);
>> +	snprintf(template, PATH_MAX, "%s/LTP_%.3sXXXXXX", env_tmpdir, TCID);
>>  
>>  	/* Make the temporary directory in one shot using mkdtemp. */
>>  	if (mkdtemp(template) == NULL) {
>> 
>
> Regards,
> Avinesh


-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-12 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-10 18:35 [LTP] [PATCH 1/1] tst_tmpdir: Add 'LTP_' prefix Petr Vorel
2023-01-11 13:18 ` Avinesh Kumar
2023-01-12 10:33   ` Richard Palethorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox