Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 759466

Summary: >=app-misc/mc-4.8.25 - extfs test failures if running as root with FEATURES=-userpriv
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED FIXED    
Severity: normal CC: jstein, marecki, slashbeast, slyfox
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: PPC64   
OS: Linux   
URL: https://midnight-commander.org/ticket/3866
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log (ppc64)
test-suite.log
emerge --info
build.log (ppc64, 4.8.26-r3)
test-suite.log (ppc64, 4.8.26-r3)

Description ernsteiswuerfel archtester 2020-12-11 12:58:54 UTC
Created attachment 677887 [details]
build.log (ppc64)

==================================================================================
   /src/vfs/extfs/helpers-list: tests/src/vfs/extfs/helpers-list/test-suite.log
==================================================================================

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: run
=========

Testing /var/tmp/portage/app-misc/mc-4.8.25/work/mc-4.8.25/tests/src/vfs/extfs/helpers-list/data/hp48+.i
nput
/var/tmp/portage/app-misc/mc-4.8.25/work/mc-4.8.25/tests/src/vfs/extfs/helpers-list/data/hp48+.output /v
ar/tmp/portage/app-misc/mc-4.8.25/temp/hp48+.actual-parsed-output.rZ3XaA2e differ: char 17, line 1

ERROR: hp48+ has produced output that's different than the expected output.
Comment 1 ernsteiswuerfel archtester 2020-12-11 12:59:38 UTC
Created attachment 677890 [details]
test-suite.log
Comment 2 ernsteiswuerfel archtester 2020-12-11 13:00:08 UTC
Created attachment 677893 [details]
emerge --info
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-12-11 23:20:04 UTC
diffs claim to have some uid/gid parsing problem:

"""
------------ diff of the expected output vs the actual output: -------------
--- /var/tmp/portage/app-misc/mc-4.8.25/work/mc-4.8.25/tests/src/vfs/extfs/helpers-list/data/hp48+.output	2020-01-01 16:52:34.000000000 +0100
+++ /var/tmp/portage/app-misc/mc-4.8.25/temp/hp48+.actual-parsed-output.rZ3XaA2e	2020-12-11 13:23:55.995461256 +0100
@@ -1,3 +1,3 @@
--rw-r--r--   1        0        0         30 /YEN
--rw-r--r--   1        0        0      21848 /JYTLIGHT
--rw-r--r--   1        0        0         37 /IOPAR
+-rw-r--r--   1  <<uid>>  <<gid>>         30 /YEN
+-rw-r--r--   1  <<uid>>  <<gid>>      21848 /JYTLIGHT
+-rw-r--r--   1  <<uid>>  <<gid>>         37 /IOPAR
"""

Can't reproduce on timberdoodle ppc64 machine. Probably related to differences in environment.
Comment 4 Marek Szuba archtester gentoo-dev 2021-07-12 21:46:16 UTC
Could you check if this still happens with 4.8.26, ernsteiswuerfel? According to src/vfs/extfs/helpers/hp48+.in in the source tarball, or /usr/libexec/mc/extfs.d/hp48+ on my box, this version should have the UID and the GID hard-coded to 0 0 for any output of this helper.
Comment 5 ernsteiswuerfel archtester 2021-07-14 16:58:11 UTC
Created attachment 723874 [details]
build.log (ppc64, 4.8.26-r3)

The test still fails on 4.8.26-r2 and -r3.
Comment 6 ernsteiswuerfel archtester 2021-07-14 16:59:35 UTC
Created attachment 723877 [details]
test-suite.log (ppc64, 4.8.26-r3)
Comment 7 Marek Szuba archtester gentoo-dev 2021-07-14 21:05:04 UTC
(In reply to ernsteiswuerfel from comment #5)

> The test still fails on 4.8.26-r2 and -r3.

I think I've figured it out... Could you please try again with FEATURES=userpriv?
Comment 8 Marek Szuba archtester gentoo-dev 2021-07-14 21:11:29 UTC
...and it turns out upstream has already known about this for several years.
Comment 9 ernsteiswuerfel archtester 2021-07-14 21:13:46 UTC
(In reply to Marek Szuba from comment #7)
> I think I've figured it out... Could you please try again with
> FEATURES=userpriv?
Yes, I can confirm this!
Comment 10 Larry the Git Cow gentoo-dev 2021-07-14 23:32:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5ff312037a07683efb5513f26759fa3fd9b4fce

commit c5ff312037a07683efb5513f26759fa3fd9b4fce
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2021-07-14 23:30:52 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2021-07-14 23:32:05 +0000

    app-misc/mc: warn about test failures if executing them as UID 0
    
    Closes: https://bugs.gentoo.org/759466
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 app-misc/mc/mc-4.8.26-r3.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)