Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947985 - sys-apps/dcfldd-1.9.2-r1 fails tests: tee: stderr: Permission denied
Summary: sys-apps/dcfldd-1.9.2-r1 fails tests: tee: stderr: Permission denied
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sebastian Pipping
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2025-01-12 13:16 UTC by Agostino Sarubbo
Modified: 2025-01-12 19:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,58.22 KB, text/plain)
2025-01-12 13:16 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2025-01-12 13:16:25 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-apps/dcfldd-1.9.2-r1 fails tests.
Discovered on: amd64 (internal ref: ci)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0015
Comment 1 Agostino Sarubbo gentoo-dev 2025-01-12 13:16:26 UTC
Created attachment 916387 [details]
build.log

build log and emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-12 13:17:39 UTC
I think we can/should avoid the use of tee there.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-12 13:18:00 UTC
Also, note that the pipes there mean we don't catch errors from dcfldd itself.
Comment 4 Sebastian Pipping gentoo-dev 2025-01-12 17:39:32 UTC
(In reply to Sam James from comment #2)
> I think we can/should avoid the use of tee there.

I can sure resolve the "tee /dev/stderr" but wth is "tee: /dev/stderr: Permission denied", why? :)

(In reply to Sam James from comment #3)
> Also, note that the pipes there mean we don't catch errors from dcfldd
> itself.

I can add "set -o pipefile" if that's what you're thinking of.

Starting now…
Comment 5 Sebastian Pipping gentoo-dev 2025-01-12 17:40:00 UTC
> I can add "set -o pipefile" if that's what you're thinking of.

pipefail of course, my bad.
Comment 6 Sebastian Pipping gentoo-dev 2025-01-12 17:44:35 UTC
Update: deciding against pipefail complexity now, the goal of the test is to detect miscompilation, all else seems out of scope to me.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-12 17:48:10 UTC
inherit eapi9-pipestatus
...
	expected_sha256sum="$(sha256sum <<<TestInput | awk '{print $1}' \
		| tee /dev/stderr ; pipestatus || die)"
...
repeat for other subshell
Comment 8 Larry the Git Cow gentoo-dev 2025-01-12 17:48:22 UTC
The bug has been closed via the following commit(s):

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

commit a3f668d0f70f94d7c5154084703ac75355b17998
Author:     Sebastian Pipping <sping@gentoo.org>
AuthorDate: 2025-01-12 17:46:30 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2025-01-12 17:46:30 +0000

    sys-apps/dcfldd: Improve test for miscompilation
    
    Closes: https://bugs.gentoo.org/947985
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>

 sys-apps/dcfldd/dcfldd-1.9.2-r1.ebuild | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Comment 9 Sebastian Pipping gentoo-dev 2025-01-12 17:56:28 UTC
(In reply to Sam James from comment #7)
> inherit eapi9-pipestatus
> ...
> 	expected_sha256sum="$(sha256sum <<<TestInput | awk '{print $1}' \
> 		| tee /dev/stderr ; pipestatus || die)"
> ...
> repeat for other subshell

I saw that after posting but I also don't think it will work with the "|| die" /inside/ the command substitution.  The example from eapi9-pipestatus.eclass has the die /outside/ the command substitution:

  status=$(pipestatus -v) || die "foo | bar failed, status ${status}"

I didn't know that worked but it does.  Interesting.  Not worth the complexity though in my book.  Please extend the test if you see need to (— I don't).
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-12 18:13:26 UTC
(In reply to Sebastian Pipping from comment #9)
> (In reply to Sam James from comment #7)
> > inherit eapi9-pipestatus
> > ...
> > 	expected_sha256sum="$(sha256sum <<<TestInput | awk '{print $1}' \
> > 		| tee /dev/stderr ; pipestatus || die)"
> > ...
> > repeat for other subshell
> 
> I saw that after posting but I also don't think it will work with the "||
> die" /inside/ the command substitution.  The example from
> eapi9-pipestatus.eclass has the die /outside/ the command substitution:
> 

src_prepare() {
    default
    x=$(false || die)
}

(bug 465008)
Comment 11 Sebastian Pipping gentoo-dev 2025-01-12 19:50:21 UTC
Black magic, I see!