summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2021-08-03 13:21:11 -0400
committerMike Gilbert <floppym@gentoo.org>2021-08-03 13:26:12 -0400
commitebee474c08d6219b0a0ff88139ce0aabf3ec529c (patch)
tree28ec321882d2d8d811ceec338c4ce914779e4021 /sys-fs/udev
parentacct-user/karma: typo fix (diff)
downloadgentoo-ebee474c08d6219b0a0ff88139ce0aabf3ec529c.tar.gz
gentoo-ebee474c08d6219b0a0ff88139ce0aabf3ec529c.tar.bz2
gentoo-ebee474c08d6219b0a0ff88139ce0aabf3ec529c.zip
sys-fs/udev: adjust test logic
Check EUID instead of FEATURES=userpriv. It is possible the ebuild is executing as some other user, regardless of the userpriv feature. Drop the usersandbox check: this is only relevant if the ebuild phase is running as a non-root user, and we already handle that with the EUID check. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-fs/udev')
-rw-r--r--sys-fs/udev/udev-249-r2.ebuild7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys-fs/udev/udev-249-r2.ebuild b/sys-fs/udev/udev-249-r2.ebuild
index e2c3e613c5e6..d22a44bf678d 100644
--- a/sys-fs/udev/udev-249-r2.ebuild
+++ b/sys-fs/udev/udev-249-r2.ebuild
@@ -199,14 +199,9 @@ multilib_src_test() {
# udev calls 'mknod' a number of times, and this interacts
# badly with kernel namespaces.
- if has userpriv ${FEATURES}; then
- ewarn "\'FEATURES=userpriv\' detected"
+ if [[ ${EUID} -ne 0 ]]; then
ewarn "udev tests need to run under uid 0"
ewarn "Skipping tests"
- elif has usersandbox ${FEATURES}; then
- ewarn "\'FEATURES=usersandbox\' detected"
- ewarn "udev tests needs full access to /dev"
- ewarn "Skipping tests"
elif has sandbox ${FEATURES}; then
ewarn "\'FEATURES=sandbox\' detected"
ewarn "udev tests needs full access to /dev"