diff options
author | Michael Vogt <mvo@debian.org> | 2015-08-18 11:54:05 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2015-08-18 11:54:05 +0200 |
commit | 21248c0f00ee71412dbadc6ebf84011cf974346d (patch) | |
tree | 7dc1f5904399482d2128765b5b86d57a4ac5b3e1 /test/integration/test-bug-254770-segfault-if-cache-not-buildable | |
parent | e5f34ad3b043abf033c1626eb8449b75955d6760 (diff) | |
parent | 4fc6b7570c3e97b65c118b58cdf6729fa94c9b03 (diff) |
Merge branch 'debian/experimental' into feature/srv-records
Conflicts:
cmdline/apt-helper.cc
cmdline/makefile
Diffstat (limited to 'test/integration/test-bug-254770-segfault-if-cache-not-buildable')
-rwxr-xr-x | test/integration/test-bug-254770-segfault-if-cache-not-buildable | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/integration/test-bug-254770-segfault-if-cache-not-buildable b/test/integration/test-bug-254770-segfault-if-cache-not-buildable index 59102ddc9..6ae8944b2 100755 --- a/test/integration/test-bug-254770-segfault-if-cache-not-buildable +++ b/test/integration/test-bug-254770-segfault-if-cache-not-buildable @@ -3,17 +3,25 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework + +msgtest 'Test run as' 'non-root' +if [ "$(id -u)" = '0' ]; then + msgskip 'root has by definition no problems accessing files' + exit 0 +else + msgpass +fi + setupenvironment configarchitecture "i386" setupaptarchive -CURRENTTRAP="chmod a+x rootdir/var/lib/dpkg; $CURRENTTRAP" -trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM +addtrap 'prefix' 'chmod a+x rootdir/var/lib/dpkg;' chmod a-x rootdir/var/lib/dpkg testsegfault() { msgtest "No segfault in" "$*" - local TEST="$($* 2>&1 | grep -v 'E:')" + local TEST="$("$@" 2>&1 | grep -v 'E:')" if [ -z "$TEST" ]; then msgpass else |