From 29bd93e3565519b8aea58f8054108908e760f2ff Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 15 Mar 2021 09:26:29 +0000 Subject: [PATCH] add a check for system-version, since I tend to reverse comparisons --- regress/usr.sbin/pkg_add/Makefile | 18 +++++++++++++++--- regress/usr.sbin/pkg_add/system-version.ref | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 regress/usr.sbin/pkg_add/system-version.ref diff --git a/regress/usr.sbin/pkg_add/Makefile b/regress/usr.sbin/pkg_add/Makefile index 762737d14fe..81ad3b5b715 100644 --- a/regress/usr.sbin/pkg_add/Makefile +++ b/regress/usr.sbin/pkg_add/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.75 2019/08/20 11:05:42 espie Exp $ +# $OpenBSD: Makefile,v 1.76 2021/03/15 09:26:29 espie Exp $ REGRESS_TARGETS=pkgnames pkgpaths signatures depends-check longnames pkgcfl \ collision-check1 collision-check2 collision-check3 \ @@ -12,7 +12,7 @@ REGRESS_TARGETS=pkgnames pkgpaths signatures depends-check longnames pkgcfl \ usertest-1 usertest-2 usertest-3 cups-bug nettle-bug \ tying-1 tying-2 tag-delete setsprint temp-error1 \ temp-error2 temp-error2-as-root temp-error3 temp-error4 \ - cksum-error + cksum-error system-version REGRESS_ROOT_TARGETS = temp-error2-as-root @@ -48,7 +48,7 @@ D$i ?= ${.OBJDIR}/dest$i DEST$i ?= ${D$i}/usr/local .endfor -# current maxes (used): D44, SRC27, plist24, rep5 +# current maxes (used): D45, SRC27, plist24, rep5 pkgnames: ${PERLSCRIPT}/check-name @@ -254,6 +254,12 @@ inter1: rep0/inta-0.tgz rep0/intb-0.tgz @ROOT=${D31} PKG_PATH=${.OBJDIR}/rep0 ${ADD_PKG} inta intb @ROOT=${D31} ${DELETE_PKG} inta intb +system-version: rep0/syst-0.tgz rep1/syst-0.tgz + -rm -rf ${D45} + @ROOT=${D45} PKG_PATH=${.OBJDIR}/rep0 ${ADD_PKG} syst + @ROOT=${D45} PKG_PATH=${.OBJDIR}/rep1 ${ADD_PKG} -u + @ROOT=${D45} ${INFO_PKG} -qS syst |diff -u - ${.CURDIR}/system-version.ref + plist1: @${MKPLIST} ${LONG1} ${LONG2} ${LONG3} ${LONG4} >$@ @@ -710,6 +716,12 @@ rep5/a-0.tgz: plist19 @echo "zoinx" > ${SRC27}/a @INJECT=inject-badsum ${CREATE_PKG} -B src27 -f plist19 $@ +rep0/syst-0.tgz: + @${CREATE_PKG} -V 1 ${EMPTY} $@ + +rep1/syst-0.tgz: + @${CREATE_PKG} -V 3 ${EMPTY} $@ + .PHONY: ${REGRESS_TARGETS} cksum-error: rep5/a-0.tgz diff --git a/regress/usr.sbin/pkg_add/system-version.ref b/regress/usr.sbin/pkg_add/system-version.ref new file mode 100644 index 00000000000..7708522770b --- /dev/null +++ b/regress/usr.sbin/pkg_add/system-version.ref @@ -0,0 +1 @@ +syst-0,3 -- 2.20.1