From 56820d4c244e896a62f57ff96801dc1283b8b0e2 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 15 Aug 2019 09:50:22 +0200 Subject: test: Use valgrind to ensure Acquire::Queue-Mode=access does not crash Unfortunately for us, apt update with Acquire::Queue-Mode=access does not always crash on a real system, so run the whole thing in valgrind. --- test/integration/framework | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test/integration/framework') 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 } -- cgit v1.2.3-70-g09d2