summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2020-07-25 12:44:51 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2020-07-25 12:44:51 +0000
commit20c506c8cca3477fa8d4a8555b86fbf66f0a2524 (patch)
treede6630e49f9129d676e735cc6aef3b69f10a4510 /regress
parent9c5018cf092618712581b3a49e92cee88b98495e (diff)
With "%lx" new awk(1) prints 64 bit value also on 32 bit platforms.
Replace it with Perl pack() to get hex representation of -1 on current platform. Make test pass again on i386.
Diffstat (limited to 'regress')
-rw-r--r--regress/sys/kern/extent/Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/regress/sys/kern/extent/Makefile b/regress/sys/kern/extent/Makefile
index a0d1b981988..a866e3e0795 100644
--- a/regress/sys/kern/extent/Makefile
+++ b/regress/sys/kern/extent/Makefile
@@ -1,23 +1,25 @@
-# $OpenBSD: Makefile,v 1.4 2017/07/25 12:49:29 bluhm Exp $
+# $OpenBSD: Makefile,v 1.5 2020/07/25 12:44:50 bluhm Exp $
# $NetBSD: Makefile,v 1.5 2002/09/18 04:16:02 lukem Exp $
PROG= extest
SRCS= extest.c subr_extent.c
CPPFLAGS+= -D_EXTENT_TESTING -DDIAGNOSTIC
-CLEANFILES+= extest.c extest.out
+CLEANFILES+= extest.c *.tmp *.out *.norm
.PATH: ${.CURDIR}/../../../../sys/kern
-REGRESS_TARGETS= do-extent
+LONG_MINUSONE != perl -e 'print unpack("H*",pack("l!",-1)),"\n"'
-MINUSONE!= awk 'BEGIN{printf("%lx\n",-1)}' < /dev/null
+REGRESS_TARGETS = run-extent
-do-extent: ${PROG}
+run-extent: ${PROG}
./${PROG} >extest.out
- sed -n 's/ffffffffffffffff/${MINUSONE}/;5,$$p' ${.CURDIR}/extest.exp |\
- diff - extest.out
+ sed -n 's/ffffffffffffffff/${LONG_MINUSONE}/;5,$$p' \
+ ${.CURDIR}/extest.exp >extest.norm
+ diff -up extest.norm extest.out
extest.c: extest.awk tests
- awk -f ${.CURDIR}/extest.awk <${.CURDIR}/tests >extest.c
+ awk -f ${.CURDIR}/extest.awk ${.CURDIR}/tests >extest.c.tmp
+ mv extest.c.tmp extest.c
.include <bsd.regress.mk>