Open ghost opened 2 years ago
To the best of my knowledge, nobody has ever tested this project on a powerpc64-linux system.
@amock do you have /dev/crypto/nx-gzip
in this big endian machine?
@tuliom I do have /dev/crypto/nx-gzip
and I'm running kernel 5.18.
Do you know where that macro is supposed to come from? I would at least expect the code to compile successfully on a big endian machine.
I found that test_crc32
fails when more than 30 bytes are processed, which lead me to the line https://github.com/libnxz/power-gzip/blob/e1d0b1c7b0df47acdbcc8e3c5fb0ca4d9f28f018/lib/crc32_ppc.c#L70 so __crc32_vpmsum
is broken. For some tests I tried (strings of 'a' of length up to 100) changing https://github.com/libnxz/power-gzip/blob/b589fb633e2b13eb1f2429ca2853ca87c2747c5f/lib/crc32_power.c#L506 to
return v0[0];
makes the tests pass. That doesn't fix all of the existing test cases and I don't understand the code so I don't know why it works sometimes.
The test summary:
PASS: test_adler32
PASS: test_buf_error
FAIL: test_crc32
../test-driver: line 107: 114513 Aborted "$@" > $log_file 2>&1
FAIL: test_inflatesyncpoint
FAIL: test_multithread_stress
PASS: test_pid_reuse
SKIP: test_abi
PASS: test_stress.auto
FAIL: test_deflate.auto
FAIL: test_inflate.auto
FAIL: test_dict.auto
PASS: test_gz.auto
PASS: test_stress.sw
FAIL: test_deflate.sw
FAIL: test_inflate.sw
FAIL: test_dict.sw
PASS: test_gz.sw
PASS: test_stress.nx
FAIL: test_deflate.nx
FAIL: test_inflate.nx
FAIL: test_dict.nx
PASS: test_gz.nx
PASS: test_stress.mix
FAIL: test_deflate.mix
FAIL: test_inflate.mix
FAIL: test_dict.mix
PASS: test_gz.mix
PASS: test_stress.mix2
FAIL: test_deflate.mix2
FAIL: test_inflate.mix2
FAIL: test_dict.mix2
PASS: test_gz.mix2
PASS: test_zeroinput.nx
============================================================================
Testsuite summary for libnxz 0.63
============================================================================
# TOTAL: 33
# PASS: 14
# SKIP: 1
# XFAIL: 0
# FAIL: 18
# XPASS: 0
# ERROR: 0
@amock Our version of __crc32_vpmsum
indeed only supports LE. But it was adapted from this one, which supports BE as well, so it would be a matter of re-adding the parts containing BE logic.
@mscastanho Thanks for the link. I'll get started with that and see how fixing the crc gets me.
Running
fails with
This is on a big endian system. I'm able to build this fine under a little endian system. If I add
#define OF(x) ()
to various places to get the build to succeed then some of the tests fail.