Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 857786 - sys-libs/compiler-rt-sanitizers-14.0.6 uses /tmp instead of /var/tmp/portage/ for tests
Summary: sys-libs/compiler-rt-sanitizers-14.0.6 uses /tmp instead of /var/tmp/portage/...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2022-07-12 18:47 UTC by Sunny
Modified: 2022-07-29 06:59 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sunny 2022-07-12 18:47:54 UTC
The test lib/tsan/rtl/CMakeFiles/GotsanRuntimeCheck uses /tmp instead of $T (usually /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.6/temp/).
I noticed this, since my test failed because I've mounted /tmp with noexec.

I expect portage to use /var/tmp/portage for all its needs and not also pollute /tmp.

Adding the following snippet in src_prepare() works for me:

       # The GotsanRuntimeCheck test is executed in /tmp which might be
       # mounted with 'noexec'. Modify the tmp dir to be ${T} instead of /tmp
       sed -i -e "s|mktemp -qd /tmp/gotsan.XXXXXXXXXX|mktemp -qd --tmpdir='${T}' gotsan.XXXXXXXXXX|" \
               lib/tsan/go/buildgo.sh || die
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-15 12:52:52 UTC
This might have been deliberate because of path length, but I still agree with your point.
Comment 2 Sunny 2022-07-23 04:45:13 UTC
> This might have been deliberate because of path length

If it helps: I had no trouble when compiling it in $T which was /var/tmp/portage/sys-libs/compiler-rt-sanitizers-xx.y.z/temp/