findutils: disable a bogus test

This commit is contained in:
Dmitry Kalinkin 2018-09-14 11:13:53 -07:00
parent aea9db9d50
commit ef04b4f283
2 changed files with 32 additions and 1 deletions

View File

@ -10,7 +10,13 @@ stdenv.mkDerivation rec {
sha256 = "178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y";
};
patches = [ ./memory-leak.patch ./no-install-statedir.patch ];
patches = [
./memory-leak.patch
./no-install-statedir.patch
# prevent tests from failing on old kernels
./disable-getdtablesize-test.patch
];
buildInputs = [ coreutils ]; # bin/updatedb script needs to call sort

View File

@ -0,0 +1,25 @@
diff --git a/tests/test-dup2.c b/tests/test-dup2.c
--- a/tests/test-dup2.c
+++ b/tests/test-dup2.c
@@ -157,8 +157,6 @@ main (void)
ASSERT (close (255) == 0);
ASSERT (close (256) == 0);
}
- ASSERT (dup2 (fd, bad_fd - 1) == bad_fd - 1);
- ASSERT (close (bad_fd - 1) == 0);
errno = 0;
ASSERT (dup2 (fd, bad_fd) == -1);
ASSERT (errno == EBADF);
diff --git a/tests/test-getdtablesize.c b/tests/test-getdtablesize.c
index a0325af..a83f8ec 100644
--- a/tests/test-getdtablesize.c
+++ b/tests/test-getdtablesize.c
@@ -29,8 +29,6 @@ int
main (int argc, char *argv[])
{
ASSERT (getdtablesize () >= 3);
- ASSERT (dup2 (0, getdtablesize() - 1) == getdtablesize () - 1);
- ASSERT (dup2 (0, getdtablesize()) == -1);
return 0;
}