vapier / pcalc

command line util for doing hex/dec/oct/bin math quickly

Home Page:https://vapier.github.io/pcalc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test 12 failes on macppc

charlesdaniels opened this issue · comments

testsuite.log

As noted, test 12 fails under OpenBSD 6.4/macppc.

Further potentially useful information:

cad@montag:/u/p/p/p/p/ptest > sysctl hw
hw.machine=macppc
hw.model=7447A (Revision 0x105)
hw.ncpu=1
hw.byteorder=4321
hw.pagesize=4096
hw.disknames=wd0:c375357beab85361,cd0:
hw.diskcount=2
hw.sensors.maxtmp0.temp0=49.25 degC (Internal)
hw.sensors.maxtmp0.temp1=45.00 degC (External)
hw.cpuspeed=1499
hw.vendor=Apple Computer, Inc.
hw.product=PowerMac10,2
hw.physmem=1073741824
hw.usermem=1073729536
hw.ncpufound=1
hw.allowpowerdown=1
hw.ncpuonline=1
cad@montag:/u/p/p/p/p/ptest > uname -a
OpenBSD montag.int.cxd.guru 6.4 GENERIC#231 macppc

i'm guessing it's a 32-bit system. looks like the test expects 64-bit types to be sign extended, and that platform truncated it to 32-bit.

the internal math handling is a bit wonky with converting between doubles & long longs, so that might play a factor too.

the code base has been around longer than stdint.h has been reliable. converting all the long and long long usage over at some point would probably be nice.

32-bit systems are supported, i just don't actively test on them anymore, so problems like this might slip in.

Same here on Gentoo Linux (gcc-10.3.0, glibc-2.33, binutils 2.35.2) on ppc32 BE.

## ---------------------- ##
## Detailed failed tests. ##
## ---------------------- ##

#                             -*- compilation -*-
11. pcalc.012.at:1: testing pcalc.012 ...
/pcalc.012.at:1: $top_builddir/pcalc @$srcdir/pcalc.012 | \
        sed \
                -e 's:[  ][      ]*: :g' \
                -e 's: *$::'

--- -   2021-08-04 18:51:38.938941141 +0200
+++ /root/build/pcalc/ptest/testsuite.dir/at-groups/11/stdout   2021-08-04 18:51:38.933016256 +0200
@@ -1,9 +1,9 @@
 one
  170 0xaa 0y10101010
- -171 0xffffffffffffff55 0y1111111111111111111111111111111111111111111111111111111101010101
+ -171 0xffffff55 0y11111111111111111111111101010101
  0 0x0 0y0
 two
  1 0x1 0y1
- -2 0xfffffffffffffffe 0y1111111111111111111111111111111111111111111111111111111111111110
+ -2 0xfffffffe 0y11111111111111111111111111111110
  61695 0xf0ff 0y1111000011111111
 
11. pcalc.012.at:1: 11. pcalc.012 (pcalc.012.at:1): FAILED (pcalc.012.at:1)

testsuite.log

probably fixed with v5. or not. lemme know!