[PATCH] tests: Don't leave temporary files behind

Pekka Paalanen ppaalanen at gmail.com
Mon Dec 3 06:50:53 PST 2012


On Sun,  2 Dec 2012 22:42:11 +0100
Sven Joachim <svenjoac at gmx.de> wrote:

> Signed-off-by: Sven Joachim <svenjoac at gmx.de>
> ---
>  tests/connection-test.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/connection-test.c b/tests/connection-test.c
> index d0113f1..45744a0 100644
> --- a/tests/connection-test.c
> +++ b/tests/connection-test.c
> @@ -447,6 +447,7 @@ TEST(connection_marshal_demarshal)
>  
>  	data.value.h = mkstemp(f);
>  	assert(data.value.h >= 0);
> +	unlink(f);
>  	marshal_demarshal(&data, (void *) validate_demarshal_h,
>  			  8, "h", data.value.h);
>  
> @@ -480,6 +481,7 @@ TEST(connection_marshal_alot)
>  		strcpy(f, "/tmp/weston-tests-XXXXXX");
>  		data.value.h = mkstemp(f);
>  		assert(data.value.h >= 0);
> +		unlink(f);
>  		marshal_demarshal(&data, (void *) validate_demarshal_h,
>  				  8, "h", data.value.h);
>  	}

So *that* is where all those thousands of /tmp/weston-tests-* files
come from that I've been occasionally wondering about. I tested this
patch.

Reviewed-by: Pekka Paalanen <ppaalanen at gmail.com>

This is a candidate for the stable branch.


Thanks,
pq


More information about the wayland-devel mailing list