public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: testsuite: In pathconf01 use the temporary directory instead of "/tmp"
@ 2022-08-29 16:54 Jon TURNEY
0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2022-08-29 16:54 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6e843f7750c7b2e4f36765cae7f3027f83714e98
commit 6e843f7750c7b2e4f36765cae7f3027f83714e98
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Fri Nov 27 15:18:37 2020 +0000
Cygwin: testsuite: In pathconf01 use the temporary directory instead of "/tmp"
In pathconf01 use the temporary directory, instead of "/tmp" (which may not exist).
Diff:
---
winsup/testsuite/winsup.api/ltp/pathconf01.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-29 16:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 16:54 [newlib-cygwin] Cygwin: testsuite: In pathconf01 use the temporary directory instead of "/tmp" Jon TURNEY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).