summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog40
-rw-r--r--tests/test-areadlink-with-size.c2
-rw-r--r--tests/test-areadlink.c2
-rw-r--r--tests/test-areadlinkat-with-size.c2
-rw-r--r--tests/test-areadlinkat.c2
-rw-r--r--tests/test-canonicalize-lgpl.c2
-rw-r--r--tests/test-canonicalize.c2
-rw-r--r--tests/test-chown.c2
-rw-r--r--tests/test-fchownat.c2
-rw-r--r--tests/test-fdutimensat.c2
-rw-r--r--tests/test-fstatat.c4
-rw-r--r--tests/test-futimens.c2
-rw-r--r--tests/test-lchown.c2
-rw-r--r--tests/test-link.c2
-rw-r--r--tests/test-linkat.c2
-rw-r--r--tests/test-lstat.c3
-rw-r--r--tests/test-lstat.h3
-rw-r--r--tests/test-mkdir.c2
-rw-r--r--tests/test-mkdirat.c2
-rw-r--r--tests/test-mkfifo.c2
-rw-r--r--tests/test-mkfifoat.c2
-rw-r--r--tests/test-mknod.c2
-rw-r--r--tests/test-readlink.c2
-rw-r--r--tests/test-remove.c2
-rw-r--r--tests/test-rename.c2
-rw-r--r--tests/test-renameat.c2
-rw-r--r--tests/test-rmdir.c3
-rw-r--r--tests/test-rmdir.h3
-rw-r--r--tests/test-symlink.c2
-rw-r--r--tests/test-symlinkat.c2
-rw-r--r--tests/test-unlink.c3
-rw-r--r--tests/test-unlink.h3
-rw-r--r--tests/test-unlinkat.c4
-rw-r--r--tests/test-utimens.c2
-rw-r--r--tests/test-utimensat.c2
35 files changed, 83 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index 60a9b5626f..41ef6f718b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,44 @@
2009-12-29 Simon Josefsson <simon@josefsson.org>
+ and Eric Blake <ebb9@byu.net>
+
+ tests: don't require debug system() to pass
+ * tests/test-lstat.h (test_lstat_func): Move debug cleanup...
+ * tests/test-rmdir.h (test_rmdir_func): Likewise.
+ * tests/test-unlink.h (test_unlink_func): Likewise.
+ * tests/test-fstatat.c (main): ...into callers.
+ * tests/test-lstat.c (main): Likewise.
+ * tests/test-rmdir.c (main): Likewise.
+ * tests/test-unlink.c (main): Likewise.
+ * tests/test-unlinkat.c (main): Likewise.
+ * tests/test-areadlink-with-size.c (main): Don't require a
+ debug-only system call to pass, aiding cross-testing to mingw.
+ * tests/test-areadlink.c (main): Likewise.
+ * tests/test-areadlinkat-with-size.c (main): Likewise.
+ * tests/test-areadlinkat.c (main): Likewise.
+ * tests/test-canonicalize-lgpl.c (main): Likewise.
+ * tests/test-canonicalize.c (main): Likewise.
+ * tests/test-chown.c (main): Likewise.
+ * tests/test-fchownat.c (main): Likewise.
+ * tests/test-lchown.c (main): Likewise.
+ * tests/test-fdutimensat.c (main): Likewise.
+ * tests/test-futimens.c (main): Likewise.
+ * tests/test-link.c (main): Likewise.
+ * tests/test-linkat.c (main): Likewise.
+ * tests/test-mkdir.c (main): Likewise.
+ * tests/test-mkdirat.c (main): Likewise.
+ * tests/test-mkfifo.c (main): Likewise.
+ * tests/test-mkfifoat.c (main): Likewise.
+ * tests/test-mknod.c (main): Likewise.
+ * tests/test-readlink.c (main): Likewise.
+ * tests/test-remove.c (main): Likewise.
+ * tests/test-rename.c (main): Likewise.
+ * tests/test-renameat.c (main): Likewise.
+ * tests/test-symlink.c (main): Likewise.
+ * tests/test-symlinkat.c (main): Likewise.
+ * tests/test-utimens.c (main): Likewise.
+ * tests/test-utimensat.c (main): Likewise.
+
+2009-12-29 Simon Josefsson <simon@josefsson.org>
* modules/selinux-h (selinux/selinux.h, selinux/context.h): Depend
on $(UNUSED_PARAMETER_H) to avoid build failure.
diff --git a/tests/test-areadlink-with-size.c b/tests/test-areadlink-with-size.c
index 8b7ff63ec5..d5f4a0d3eb 100644
--- a/tests/test-areadlink-with-size.c
+++ b/tests/test-areadlink-with-size.c
@@ -39,7 +39,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_areadlink (areadlink_with_size, true);
}
diff --git a/tests/test-areadlink.c b/tests/test-areadlink.c
index 2e8aaa5fb7..272a614cba 100644
--- a/tests/test-areadlink.c
+++ b/tests/test-areadlink.c
@@ -46,7 +46,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_areadlink (do_areadlink, true);
}
diff --git a/tests/test-areadlinkat-with-size.c b/tests/test-areadlinkat-with-size.c
index 67252a7fc0..113c6b40e9 100644
--- a/tests/test-areadlinkat-with-size.c
+++ b/tests/test-areadlinkat-with-size.c
@@ -50,7 +50,7 @@ main (void)
int result;
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result = test_areadlink (do_areadlinkat_with_size, false);
diff --git a/tests/test-areadlinkat.c b/tests/test-areadlinkat.c
index 54e0745c78..68d7f583b8 100644
--- a/tests/test-areadlinkat.c
+++ b/tests/test-areadlinkat.c
@@ -50,7 +50,7 @@ main (void)
int result;
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result = test_areadlink (do_areadlinkat, false);
diff --git a/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c
index e35d921bbd..2425921587 100644
--- a/tests/test-canonicalize-lgpl.c
+++ b/tests/test-canonicalize-lgpl.c
@@ -55,7 +55,7 @@ main (void)
any leftovers from a previous partial run. */
{
int fd;
- ASSERT (system ("rm -rf " BASE " ise") == 0);
+ system ("rm -rf " BASE " ise");
ASSERT (mkdir (BASE, 0700) == 0);
fd = creat (BASE "/tra", 0600);
ASSERT (0 <= fd);
diff --git a/tests/test-canonicalize.c b/tests/test-canonicalize.c
index 583026744f..b09c1caed2 100644
--- a/tests/test-canonicalize.c
+++ b/tests/test-canonicalize.c
@@ -46,7 +46,7 @@ main (void)
any leftovers from a previous partial run. */
{
int fd;
- ASSERT (system ("rm -rf " BASE " ise") == 0);
+ system ("rm -rf " BASE " ise");
ASSERT (mkdir (BASE, 0700) == 0);
fd = creat (BASE "/tra", 0600);
ASSERT (0 <= fd);
diff --git a/tests/test-chown.c b/tests/test-chown.c
index 39749039ed..15a6d75357 100644
--- a/tests/test-chown.c
+++ b/tests/test-chown.c
@@ -42,7 +42,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_chown (chown, true);
}
diff --git a/tests/test-fchownat.c b/tests/test-fchownat.c
index a6d177d36a..f7c5827ae6 100644
--- a/tests/test-fchownat.c
+++ b/tests/test-fchownat.c
@@ -63,7 +63,7 @@ main (void)
int result2; /* Skip because of no lchown support. */
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result1 = test_chown (do_chown, true);
diff --git a/tests/test-fdutimensat.c b/tests/test-fdutimensat.c
index ad0eca94b8..0e7666117a 100644
--- a/tests/test-fdutimensat.c
+++ b/tests/test-fdutimensat.c
@@ -84,7 +84,7 @@ main (void)
int fd;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result1 = test_utimens (do_utimens, true);
diff --git a/tests/test-fstatat.c b/tests/test-fstatat.c
index e6abe38e26..6160e16145 100644
--- a/tests/test-fstatat.c
+++ b/tests/test-fstatat.c
@@ -60,6 +60,10 @@ int
main (void)
{
int result;
+
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
result = test_stat_func (do_stat, false);
ASSERT (test_lstat_func (do_lstat, false) == result);
dfd = open (".", O_RDONLY);
diff --git a/tests/test-futimens.c b/tests/test-futimens.c
index 0ee1fe05ed..af553a9bcd 100644
--- a/tests/test-futimens.c
+++ b/tests/test-futimens.c
@@ -44,7 +44,7 @@ int
main (void)
{
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_futimens (futimens, true);
}
diff --git a/tests/test-lchown.c b/tests/test-lchown.c
index 24b7ece95a..0c0aa11779 100644
--- a/tests/test-lchown.c
+++ b/tests/test-lchown.c
@@ -42,7 +42,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_lchown (lchown, true);
}
diff --git a/tests/test-link.c b/tests/test-link.c
index 817c464b7a..9c1ce36210 100644
--- a/tests/test-link.c
+++ b/tests/test-link.c
@@ -40,7 +40,7 @@ int
main (void)
{
/* Remove any garbage left from previous partial runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_link (link, true);
}
diff --git a/tests/test-linkat.c b/tests/test-linkat.c
index 98165c0153..efe5109db1 100644
--- a/tests/test-linkat.c
+++ b/tests/test-linkat.c
@@ -81,7 +81,7 @@ main (void)
int result;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Test basic link functionality, without mentioning symlinks. */
result = test_link (do_link, true);
diff --git a/tests/test-lstat.c b/tests/test-lstat.c
index 1940a2158b..bff40ebf30 100644
--- a/tests/test-lstat.c
+++ b/tests/test-lstat.c
@@ -52,5 +52,8 @@ do_lstat (char const *name, struct stat *st)
int
main (void)
{
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
return test_lstat_func (do_lstat, true);
}
diff --git a/tests/test-lstat.h b/tests/test-lstat.h
index 3828316f6d..071626a3c7 100644
--- a/tests/test-lstat.h
+++ b/tests/test-lstat.h
@@ -28,9 +28,6 @@ test_lstat_func (int (*func) (char const *, struct stat *), bool print)
struct stat st1;
struct stat st2;
- /* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
-
/* Test for common directories. */
ASSERT (func (".", &st1) == 0);
ASSERT (func ("./", &st2) == 0);
diff --git a/tests/test-mkdir.c b/tests/test-mkdir.c
index 379e90c5a3..6be4486e81 100644
--- a/tests/test-mkdir.c
+++ b/tests/test-mkdir.c
@@ -40,7 +40,7 @@ int
main (void)
{
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_mkdir (mkdir, true);
}
diff --git a/tests/test-mkdirat.c b/tests/test-mkdirat.c
index d3180e6d56..fe0da254fa 100644
--- a/tests/test-mkdirat.c
+++ b/tests/test-mkdirat.c
@@ -51,7 +51,7 @@ main (void)
int result;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Test basic mkdir functionality. */
result = test_mkdir (do_mkdir, false);
diff --git a/tests/test-mkfifo.c b/tests/test-mkfifo.c
index 4b4c93b53d..fc36412b1e 100644
--- a/tests/test-mkfifo.c
+++ b/tests/test-mkfifo.c
@@ -40,7 +40,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_mkfifo (mkfifo, true);
}
diff --git a/tests/test-mkfifoat.c b/tests/test-mkfifoat.c
index ef3e817c8d..0b2018173d 100644
--- a/tests/test-mkfifoat.c
+++ b/tests/test-mkfifoat.c
@@ -72,7 +72,7 @@ main (void)
int result;
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result = test_mkfifo (do_mkfifoat, true);
diff --git a/tests/test-mknod.c b/tests/test-mknod.c
index a62df6d112..ed16b50028 100644
--- a/tests/test-mknod.c
+++ b/tests/test-mknod.c
@@ -47,7 +47,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* We can only portably test creation of fifos. Anything else
requires root privileges and knowledge of device numbers. */
diff --git a/tests/test-readlink.c b/tests/test-readlink.c
index 4ec0fcdf73..ed30c1d8cb 100644
--- a/tests/test-readlink.c
+++ b/tests/test-readlink.c
@@ -41,7 +41,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_readlink (readlink, true);
}
diff --git a/tests/test-remove.c b/tests/test-remove.c
index 4bcc2ec2dd..5428e3723d 100644
--- a/tests/test-remove.c
+++ b/tests/test-remove.c
@@ -38,7 +38,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Setup. */
ASSERT (mkdir (BASE "dir", 0700) == 0);
diff --git a/tests/test-rename.c b/tests/test-rename.c
index 797cc940df..17cd025cf8 100644
--- a/tests/test-rename.c
+++ b/tests/test-rename.c
@@ -39,7 +39,7 @@ int
main (void)
{
/* Remove any garbage left from previous partial runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_rename (rename, true);
}
diff --git a/tests/test-renameat.c b/tests/test-renameat.c
index de84fa6764..a22af04513 100644
--- a/tests/test-renameat.c
+++ b/tests/test-renameat.c
@@ -57,7 +57,7 @@ main (void)
int result;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Test basic rename functionality, using current directory. */
result = test_rename (do_rename, false);
diff --git a/tests/test-rmdir.c b/tests/test-rmdir.c
index 9ca88e2abd..a270ca7e3a 100644
--- a/tests/test-rmdir.c
+++ b/tests/test-rmdir.c
@@ -39,5 +39,8 @@ SIGNATURE_CHECK (rmdir, int, (char const *));
int
main (void)
{
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
return test_rmdir_func (rmdir, true);
}
diff --git a/tests/test-rmdir.h b/tests/test-rmdir.h
index 5f1e955bea..19c69616d1 100644
--- a/tests/test-rmdir.h
+++ b/tests/test-rmdir.h
@@ -25,9 +25,6 @@
static int
test_rmdir_func (int (*func) (char const *name), bool print)
{
- /* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
-
/* Setup. */
ASSERT (mkdir (BASE "dir", 0700) == 0);
ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
diff --git a/tests/test-symlink.c b/tests/test-symlink.c
index c84b2bc7f1..f066ee3dc3 100644
--- a/tests/test-symlink.c
+++ b/tests/test-symlink.c
@@ -40,7 +40,7 @@ int
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_symlink (symlink, true);
}
diff --git a/tests/test-symlinkat.c b/tests/test-symlinkat.c
index 714dd98932..be59d5de78 100644
--- a/tests/test-symlinkat.c
+++ b/tests/test-symlinkat.c
@@ -64,7 +64,7 @@ main (void)
int result;
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Perform same checks as counterpart functions. */
result = test_readlink (do_readlink, false);
diff --git a/tests/test-unlink.c b/tests/test-unlink.c
index 15258028a5..b87f7d642b 100644
--- a/tests/test-unlink.c
+++ b/tests/test-unlink.c
@@ -41,5 +41,8 @@ SIGNATURE_CHECK (unlink, int, (char const *));
int
main (void)
{
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
return test_unlink_func (unlink, true);
}
diff --git a/tests/test-unlink.h b/tests/test-unlink.h
index e65057de47..05be29cf12 100644
--- a/tests/test-unlink.h
+++ b/tests/test-unlink.h
@@ -25,9 +25,6 @@
static int
test_unlink_func (int (*func) (char const *name), bool print)
{
- /* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
-
/* Setup. */
ASSERT (mkdir (BASE "dir", 0700) == 0);
ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
diff --git a/tests/test-unlinkat.c b/tests/test-unlinkat.c
index 3d7f118410..bd2b48a0d8 100644
--- a/tests/test-unlinkat.c
+++ b/tests/test-unlinkat.c
@@ -60,6 +60,10 @@ main (void)
/* FIXME: Add tests of fd other than ".". */
int result1;
int result2;
+
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
result1 = test_rmdir_func (rmdirat, false);
result2 = test_unlink_func (unlinker, false);
ASSERT (result1 == result2);
diff --git a/tests/test-utimens.c b/tests/test-utimens.c
index 618d941b0a..dccaacc5e3 100644
--- a/tests/test-utimens.c
+++ b/tests/test-utimens.c
@@ -66,7 +66,7 @@ main (void)
int result3; /* Skip because of no lutimens support. */
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
result1 = test_utimens (utimens, true);
ASSERT (test_utimens (do_fdutimens, false) == result1);
diff --git a/tests/test-utimensat.c b/tests/test-utimensat.c
index ba4c22d6ed..45aa8c373c 100644
--- a/tests/test-utimensat.c
+++ b/tests/test-utimensat.c
@@ -66,7 +66,7 @@ main (void)
int fd;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result1 = test_utimens (do_utimensat, true);