mirror_zfs/scripts
Rob Norris 60031906b4 ZTS: zfs-tests: set TMPDIR to FILEDIR
Many tests use mktemp to create temporary files and dirs, which will
usually put them in /tmp unless instructed otherwise. This had led to
many tests trying to give mktemp a useful temp path in ad-hoc ways, and
others just using it directly without knowing they're potentially
leaving stuff lying around.

So we set TMPDIR to FILEDIR, which makes the simplest uses of mktemp put
things in the wanted work dir.

Included here is a hack to get TMPDIR into the test. If a test has to be
run as a different user (most of them), it is run through sudo. ld.so
from glibc will not pass TMPDIR to a setuid program, so instead we
re-set TMPDIR after sudo before running the target command.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
2025-02-27 14:39:10 -08:00
..
zfs-images@3331601f6d Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
.gitignore Remove autotools products 2012-08-27 11:47:44 -07:00
commitcheck.sh Add ShellCheck's --enable=all inside scripts/ 2022-01-13 11:09:19 -07:00
common.sh.in Ubuntu 22.04 integration: ShellCheck 2022-11-18 11:24:48 -08:00
convert_wycheproof.pl ZTS: ICP encryption tests 2025-02-25 17:29:57 -08:00
cstyle.pl cstyle: ignore old non-POSIX types in macro invocations 2024-12-06 08:53:53 -08:00
dkms.mkconf disable automatic dependency tracking for dkms builds 2024-06-13 18:08:49 -07:00
dkms.postbuild Turn shellcheck into a normal make target. Fix new files it caught 2021-06-01 11:38:49 -07:00
kmodtool Fix kmodtool for packaging mainline Linux 2023-03-22 09:22:52 -07:00
make_gitrev.sh Add ShellCheck's --enable=all inside scripts/ 2022-01-13 11:09:19 -07:00
Makefile.am Add Makefile dependencies for scripts/zfs-tests.sh -c 2025-01-03 19:04:01 -08:00
man-dates.sh Fix minor shellcheck 0.7.2 warnings 2021-06-09 12:21:24 -07:00
mancheck.sh mancheck: exclude dotfiles in man dir 2023-03-01 09:38:31 -08:00
paxcheck.sh Add ShellCheck's --enable=all inside scripts/ 2022-01-13 11:09:19 -07:00
update_authors.pl update_authors: add missing names from commits to AUTHORS 2023-10-10 08:54:57 -07:00
zfs2zol-patch.sed linux: module: weld all but spl.ko into zfs.ko 2022-04-20 13:28:24 -07:00
zfs_prepare_disk Add zfs_prepare_disk script for disk firmware install 2023-09-21 08:36:26 -07:00
zfs-helpers.sh cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
zfs-tests-color.sh Colorize the Github test output 2022-02-16 11:40:25 -08:00
zfs-tests.sh ZTS: zfs-tests: set TMPDIR to FILEDIR 2025-02-27 14:39:10 -08:00
zfs.sh scripts: zfs.sh: explicitly unload all modules via rmmod 2022-04-21 16:33:12 -07:00
zimport.sh Ubuntu 22.04 integration: ShellCheck 2022-11-18 11:24:48 -08:00
zloop.sh RAID-Z expansion feature 2023-11-08 10:19:41 -08:00
zol2zfs-patch.sed Move properties, parameters, events, and concepts around manual sections 2021-06-09 14:35:30 -07:00