summaryrefslogtreecommitdiffstats
path: root/tests/update3.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2013-04-28 00:54:17 +0200
committerMark Wielaard <[email protected]>2013-04-28 00:56:23 +0200
commitb0f202e15fc6ab34381c0b96325221aab874250d (patch)
treef293a24fa0c9ad28396a296cbd558abce051729e /tests/update3.c
parenta6098315baa0074cd188bfd9d3c6b9d9205d6fa2 (diff)
tests: All update tests should use unique temporary file names and cleanup.
All update tests used the same temporary file name xxx. And only update4 would clean up this file. Now that tests can run in parallel make sure all temporary names are unique and every test cleans up their own files. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests/update3.c')
-rw-r--r--tests/update3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/update3.c b/tests/update3.c
index 1a62b34b..d760687a 100644
--- a/tests/update3.c
+++ b/tests/update3.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include ELFUTILS_HEADER(ebl)
@@ -33,7 +34,7 @@
int
main (int argc, char *argv[] __attribute__ ((unused)))
{
- const char *fname = "xxx";
+ const char *fname = "xxx_update3";
int fd;
Elf *elf;
Elf32_Ehdr *ehdr;
@@ -198,5 +199,7 @@ main (int argc, char *argv[] __attribute__ ((unused)))
exit (1);
}
+ unlink (fname);
+
return 0;
}