bugfindutils - Bugs: bug #57839, Remove/fix getdtablesize tests

 
 

bug #57839: Remove/fix getdtablesize tests

Submitter:  None
Submitted:  Mon 17 Feb 2020 05:47:01 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Test suite failure Status:  Works For Me
Privacy:  Public Assigned to:  berny
Originator Name:  Truls Asheim Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  None
Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 19 Feb 2020 09:58:22 PM UTC, comment #3: 

Thanks for adding more information.

I'm still quite confused about that combination.
I used the mentioned centos:6 in a docker container, and therefore I had
glibc-2.12 (from the container's Centos 6 system), and kernel 5.5.1 from
my host OS openSUSE:Tumbleweed.
Therefore I wonder how you could have a newer glibc-2.30 on Centos 6.

Anyway:

> failures occur only when building against a recent (2.30) glibc on older (2.6.x) kernels.


As can be seen from the output you provided, both failures originate
from dup2 not working on that combination.

Therefore, this is not a test framework failure aka false positive,
but a real issue on a system with that - highly unlikely - combination
of glibc-2.30 and kernel-2.6.x.  To be honest, I would expect more fallout
from such a combination.

Therefore, I would not want to mask that gnulib test in upstream GNU findutils,
because it is useful in general, but I'd rather suggest that you keep your
patch downstream to skip that test in your environment.
It is not uncommon to skip some tests which are known to fail in specialized
build environments (if one can rule out that this won't happen on a real system).

I'll therefore closing this issue as "Works For Me", but the discussion
can of course continue (and once there would be proof that this is a test failure
that has to be dealt with, the issue could be reopened).

Thanks for reporting this issue.

Bernhard Voelker <berny>
Group administrator
Tue 18 Feb 2020 10:50:42 AM UTC, comment #2: 

Sorry about not including the test log. Here it is:

======================================================
   GNU findutils 4.7.0: gnulib-tests/test-suite.log
======================================================

# TOTAL: 236
# PASS:  204
# SKIP:  30
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

[...]

FAIL: test-dup2
===============

test-dup2.c:164: assertion 'dup2 (fd, bad_fd - 1) == bad_fd - 1' failed
FAIL test-dup2 (exit status: 134)

FAIL: test-getdtablesize
========================

test-getdtablesize.c:32: assertion 'dup2 (0, getdtablesize() - 1) == getdtablesize () - 1' failed
FAIL test-getdtablesize (exit status: 134)

[...]

My understanding is that the test failures occur only when building against a recent (2.30) glibc on older (2.6.x) kernels. The tests pass when building using the Centos 6-native toolchain. I would therefore expect it to not be limited to nix, but I don't have a lot of time in the near future to set up an alternative build environment to test this, unfortunately.

There are some more details in the github link [1] I posted previously, including the patch which was previously used to locally disable the tests for nix builds. dup2 was still being tested, but the failing assertions using values from getdtablesize() was removed.

Regarding your last point, coreutils tests not run by the nix build scripts [2] in my case since I'm building to a non-standard store directory.

[1] https://github.com/NixOS/nixpkgs/pull/46669
[2] https://github.com/NixOS/nixpkgs/blob/8731aaaf8b30888bc24994096db830993090d7c4/pkgs/tools/misc/coreutils/default.nix#L100

Truls Asheim <truls>
Mon 17 Feb 2020 11:25:43 PM UTC, comment #1: 

Unfortunately, I can't find any test log, neither here in
this report nor in the linked places.

I never used nix, and I'm afraid I don't have much knowledge
about how it is working, so I tried to reproduce with
'docker run -it centos:6' on my openSUSE:Tumbleweed system with
a kernel 5.5.1, but all gnulib tests are passing there.

Without seeing the actual failures it's hard to judge:
it could be a test framework failure (false-positive),
but it could well be a real problem.
E.g. dup2 is used in xargs.c, so one might argue that
test-dup2 is indeed worth to be run.

The problem might be in the environment of the nix system only,
i.e., that would be a FP on that specific build environment.
But it could as well be a problem with the use on an actual
system with older Centos6/kernel, in which case the failing
test would be right.

Therefore, I'm quite reluctant to remove those tests, as they
might indicate an error on some target platforms.

So if a downstream test failure can be nailed down to be
due to limitations of the build environment, then I would
suggest to skip that test only there.

P.S. I'm curious: those 2 tests are also used in other packages
like the GNU coreutils; don't you see the same test failures there?

Bernhard Voelker <berny>
Group administrator
Mon 17 Feb 2020 05:47:01 PM UTC, original submission:  

Hi,

I recently experienced a test failure when compiling findutils 4.7.0 using nix on an older Centos 6 (kernel 2.6.32) system. Since nix requires tests to be successful, the compilation failed following the failure of the gnulib tests which relies on the getdtablesize function: test-getdtablesize and test-dup2 [1].

The opinion of the nix maintainer is that these tests are irrelevant for the features provided by findutils and that they therefore should be removed. See [2] for more details.

If you agree with this assessment, is it possible for you to remove/fix the aforementioned tests?

[1] https://github.com/NixOS/nixpkgs/issues/80352
[2] https://github.com/NixOS/nixpkgs/pull/46669

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by truls (Posted a comment)
  • -email is unavailable- added by berny (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-19 berny StatusNeed Info Works For Me
        Open/ClosedOpen Closed
    2020-02-17 berny StatusNone Need Info
        Assigned toNone berny

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code