public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: testsuite: In pathconf01 use the temporary directory instead of "/tmp"
Date: Mon, 29 Aug 2022 16:54:51 +0000 (GMT)	[thread overview]
Message-ID: <20220829165451.76EED3857014@sourceware.org> (raw)

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;

                 reply	other threads:[~2022-08-29 16:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220829165451.76EED3857014@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).