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 <mjw@redhat.com>
+2013-04-27 Mark Wielaard <mjw@redhat.com>
+
+ * update1.c (main): Use unique tempfile name and unlink file.
+ * update2.c (main): Likewise.
+ * update3.c (main): Likewise.
+ * update4.c (main): Use unique tempfile name.
+
2013-04-27 Mark Wielaard <mjw@redhat.com>
* run-alldts.sh: Add testfile-alldts to tempfiles.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
int
main (int argc, char *argv[] __attribute__ ((unused)))
{
- const char *fname = "xxx";
+ const char *fname = "xxx_update1";
int fd;
Elf *elf;
Elf32_Ehdr *ehdr;
exit (1);
}
+ unlink (fname);
+
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
int
main (int argc, char *argv[] __attribute__ ((unused)))
{
- const char *fname = "xxx";
+ const char *fname = "xxx_update2";
int fd;
Elf *elf;
Elf32_Ehdr *ehdr;
exit (1);
}
+ unlink (fname);
+
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include ELFUTILS_HEADER(ebl)
int
main (int argc, char *argv[] __attribute__ ((unused)))
{
- const char *fname = "xxx";
+ const char *fname = "xxx_update3";
int fd;
Elf *elf;
Elf32_Ehdr *ehdr;
exit (1);
}
+ unlink (fname);
+
return 0;
}
int
main (int argc, char *argv[] __attribute__ ((unused)))
{
- const char fname[] = "xxx";
+ const char fname[] = "xxx_update4";
int fd;
Elf *elf;
Elf32_Ehdr *ehdr;