summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2019-07-10 11:55:41 +0000
committerMarc Espie <espie@cvs.openbsd.org>2019-07-10 11:55:41 +0000
commit84a640614e5188075ea97debabc0e3917a674383 (patch)
treefa965039f6991215989f4044f7a3a9d40f6a00cf /regress
parent2a73ce5b68a6d917f765597e9c22003d4e9fefb0 (diff)
yet another creation instance
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.sbin/pkg_add/Makefile6
-rw-r--r--regress/usr.sbin/pkg_add/inject-temp13
-rw-r--r--regress/usr.sbin/pkg_add/inject-temp23
-rw-r--r--regress/usr.sbin/pkg_add/inject-temp419
-rw-r--r--regress/usr.sbin/pkg_add/temp4.ref2
5 files changed, 26 insertions, 7 deletions
diff --git a/regress/usr.sbin/pkg_add/Makefile b/regress/usr.sbin/pkg_add/Makefile
index e006786ffdc..400a614c1f0 100644
--- a/regress/usr.sbin/pkg_add/Makefile
+++ b/regress/usr.sbin/pkg_add/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.71 2019/07/10 11:53:16 espie Exp $
+# $OpenBSD: Makefile,v 1.72 2019/07/10 11:55:40 espie Exp $
REGRESS_TARGETS=pkgnames pkgpaths signatures depends-check longnames pkgcfl \
collision-check1 collision-check2 collision-check3 \
@@ -11,7 +11,7 @@ REGRESS_TARGETS=pkgnames pkgpaths signatures depends-check longnames pkgcfl \
qttest gstest exotest inter1 manual1 oldlib1 \
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-error2 temp-error2-as-root temp-error3 temp-error4
REGRESS_ROOT_TARGETS = temp-error2-as-root
@@ -797,7 +797,7 @@ temp-error4: rep0/qt-0.tgz rep1/qt-1.tgz
@ROOT=${D43} SILENT=1 ${ADD_PKG} rep0/qt-0.tgz
@rm -f ${D43}/usr/local/phonon/a
@echo zoinx >${D43}/usr/local/phonon/a
- @{ INJECT=inject-temp4 PKG_PATH=${.OBJDIR}/rep1 SILENT=1 ROOT=${D43} ${ADD_PKG} -Dchecksum -u qt || echo okay; } 2>&1|sed -e 's/ line .*//' >temp4.out
+ @{ INJECT=inject-temp4 PKG_PATH=${.OBJDIR}/rep1 SILENT=1 ROOT=${D43} ${ADD_PKG} -Dchecksum -u qt || echo okay; } 2>&1|${SED_PIPE} >temp4.out
.PHONY: ${REGRESS_TARGETS}
diff --git a/regress/usr.sbin/pkg_add/inject-temp1 b/regress/usr.sbin/pkg_add/inject-temp1
index 5382a45ca8b..f1542696de4 100644
--- a/regress/usr.sbin/pkg_add/inject-temp1
+++ b/regress/usr.sbin/pkg_add/inject-temp1
@@ -1,7 +1,6 @@
#! /usr/bin/perl
-# $OpenBSD: inject-temp1,v 1.1 2019/07/09 13:49:47 espie Exp $
-#use OpenBSD::Temp;
+# $OpenBSD: inject-temp1,v 1.2 2019/07/10 11:55:40 espie Exp $
use strict;
use warnings;
use OpenBSD::Temp;
diff --git a/regress/usr.sbin/pkg_add/inject-temp2 b/regress/usr.sbin/pkg_add/inject-temp2
index 5760306af79..0fad2b1e871 100644
--- a/regress/usr.sbin/pkg_add/inject-temp2
+++ b/regress/usr.sbin/pkg_add/inject-temp2
@@ -1,7 +1,6 @@
#! /usr/bin/perl
-# $OpenBSD: inject-temp2,v 1.1 2019/07/09 14:40:43 espie Exp $
-#use OpenBSD::Temp;
+# $OpenBSD: inject-temp2,v 1.2 2019/07/10 11:55:40 espie Exp $
use strict;
use warnings;
use OpenBSD::Temp;
diff --git a/regress/usr.sbin/pkg_add/inject-temp4 b/regress/usr.sbin/pkg_add/inject-temp4
new file mode 100644
index 00000000000..73b37bd854a
--- /dev/null
+++ b/regress/usr.sbin/pkg_add/inject-temp4
@@ -0,0 +1,19 @@
+#! /usr/bin/perl
+
+# $OpenBSD: inject-temp4,v 1.1 2019/07/10 11:55:40 espie Exp $
+use strict;
+use warnings;
+use OpenBSD::Temp;
+
+package OpenBSD::Temp;
+use Wrapper;
+wrap('permanent_file',
+ sub {
+ my $original = shift;
+ if (!defined $_[0]) {
+ shift;
+ unshift @_, '/nonexistent';
+ }
+ goto &$original;
+ });
+1;
diff --git a/regress/usr.sbin/pkg_add/temp4.ref b/regress/usr.sbin/pkg_add/temp4.ref
new file mode 100644
index 00000000000..1e241f0f0d8
--- /dev/null
+++ b/regress/usr.sbin/pkg_add/temp4.ref
@@ -0,0 +1,2 @@
+User USER couldn't create temp file as /nonexistent//usr/src/regress/usr.sbin/pkg_add/obj/dest43//usr/local/phonon/a.XXXXXXXXXX: No such file or directory
+okay