File: test-bug-829651

package info (click to toggle)
apt 3.1.13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,764 kB
  • sloc: cpp: 71,085; sh: 31,750; xml: 5,553; perl: 217; python: 197; ansic: 191; makefile: 41
file content (27 lines) | stat: -rwxr-xr-x 704 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'

if [ "$(id -u)" = '0' ]; then
    msgskip 'Tests for unreadable files do not work as root'
    exit 0
fi

insertinstalledpackage 'foo' 'amd64' '1'
insertpackage 'unstable' 'foo' 'amd64' '2'

setupaptarchive


testsuccess aptget indextargets

aptget clean
chmod -r  rootdir/var/lib/dpkg/status

testfailureequal "E: Could not open file ${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status - open (13: Permission denied)
E: Problem opening ${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened." aptget indextargets