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

 
 

bug #56831: FAIL: tests/find/printf_inode

Submitter:  Michal Nowak <mno_hime>
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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

This issue has meanwhile been fixed with:
https://git.sv.gnu.org/cgit/findutils.git/commit/?id=21e23d1e60a

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

Bernhard Voelker <berny>
Group 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>
Group 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>
Group 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 @@
-___5691391_file
+5691391_file
--- exp 2019-08-30 09:30:29.640472309 +0000
+++ out2        2019-08-30 09:30:29.656348083 +0000
@@ -1 +1 @@
-___5691391_file
+5691391_file
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:

findutils-4.7.0/tests/find/printf_inode.sh:
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:
   
   
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 berny (Posted a comment)
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by mno_hime (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
    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.13-f8d8.
    Corresponding source code