summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2019-08-15 09:03:45 +0000
committerJulian Andres Klode <jak@debian.org>2019-08-15 09:03:45 +0000
commit7c724251fd8c24e89dc8cb813eee20aa0a4ad793 (patch)
tree2133fef8b26c5ec30b3c8525eab3ae902007607e /test
parented4a8421e4d51c19a4aa1bd5e91370ba8bc8efca (diff)
parent56820d4c244e896a62f57ff96801dc1283b8b0e2 (diff)
Merge branch 'master' into 'master'
Fix segfault in pkgAcquire::Enqueue() with Acquire::Queue-Mode=access See merge request apt-team/apt!73
Diffstat (limited to 'test')
-rw-r--r--test/integration/framework21
-rwxr-xr-xtest/integration/test-apt-update-simple4
2 files changed, 25 insertions, 0 deletions
diff --git a/test/integration/framework b/test/integration/framework
index e7b82c273..44dedb10b 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -229,6 +229,27 @@ gdb() {
fi
runapt command gdb --quiet -ex "directory '$SOURCEDIRECTORY'" -ex run "$CMD" --args "$CMD" "$@"
}
+
+valgrind() {
+ local CMD
+ case "$1" in
+ aptget) CMD="apt-get";;
+ aptcache) CMD="apt-cache";;
+ aptcdrom) CMD="apt-cdrom";;
+ aptconfig) CMD="apt-config";;
+ aptmark) CMD="apt-mark";;
+ apthelper) CMD="apt-helper";;
+ aptftparchive) CMD="apt-ftparchive";;
+ dpkg) shift; runapt "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/gdb-dpkg" "$@"; return;;
+ *) CMD="$1";;
+ esac
+ shift
+ if [ "${CMD##*/}" = "$CMD" ]; then
+ CMD="${BUILDDIRECTORY}/${CMD}"
+ fi
+ runapt command valgrind "$CMD" "$@"
+}
+
lastmodification() {
date -u -d "@$(stat -c '%Y' "${TMPWORKINGDIRECTORY}/$1")" -R
}
diff --git a/test/integration/test-apt-update-simple b/test/integration/test-apt-update-simple
index ccf719790..6855f1d1f 100755
--- a/test/integration/test-apt-update-simple
+++ b/test/integration/test-apt-update-simple
@@ -31,3 +31,7 @@ main/binary-amd64/Packages
main/binary-all/Packages
main/i18n/Translation-en
main/i18n/Translation-de' aptget indextargets --format '$(METAKEY)'
+
+# Check that -o Acquire::Queue-Mode=access does not crash
+find rootdir/var/lib/apt/lists/ -type f -delete
+testsuccess valgrind aptget update -o Acquire::Queue-Mode=access