@@ -7,9 +7,10 @@
#define TST_DEFAULTS_H_
/*
- * This is the default temporary directory used by tst_tmpdir().
+ * This is the default temporary directory used by tst_tmpdir(),
+ * used when TMPDIR env variable is not set.
*
- * This is used when TMPDIR env variable is not set.
+ * If changed, update also shell API in tst_test.sh.
*/
#define TEMPDIR "/tmp"
@@ -735,6 +735,8 @@ tst_run()
if [ "$TST_NEEDS_TMPDIR" = 1 ]; then
if [ -z "$TMPDIR" ]; then
+ # default value if TMPDIR not set.
+ # If changed, update also C API in tst_defaults.h.
_tst_tmpdir="/tmp"
export TMPDIR="$_tst_tmpdir"
else
Link C and shell API related parts to $TMPDIR. Signed-off-by: Petr Vorel <pvorel@suse.cz> --- include/tst_defaults.h | 5 +++-- testcases/lib/tst_test.sh | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-)