diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-11-27 18:18:37 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2022-08-29 19:53:46 +0300 |
commit | 6e843f7750c7b2e4f36765cae7f3027f83714e98 (patch) | |
tree | 5b6c3c3b3a438d0f07d4217ba1ce78cdffa8d48e | |
parent | f1d7ef46f77ff0145b3923effe4c71b67072731d (diff) |
Cygwin: testsuite: In pathconf01 use the temporary directory instead of "/tmp"
In pathconf01 use the temporary directory, instead of "/tmp" (which may not exist).
-rw-r--r-- | winsup/testsuite/winsup.api/ltp/pathconf01.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/testsuite/winsup.api/ltp/pathconf01.c b/winsup/testsuite/winsup.api/ltp/pathconf01.c index 466875f21..990e6defe 100644 --- a/winsup/testsuite/winsup.api/ltp/pathconf01.c +++ b/winsup/testsuite/winsup.api/ltp/pathconf01.c @@ -117,6 +117,7 @@ extern void setup(); extern void cleanup(); +extern char *TESTDIR; @@ -127,7 +128,7 @@ extern int Tst_count; /* Test Case counter for tst_* routines */ int exp_enos[]={0, 0}; int i; -const char *path = "/tmp"; +const char *path; struct pathconf_args { @@ -157,6 +158,9 @@ main(int ac, char **av) if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg); + tst_tmpdir(); + path = TESTDIR; + /*************************************************************** * perform global setup for test ***************************************************************/ @@ -208,6 +212,8 @@ main(int ac, char **av) /*************************************************************** * cleanup and exit ***************************************************************/ + tst_rmdir(); + cleanup(); return 0; |