bugfindutils - Bugs: bug #56831, FAIL: tests/find/printf_inode


bug #56831: FAIL: tests/find/printf_inode

Submitted by:  Michal Nowak <mno_hime>
Submitted on:  Fri 30 Aug 2019 08:13:30 AM UTC  
Category:  find Severity:  3 - Normal
Item Group:  Test suite failure Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.7.0 Fixed Release:  4.8.0

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 09 Jan 2021 03:42:39 PM UTC, comment #3: 

This issue has meanwhile been fixed with:

I'm therefore closing this issue as FIXED for 4.8.0.

Bernhard Voelker <berny>
Project Administrator
Tue 03 Sep 2019 06:55:36 AM UTC, comment #2: 

> Try modifying init.cfg to print $PATH at the end of init.cfg.

Hmm, the shell tests should output the PATH value to the logfiles.
But path_prepend_ is at the end of init.cfg; my intention was to
avoid to add it to all tests.  And setup_ enables 'set -x' output
only after sourcing in init.cfg (in tests/init.sh, copied from gnulib).
I think I'll move the path_prepend calls back to the tests.

Bernhard Voelker <berny>
Project Administrator
Fri 30 Aug 2019 09:12:43 PM UTC, comment #1: 

As you're pointing out there are two issues here.

(1) Is the test suite overriding the user's choice of PATH? 
  ... If yes, that would be a bug.

(2) Should the behaviour of -printf %i follow GNU ls or the system ls?

For (2), since POSIX doesn't specify -printf, the decision to follow GNU ls specifically is certainly acceptable.  The option of emulating the system's ls seems like it would require a lot of code.  This code would be hard to  test since the maintainers would need to perform regression tests on every supported system (and, right now, there is no real notion of "supported system"; we attempt to support all systems that Autoconf can grok which have a standard-conforming hosted C implementation and on which the build tool dependencies can be built).

I tried to reproduce this problem, and didn't discover a location in which $PATH was changed in this way.   The test environment setup does prepend some directories, but these should only be source directories within the source tree and the build tree (if different).

Do you have, perhaps, $ENV set to a file which unconditionally sets $PATH to eliminate the PATH setting you are selecting with /usr/bin/env?   If you are, I'd suggest undetting $ENV.

Otherwise, I think I need more data about what is happening for you.   Try modifying init.cfg to print $PATH at the end of init.cfg.  The output should turn up in tests/find/printf_inode.log.      If that looks OK, check init.sh and the test script itself.   You can use make -n to figure out how the test script is being invoked.

James Youngman <jay>
Project Administrator
Fri 30 Aug 2019 08:13:30 AM UTC, original submission:  

On OpenIndiana 2019.04 (an illumos distribution) the tests/find/printf_inode test fails.

It's started like this like this with GNU utilities in the PATH taking precedence:

(cd /export/home/newman/ws/oi-userland/components/sysutils/findutils/build/amd64 ; \
        /usr/bin/env PATH="/usr/gnu/bin:/usr/bin:/usr/sbin:/usr/perl5/bin" GPG="gpg2" \
        /usr/gnu/bin/make \
        -k check) \
        &> /export/home/newman/ws/oi-userland/components/sysutils/findutils/build/test/amd64/test-64-results

And fails like this:

FAIL: tests/find/printf_inode

--- exp 2019-08-30 09:30:29.640472309 +0000
+++ out2        2019-08-30 09:30:29.647621420 +0000
@@ -1 +1 @@
--- exp 2019-08-30 09:30:29.640472309 +0000
+++ out2        2019-08-30 09:30:29.656348083 +0000
@@ -1 +1 @@
FAIL tests/find/printf_inode.sh (exit status: 1)

I think that the problem is that even-though I started the test with GNU utilities taking precedence in the PATH, the illumos `ls` was used.

See that the illumos `ls` has some alignment to the right:

$ /usr/gnu/bin/ls -i Makefile
5667484 Makefile

$ /bin/ls -i Makefile
   5667484 Makefile

Perhaps this code makes the difference:

make_canonical() {
  sed -e 's/ /_/g'

Michal Nowak <mno_hime>


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

Attach Files:

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 berny (Posted a comment)
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by mno_hime (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-09 berny StatusNeed Info => Fixed
        Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.8.0
    2019-09-01 jay StatusNone => Need Info

    Back to the top

    Powered by Savane 3.5