-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hetbsf.tst fails for BZIP2 on s390x #535
Comments
Fixed by commit 7ab077e. Closing. |
You're closing before it's tested on the Spark64? |
Yes. Based on my analysis I am 99.999%+ confident the Sparc64 bug is identical and thus the fix just committed will also fix it too. |
(SIGH!) Or at least it would if I had implemented it correctly! (the way I actually tested it!) Sorry about that. New commit d53fc0c replaces previous commit. |
OK, with commit d53fc0c the tests now pass on Hercules emulated s390x zLinux Ubuntu 18, real hardware s390x zLinux Centos 7, and Sun Sparc64 NetBSD 9. (just mentioning for completeness, the original "fix", commit 7ab077e resulted in compiler warnings related to the fix, failed ZLIB test on s390x, and a crash on the Sparc64.) |
Yep. I saw the compiler warnings too, which is how I knew I f**ked up. Glad to hear all is well now. I'm still having trouble testing it on my system though. I do a git pull and it says up to date, but after building it (make followed by make install), for some reason it's still saying it's at version g2e984f9a, which I don't understand! I must have done something wrong. I'm in the middle of doing everything all over again, but as you know it takes freaking forever. |
Using the same system under Windows 7 (although God knows what you've done to it), what I did in zLinux:
And yes, it took freakin' forever. |
I don't know what I was doing wrong or why it wasn't working, but I decided to just do a FWIW I was doing the exact same thing (except for the But the problem's moot. I did manage to get the system build using your hercules-helper script and all is fine now. I'm not sure what you mean by "(although God knows what you've done to it)". Except for a single |
Fish, If you just run what I did, perhaps it'll skip the As far as
I was being cute. Having Bill |
The fact that it runs forever, and everything actually works, is a pretty good thing, don't you think? |
Probably. My *nix skills are weak.
Ah. My bad. Missed that.
I'm aware of that. Given how I use my system however it's not a real concern to me. It's more convenient for me to be able to enter the name of a command or script without having to always prefix it with |
Absolutely! It works quite well! I'm quite proud of your hard work, and you should be too! |
The
hetbsf.tst
performs two identical tests: the first using a ZLIB compressed.het
tape as input, the second using a BZIP2 compressed.het
tape as input. On s390x systems/guests, the second BZIP2 test always fails:Further research has revealed the failure is due to an incorrect API call to the
BZ2_bzBuffToBuffDecompress
libbz2 (bz2) function in source memberhetlib.c
'shet_read
function:hyperion/hetlib.c
Lines 964 to 984 in 5857860
The problem stems from the fact that the bzip2
BZ2_bzBuffToBuffDecompress
API is actually defined in headerbzlib.h
as:but Hercules's
het_read
function inhetlib.c
is passingunsigned long
values (instead ofunsigned int
values) for thedestLen
(slen
) andsourceLen
(tlen
) parameters:hyperion/hetlib.c
Lines 765 to 772 in 5857860
Recall that s390x systems (just like most other non-Windows systems) are LP64, not LLP4. (where 'long' is 64 bits, not 32 bits like an 'int' is)
When the
slen
andtlen
variables in thehet_read
function are properly declared asunisgned int
, the test passes.The same bug exists in the
het_write
function as well, where theBZ2_bzBuffToBuffCompress
API call is being made.This GitHub Issue is being created to simply document the bug and the resulting upcoming fix, which I will be making shortly.
The text was updated successfully, but these errors were encountered: