From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 76EED3857014; Mon, 29 Aug 2022 16:54:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76EED3857014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661792091; bh=VEI3bmvYIeo1jGxc1U/v+drW8C+FQanzMmR1JmwOVcE=; h=From:To:Subject:Date:From; b=ePqnrTlL9ap5nddPQEB93+wuEtqW6Ty6k+fIM2b6nlmiH/FEYnmr0FLRC0tDtW13k NeR8++QY4huiXBp6wOFjtlm/Ja8+Fht/a+fDZfXyBRc/yNbIl63nh3oqYEJzOnK4gf rFCxoyMiga48MWhR9g36EbgGYlbnJTcEGmPsuM6k= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon TURNEY To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: testsuite: In pathconf01 use the temporary directory instead of "/tmp" X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: f1d7ef46f77ff0145b3923effe4c71b67072731d X-Git-Newrev: 6e843f7750c7b2e4f36765cae7f3027f83714e98 Message-Id: <20220829165451.76EED3857014@sourceware.org> Date: Mon, 29 Aug 2022 16:54:51 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D6e843f7750c= 7b2e4f36765cae7f3027f83714e98 commit 6e843f7750c7b2e4f36765cae7f3027f83714e98 Author: Jon Turney Date: Fri Nov 27 15:18:37 2020 +0000 Cygwin: testsuite: In pathconf01 use the temporary directory instead of= "/tmp" =20 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/testsuit= e/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 @@ =20 extern void setup(); extern void cleanup(); +extern char *TESTDIR; =20 =20 =20 @@ -127,7 +128,7 @@ extern int Tst_count; /* Test Case counter for tst_* r= outines */ int exp_enos[]=3D{0, 0}; =20 int i; -const char *path =3D "/tmp"; +const char *path; =20 struct pathconf_args { @@ -157,6 +158,9 @@ main(int ac, char **av) if ( (msg=3Dparse_opts(ac, av, (option_t *) NULL, NULL)) !=3D (char *)= NULL ) tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg); =20 + tst_tmpdir(); + path =3D TESTDIR; + /*************************************************************** * perform global setup for test ***************************************************************/ @@ -208,6 +212,8 @@ main(int ac, char **av) /*************************************************************** * cleanup and exit ***************************************************************/ + tst_rmdir(); + cleanup(); =20 return 0;