From 34c586680eaa324421a9375033fb2d1786b2df75 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 23 Jul 2024 11:46:57 +0200 Subject: [PATCH] s3:tests: let modprinter.pl use $TMPDIR We should avoid using /tmp in selftest Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Jul 23 13:53:13 UTC 2024 on atb-devel-224 --- source3/script/tests/printing/modprinter.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/script/tests/printing/modprinter.pl b/source3/script/tests/printing/modprinter.pl index 28817dbd284..bfe395a8509 100755 --- a/source3/script/tests/printing/modprinter.pl +++ b/source3/script/tests/printing/modprinter.pl @@ -122,7 +122,11 @@ while () { } } if ($opt_add) { - print CONFIGFILE_NEW "[$share_name]\n\tprintable = yes\n\tpath = /tmp\n"; + my $tmpdir = "/tmp"; + if (defined($ENV{TMPDIR})) { + $tmpdir = $ENV{TMPDIR}; + } + print CONFIGFILE_NEW "[$share_name]\n\tprintable = yes\n\tpath = $tmpdir\n"; } close (CONFIGFILE); close (CONFIGFILE_NEW);