Bug 1799064 - upstream test find.posix/sv-bug-54171 fails while running with root privileges
Summary: upstream test find.posix/sv-bug-54171 fails while running with root privileges
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: findutils
Version: 31
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-06 14:52 UTC by 1014938109
Modified: 2020-02-11 09:41 UTC (History)
3 users (show)

Fixed In Version: findutils-4.7.0-3.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-11 09:41:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Savannah 57762 0 None None None 2020-02-10 08:19:02 UTC

Description 1014938109 2020-02-06 14:52:43 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 1014938109 2020-02-06 14:58:15 UTC
(In reply to 1014938109 from comment #0)
> Description of problem:
> When i use rpmbuild to build findutils of 4.7.0 as root, the test failed,
FAIL: sv-bug-54171.old-O3,
FAIL: sv-bug-54171.new-O3,
If i change to non-root user, the building succeded.
> 
> Version-Release number of selected component (if applicable):
> 
> 
> How reproducible:
> 
> 
> Steps to Reproduce:
> 1.[root@localhost findutils]# rpmbuild -ba findutils.spec
> 2.
> 3.
> 
> Actual results:
>                 === find Summary ===

# of expected passes            943
# of unexpected failures        2
# of untested testcases         2
find (GNU findutils) 4.7.0
make[3]: *** [Makefile:1942: check-DEJAGNU] Error 1
make[3]: Leaving directory '/root/rpmbuild/BUILD/findutils-4.7.0/build/find/testsuite'
make[2]: *** [Makefile:2017: check-am] Error 2
make[2]: Leaving directory '/root/rpmbuild/BUILD/findutils-4.7.0/build/find/testsuite'
make[1]: *** [Makefile:2008: check-recursive] Error 1
make[1]: Leaving directory '/root/rpmbuild/BUILD/findutils-4.7.0/build/find'
make: *** [Makefile:2109: check-recursive] Error 1
make: Leaving directory '/root/rpmbuild/BUILD/findutils-4.7.0/build'
error: Bad exit status from /var/tmp/rpm-tmp.x9ibSi (%check)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.x9ibSi (%check)

> 
> Expected results:
> Building success.
> 
> Additional info:

Comment 2 1014938109 2020-02-06 15:00:35 UTC
(In reply to 1014938109 from comment #1)
> (In reply to 1014938109 from comment #0)
> > Description of problem:
> > When i use rpmbuild to build findutils of 4.7.0 as root, the test failed,
> FAIL: sv-bug-54171.old-O3,
> FAIL: sv-bug-54171.new-O3,
> If i change to non-root user, the building succeded.
> > 
> > Version-Release number of selected component (if applicable):
> > 
> > 
> > How reproducible:
> > 
> > 
> > Steps to Reproduce:
> > 1.[root@localhost findutils]# rpmbuild -ba findutils.spec
> > 2.
> > 3.
> > 
> > Actual results:
> >                 === find Summary ===
> 
> # of expected passes            943
> # of unexpected failures        2
> # of untested testcases         2
> find (GNU findutils) 4.7.0
> make[3]: *** [Makefile:1942: check-DEJAGNU] Error 1
> make[3]: Leaving directory
> '/root/rpmbuild/BUILD/findutils-4.7.0/build/find/testsuite'
> make[2]: *** [Makefile:2017: check-am] Error 2
> make[2]: Leaving directory
> '/root/rpmbuild/BUILD/findutils-4.7.0/build/find/testsuite'
> make[1]: *** [Makefile:2008: check-recursive] Error 1
> make[1]: Leaving directory '/root/rpmbuild/BUILD/findutils-4.7.0/build/find'
> make: *** [Makefile:2109: check-recursive] Error 1
> make: Leaving directory '/root/rpmbuild/BUILD/findutils-4.7.0/build'
> error: Bad exit status from /var/tmp/rpm-tmp.x9ibSi (%check)
> 
> 
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.x9ibSi (%check)
> 
> > 
> > Expected results:
> > Building success.
> > 
> > Additional info:

Running ../../../find/testsuite/find.posix/sv-bug-54171.exp ...
FAIL: sv-bug-54171.old-O3,
FAIL: sv-bug-54171.new-O3,

Comment 3 Kamil Dudka 2020-02-06 15:17:58 UTC
Why do you run the build as root in the first place?

This not recommended for several reasons.  For example coreutils, which is very similar to findutils, refuses to build unless you export FORCE_UNSAFE_CONFIGURE=1.

Comment 4 1014938109 2020-02-06 16:00:34 UTC
(In reply to Kamil Dudka from comment #3)
> Why do you run the build as root in the first place?
> 
> This not recommended for several reasons.  For example coreutils, which is
> very similar to findutils, refuses to build unless you export
> FORCE_UNSAFE_CONFIGURE=1.

Thank you for you apply.
I used to login as root, so i find the problem by accident.
And i want to know why root could caused the failure, i haven't seen any limitation on this.

Comment 5 Kamil Dudka 2020-02-07 15:09:56 UTC
find.posix/sv-bug-54171 expects find -depth to return non-zero exit code when it encounters an unreadable directory.  The problem is that a directory with permissions 0311 is not really unreadable when find runs with root privileges.

Comment 6 Kamil Dudka 2020-02-11 09:01:48 UTC
upstream commit:

https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=2f9fff9e1

Comment 7 Kamil Dudka 2020-02-11 09:41:29 UTC
dist-git commit:

https://src.fedoraproject.org/rpms/findutils/c/9f5b30bd


Note You need to log in before you can comment on or make changes to this bug.