aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2021-12-16 19:46:24 +0100
committerFabian Groffen <grobian@gentoo.org>2021-12-16 19:46:24 +0100
commitba9f14cf0aebb606e2818a9d21863763709a1fcb (patch)
treef2b36073e61add68ab748857f1cdfc3a51d45fb5 /tests
parentbuildsys: regenerate (diff)
downloadportage-utils-ba9f14cf0aebb606e2818a9d21863763709a1fcb.tar.gz
portage-utils-ba9f14cf0aebb606e2818a9d21863763709a1fcb.tar.bz2
portage-utils-ba9f14cf0aebb606e2818a9d21863763709a1fcb.zip
main: fix memory overwrite in strincr_var
This caused memory corruption, and a subsequent crash in qmanifest. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qmanifest/dotest8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/qmanifest/dotest b/tests/qmanifest/dotest
index 4031c8b..e7f6d05 100755
--- a/tests/qmanifest/dotest
+++ b/tests/qmanifest/dotest
@@ -12,14 +12,14 @@ mktmpdir
test() {
local num=$1 exp=$2 ret=0
shift 2
- eval "$@" > manifest 2>&1 || ret=$?
+ eval "$*" > manifest 2>&1 || ret=$?
sed -i -e '/^checked [0-9]/s/ in [0-9.]\+s$//' manifest
if ! diff -u ${as}/manifest${num}.good manifest; then
tfail "output does not match"
[[ -e gpgme.log ]] && cat gpgme.log
fi
if [[ ${exp} -ne ${ret} ]] ; then
- tfail "exit code (${ret}) does not match expected (${exp}) for test ${num}"
+ tfail "exit code (${ret}) does not match expected (${exp}) for test ${num} (args: $*)"
fi
tend $? "$*"
}
@@ -74,6 +74,8 @@ set +e
if gpg_import "${as}"/key.gpg qmanifest ; then
set -e
+tend 0 "gpg import key"
+
# make it a fully valid tree
rm testtree/my-cat/mypackage/unrecorded-file
# drop ROOT, we'll work here in T
@@ -82,7 +84,7 @@ SIGNAS=0x3D695C8C0F87966B62DC5AFCDCFABA8E07F52261
KEYPASS=qmanifest
export GPGME_DEBUG=9:${PWD}/gpgme.log
rm -f gpgme.log
-test 06 0 "echo ${KEYPASS} | qmanifest -g -s ${SIGNAS} -p testtree"
+test 06 0 "qmanifest -g -s ${SIGNAS} -p testtree <<< ${KEYPASS}"
# validate the just generated tree
rm -f gpgme.log