]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: testsuite: In pathconf01 use the temporary directory instead of "/tmp"
authorJon Turney <jon.turney@dronecode.org.uk>
Fri, 27 Nov 2020 15:18:37 +0000 (15:18 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Mon, 29 Aug 2022 16:53:46 +0000 (17:53 +0100)
In pathconf01 use the temporary directory, instead of "/tmp" (which may not exist).

winsup/testsuite/winsup.api/ltp/pathconf01.c

index 466875f21b577322e16bd7e55da3b018251376f5..990e6defef9cc7563a274297be0a8e165f40c29a 100644 (file)
 
 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;
This page took 0.035251 seconds and 5 git commands to generate.