Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP

Loading…

Do not run test requiring root when fakeroot is used #1

Merged
merged 1 commit into from

2 participants

@eugmes

When build process is run under fakeroot reported UID is 0, but
it is not enough to run tests requiring root access. Using
fakeroot is needed for example for building Debian package.

I'm using a similar patch in Debian package. It would be good to drop it.

@eugmes eugmes Do not run test requiring root when fakeroot is used
When build process is run under fakeroot reported UID is 0, but
it is not enough to run tests requiring root access. Using
fakeroot is needed for example for building Debian package.
3421c35
@garlick garlick merged commit 17577b0 into chaos:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 21, 2011
  1. @eugmes

    Do not run test requiring root when fakeroot is used

    eugmes authored
    When build process is run under fakeroot reported UID is 0, but
    it is not enough to run tests requiring root access. Using
    fakeroot is needed for example for building Debian package.
This page is out of date. Refresh to see the latest.
View
5 tests/kern/runtest
@@ -17,6 +17,11 @@ if [ -z "$PATH_DIOD" ]; then
exit 1
fi
+if test -n "$FAKEROOTKEY"; then
+ echo "using fakeroot - skipping" >$TEST.out
+ exit 77
+fi
+
if test $(id -u) != 0; then
echo "not root - skipping" >$TEST.out
exit 77
View
1  tests/misc/t00
@@ -1,6 +1,7 @@
#!/bin/bash -e
TEST=$(basename $0 | cut -d- -f1)
+test -n "$FAKEROOTKEY" && exit 77 #skip if under fakeroot
test $(id -u) == 0 || exit 77 #skip if not root
./tsetfsuid >$TEST.out 2>&1
diff $TEST.exp $TEST.out >$TEST.diff
View
1  tests/misc/t01
@@ -1,6 +1,7 @@
#!/bin/bash -e
TEST=$(basename $0 | cut -d- -f1)
+test -n "$FAKEROOTKEY" && exit 77 #skip if under fakeroot
test $(id -u) == 0 || exit 77 #skip if not root
./tsetfsuidsupp >$TEST.out 2>&1
diff $TEST.exp $TEST.out >$TEST.diff
View
1  tests/misc/t02
@@ -1,6 +1,7 @@
#!/bin/bash -e
TEST=$(basename $0 | cut -d- -f1)
+test -n "$FAKEROOTKEY" && exit 77 #skip if under fakeroot
test $(id -u) == 0 || exit 77 #skip if not root
./tsuppgrp >$TEST.out 2>&1
diff $TEST.exp $TEST.out >$TEST.diff
View
1  tests/misc/t03
@@ -1,6 +1,7 @@
#!/bin/bash -e
TEST=$(basename $0 | cut -d- -f1)
+test -n "$FAKEROOTKEY" && exit 77 #skip if under fakeroot
test $(id -u) == 0 || exit 77 #skip if not root
./tsetuid >$TEST.out 2>&1
diff $TEST.exp $TEST.out >$TEST.diff
View
1  tests/misc/t11
@@ -1,6 +1,7 @@
#!/bin/bash -e
TEST=$(basename $0 | cut -d- -f1)
+test -n "$FAKEROOTKEY" && exit 77 #skip if under fakeroot
test $(id -u) == 0 || exit 77 #skip if not root
./tcap >$TEST.out 2>&1
diff $TEST.exp $TEST.out >$TEST.diff
View
4 tests/user/runtest
@@ -22,6 +22,10 @@ case $(basename $TEST) in
fi
;;
t11|t13|t14)
+ if [ -n "$FAKEROOTEKEY" ]; then
+ echo "cannot use fakeroot" >$TEST.out
+ exit 77
+ fi
if [ $(id -u) != 0 ]; then
echo "requires root" >$TEST.out
exit 77
Something went wrong with that request. Please try again.