]>
Commit | Line | Data |
---|---|---|
c55b8a54 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
68ba0b7f DK |
6 | |
7 | msgtest 'Test run as' 'non-root' | |
8 | if [ "$(id -u)" = '0' ]; then | |
9 | msgskip 'root has by definition no problems accessing files' | |
10 | exit 0 | |
11 | else | |
12 | msgpass | |
13 | fi | |
14 | ||
c55b8a54 DK |
15 | setupenvironment |
16 | configarchitecture "i386" | |
17 | setupaptarchive | |
18 | ||
68ba0b7f | 19 | addtrap 'prefix' 'chmod a+x rootdir/var/lib/dpkg;' |
c55b8a54 DK |
20 | chmod a-x rootdir/var/lib/dpkg |
21 | ||
22 | testsegfault() { | |
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 | ||
34 | echo 'quiet 2;' > rootdir/etc/apt/apt.conf.d/00be-quiet | |
35 | ||
36 | testsegfault aptcache gencaches | |
37 | testsegfault aptcache showpkg | |
38 | testsegfault aptcache showsrc | |
39 | testsegfault aptcache stats | |
40 | testsegfault aptcache dump | |
41 | testsegfault aptcache dumpavail | |
42 | testsegfault aptcache unmet | |
43 | testsegfault aptcache search | |
44 | testsegfault aptcache show apt | |
45 | testsegfault aptcache depends apt | |
46 | testsegfault aptcache rdepends apt | |
47 | testsegfault aptcache pkgnames apt | |
48 | testsegfault aptcache dotty apt | |
49 | testsegfault aptcache xvcg apt | |
50 | testsegfault aptcache policy apt | |
51 | ||
52 | testsegfault aptget update | |
53 | testsegfault aptget upgrade | |
54 | testsegfault aptget dselect-upgrade | |
55 | testsegfault aptget dist-upgrade | |
56 | testsegfault aptget install apt | |
57 | testsegfault aptget remove apt | |
58 | testsegfault aptget purge apt | |
59 | testsegfault aptget source apt | |
60 | testsegfault aptget build-dep apt | |
61 | testsegfault aptget check | |
62 | testsegfault aptget clean | |
63 | testsegfault aptget autoclean | |
64 | testsegfault aptget autoremove |