[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] test-faccessat.c: unlink temp file to avoid subsequent test
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] test-faccessat.c: unlink temp file to avoid subsequent test failure |
Date: |
Sun, 10 Dec 2017 18:05:13 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 10/12/17 17:48, Pádraig Brady wrote:
> * tests/test-faccessat.c: Remove the file to avoid failure
> to open the file on subsequent runs due to being created
> with no permissions.
> ---
> ChangeLog | 7 +++++++
> tests/test-faccessat.c | 1 +
> 2 files changed, 8 insertions(+)
>
> diff --git a/ChangeLog b/ChangeLog
> index 96ba6d0..ccb526b 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,10 @@
> +2017-12-10 Pádraig Brady <address@hidden>
> +
> + test-faccessat.c: unlink temp file to avoid subsequent test failure
> + * tests/test-faccessat.c: Remove the file to avoid failure
> + to open the file on subsequent runs due to being created
> + with no permissions.
> +
> 2017-12-10 Bruno Haible <address@hidden>
>
> doc: New sect. "Modifying the build rules of a Gnulib import directory".
> diff --git a/tests/test-faccessat.c b/tests/test-faccessat.c
> index fe1db41..e880fae 100644
> --- a/tests/test-faccessat.c
> +++ b/tests/test-faccessat.c
> @@ -69,6 +69,7 @@ main (void)
> unlink (BASE "link3");
> }
> unlink (BASE "link1");
> + unlink (BASE "file");
>
> return 0;
> }
I pushed a further tweak to be more defensive
and try to unlink() the file before creating it