Merge pull request #46669 from veprbl/findutils_fix_staging

findutils: disable a bogus test
This commit is contained in:
Jörg Thalheim 2018-09-15 19:44:14 +01:00 committed by GitHub
commit 017d86be74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 1 deletions

View File

@ -10,7 +10,14 @@ stdenv.mkDerivation rec {
sha256 = "178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y"; 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 (2.6x)
# getdtablesize reports incorrect values if getrlimit() fails
./disable-getdtablesize-test.patch
];
buildInputs = [ coreutils ]; # bin/updatedb script needs to call sort 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;
}