]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-254770-segfault-if-cache-not-buildable
improve partial/ cleanup in abort and failure cases
[apt.git] / test / integration / test-bug-254770-segfault-if-cache-not-buildable
CommitLineData
c55b8a54
DK
1#!/bin/sh
2set -e
3
adee3bae 4TESTDIR=$(readlink -f $(dirname $0))
c55b8a54 5. $TESTDIR/framework
68ba0b7f
DK
6
7msgtest 'Test run as' 'non-root'
8if [ "$(id -u)" = '0' ]; then
9 msgskip 'root has by definition no problems accessing files'
10 exit 0
11else
12 msgpass
13fi
14
c55b8a54
DK
15setupenvironment
16configarchitecture "i386"
17setupaptarchive
18
68ba0b7f 19addtrap 'prefix' 'chmod a+x rootdir/var/lib/dpkg;'
c55b8a54
DK
20chmod a-x rootdir/var/lib/dpkg
21
22testsegfault() {
c55b8a54 23 msgtest "No segfault in" "$*"
68ba0b7f 24 local TEST="$("$@" 2>&1 | grep -v 'E:')"
c55b8a54
DK
25 if [ -z "$TEST" ]; then
26 msgpass
27 else
28 echo
be297c7a 29 echo "$TEST"
c55b8a54
DK
30 msgfail
31 fi
32}
33
34echo 'quiet 2;' > rootdir/etc/apt/apt.conf.d/00be-quiet
35
36testsegfault aptcache gencaches
37testsegfault aptcache showpkg
38testsegfault aptcache showsrc
39testsegfault aptcache stats
40testsegfault aptcache dump
41testsegfault aptcache dumpavail
42testsegfault aptcache unmet
43testsegfault aptcache search
44testsegfault aptcache show apt
45testsegfault aptcache depends apt
46testsegfault aptcache rdepends apt
47testsegfault aptcache pkgnames apt
48testsegfault aptcache dotty apt
49testsegfault aptcache xvcg apt
50testsegfault aptcache policy apt
51
52testsegfault aptget update
53testsegfault aptget upgrade
54testsegfault aptget dselect-upgrade
55testsegfault aptget dist-upgrade
56testsegfault aptget install apt
57testsegfault aptget remove apt
58testsegfault aptget purge apt
59testsegfault aptget source apt
60testsegfault aptget build-dep apt
61testsegfault aptget check
62testsegfault aptget clean
63testsegfault aptget autoclean
64testsegfault aptget autoremove