Subject: bin/23663: games/factor fails regression test
To: None <gnats-bugs@gnats.netbsd.org>
From: Charlie Root <jacereda@users.sourceforge.net>
List: netbsd-bugs
Date: 12/05/2003 18:56:41
>Number: 23663
>Category: bin
>Synopsis: games/factor fails regression test
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 05 17:58:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Jorge Acereda
>Release: NetBSD 1.6ZF
>Organization:
>Environment:
System: NetBSD acad0039.act 1.6ZF NetBSD 1.6ZF (CENUTRIO) #6: Tue Dec 2 19:12:14 CET 2003 root@acad0039.act:/sys/arch/i386/compile/CENUTRIO i386
Architecture: i386
Machine: i386
>Description:
When building with MKCRYPTO=no, factor can't handle bignums.
The regression test code seems to assume it has been compiled
with openssl.
>How-To-Repeat:
set MKCRYPTO=no in /etc/mk.conf
$ cd /usr/src/games/factor && make factor install
$ cd /usr/src/regress/games/factor && make regress
apply patch
$ cd /usr/src/games/factor && make factor install
$ cd /usr/src/regress/games/factor && make regress
>Fix:
My proposal:
Index: regress/games/factor/Makefile
===================================================================
RCS file: /cvsroot/src/regress/games/factor/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- regress/games/factor/Makefile 2003/08/12 03:03:20 1.1
+++ regress/games/factor/Makefile 2003/12/04 17:17:48
@@ -3,6 +3,6 @@
NOMAN= # defined
regress:
- @ksh ${.CURDIR}/factor.sh
+ @ksh ${.CURDIR}/factor.sh ${MKCRYPTO}
.include <bsd.prog.mk>
Index: regress/games/factor/factor.sh
===================================================================
RCS file: /cvsroot/src/regress/games/factor/factor.sh,v
retrieving revision 1.2
diff -u -r1.2 factor.sh
--- regress/games/factor/factor.sh 2003/09/30 03:29:08 1.2
+++ regress/games/factor/factor.sh 2003/12/04 17:17:48
@@ -1,4 +1,6 @@
#!/bin/ksh
+# Usage: factor.sh <test-openssl>
+# Where <test-openssl> is "yes" for factor compiled with HAVE_OPENSSL
function test_factor {
echo "Testing: \`/usr/games/factor $1\`"
@@ -14,6 +16,9 @@
# Test overflow cases
test_factor '8675309' '8675309: 8675309'
-test_factor '6172538568' '6172538568: 2 2 2 3 7 17 2161253'
+
+if [ $1 = "yes" ] ; then
+ test_factor '6172538568' '6172538568: 2 2 2 3 7 17 2161253'
+fi
exit 0
>Release-Note:
>Audit-Trail:
>Unformatted: