commit:     ebee474c08d6219b0a0ff88139ce0aabf3ec529c
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  3 17:21:11 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Aug  3 17:26:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebee474c

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 <AT> gentoo.org>

 sys-fs/udev/udev-249-r2.ebuild | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sys-fs/udev/udev-249-r2.ebuild b/sys-fs/udev/udev-249-r2.ebuild
index e2c3e613c5e..d22a44bf678 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"

Reply via email to