More than a year ago, I had my first occurrence of a package that refused to work when run as root: dev-db/mysql. This lead to the following block of code in the src_test block:
if [[ $UID -eq 0 ]]; then die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." fi The latest package to fall into the same trap is dev-util/git. With testcases that are designed as expected failures, but pass when run as root, and the testsuite says that the package is broken thusly. setup: # mkdir d && # touch d/f && # chmod a-x d expected failure test: # stat d/f Having the if/die structure in src_test however is ugly, as if you are testing lots of packages, and you miss it, then you get mucked over. I think that there are also other packages that NEED root to run their tests due to kernel interaction (audit, cpu affinity iirc). Does anybody have suggestions on a better way of enforcing user/root for src_test, instead of having a nasty die structure? -- Robin Hugh Johnson Gentoo Linux Developer & Infra Guy E-Mail : [EMAIL PROTECTED] GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
pgpwNpKyCJZr1.pgp
Description: PGP signature