Skip to content
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

Some RGBFIX tests fail on BSD #1580

Open
nunotexbsd opened this issue Dec 25, 2024 · 9 comments
Open

Some RGBFIX tests fail on BSD #1580

nunotexbsd opened this issue Dec 25, 2024 · 9 comments
Labels
bug Unexpected behavior / crashes; to be fixed ASAP!

Comments

@nunotexbsd
Copy link

Hello,

I'm maintaining FreeBSD port and considering to switch to cmake build and also use ctest to include testing in port.
Testing fails with around 8 .gb mismathes.
Bellow is a partial log and a full log is available to download.

Any help and hints are welcome.

FreeBSD 15
cmake version 3.31.2
Clang 19.1.5
GNU bash 5.2.37
xxd 2024-12-07
git 2.47.1

<snip>
1: < 7f:7fe0: 4545 4545 4545 4545 4545 4545 4545 45    EEEEEEEEEEEEEEE
1: ---
1: 7f:7fe0
1: > 7f:7fe0: 4545 4545 4545 4545 4545 4545 4545 4545  EEEEEEEEEEEEEEEE
1: > 7f:7ff0: 4545 4545 4545 4545 4545 4545 4545 4545  EEEEEEEEEEEEEEEE
1: verify-pad.gb mismatch!
1: verify-trash...
1: /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/verify-trash.gb out.gb differ: char 335, line 3
1: 00:0140
1: < 00:0140: 9d9d 8cb9 b62e c6da e7d3 96ff 809f e92c  ...............,
1: ---
1: 00:0140
1: > 00:0140: 9d9d 8cb9 b62e c6da e7d3 96ff 809f ea09  ................
1: verify-trash.gb mismatch!
1: verify...
1: /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/verify.gb out.gb differ: char 335, line 3
1: 00:0140
1: < 00:0140: 9d9d 8cb9 b62e c6da e7d3 96ff 8060 1150  .............`.P
1: ---
1: 00:0140
1: > 00:0140: 9d9d 8cb9 b62e c6da e7d3 96ff 8060 1073  .............`.s
1: verify.gb mismatch!
1: version...
1: version piped...
1: Checking padding...
1: 9...
1: 182...
1: 249...
1: 40...
1: 42...
1: 209...
1: 212...
1: 236...
1: 164...
1: 101...
1: Done checking padding!
1: 8 of the tests failed!

Full log:
LastTest.log

@nunotexbsd nunotexbsd changed the title tests fail: some .gb mismathes tests fails: some .gb mismatches Dec 25, 2024
@nunotexbsd nunotexbsd changed the title tests fails: some .gb mismatches 0.9.0: tests fails: some .gb mismatches Dec 25, 2024
@Rangi42 Rangi42 added the bug Unexpected behavior / crashes; to be fixed ASAP! label Dec 25, 2024
@Rangi42
Copy link
Contributor

Rangi42 commented Dec 25, 2024

I see that all the asm and link tests pass, but eight fix tests fail (which prevents the gfx tests from running at all):

  1. global-larger:
    /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/global-larger.gb out.gb differ: char 336, line 1
    00:0140 
    < 00:0140: 0c29 b9c1 f8ae 9958 6790 a35d 05ac 1ca8  .).....Xg..]....
    ---
    00:0140 
    > 00:0140: 0c29 b9c1 f8ae 9958 6790 a35d 05ac 1c8e  .).....Xg..]....
    
  2. padding-bigperfect:
    cmp: EOF on /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/padding-bigperfect.gb
    03:7ff0 
    < 03:7ff0: 38b9 6b28 5254 70d4 546a 5d70 42f0 7b    8.k(RTp.Tj]pB.{
    ---
    03:7ff0 
    > 03:7ff0: 38b9 6b28 5254 70d4 546a 5d70 42f0 7bff  8.k(RTp.Tj]pB.{.
    
  3. padding-imperfect:
    cmp: EOF on /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/padding-imperfect.gb
    03:7ff0 
    < 03:7ff0: ffff ffff ffff ffff ffff ffff ffff ff    ...............
    ---
    03:7ff0 
    > 03:7ff0: ffff ffff ffff ffff ffff ffff ffff ffff  ................
    
  4. padding-perfect:
    cmp: EOF on /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/padding-perfect.gb
    01:7ff0 
    < 01:7ff0: faf0 5b29 7e18 59d0 6bfe 8d2f 3c73 19    ..[)~.Y.k../<s.
    ---
    01:7ff0 
    > 01:7ff0: faf0 5b29 7e18 59d0 6bfe 8d2f 3c73 19ff  ..[)~.Y.k../<s..
    
  5. title-trunc:
    /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/title-trunc.gb out.gb differ: char 308, line 3
    00:0130 
    < 00:0130: d03a de30 3132 3334 3536 3738 3941 4243  .:.0123456789ABC
    < 00:0140: 4445 46e9 9c0a ef86 96a3 742a 5e36 6ecd  DEF.......t*^6n.
    ---
    00:0130 
    > 00:0130: d03a deef 3031 3233 3435 3637 3839 4142  .:..0123456789AB
    > 00:0140: 4344 4546 9c0a ef86 96a3 742a 5e36 6ecd  CDEF......t*^6n.
    
  6. verify-pad:
    /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/verify-pad.gb out.gb differ: char 335, line 3
    00:0140 
    < 00:0140: 9d9d 8cb9 b62e c6da 06d3 96ff 8041 f522  .............A."
    ---
    00:0140 
    > 00:0140: 9d9d 8cb9 b62e c6da 06d3 96ff 8041 f8da  .............A..
    7f:7fe0 
    < 7f:7fe0: 4545 4545 4545 4545 4545 4545 4545 45    EEEEEEEEEEEEEEE
    ---
    7f:7fe0 
    > 7f:7fe0: 4545 4545 4545 4545 4545 4545 4545 4545  EEEEEEEEEEEEEEEE
    > 7f:7ff0: 4545 4545 4545 4545 4545 4545 4545 4545  EEEEEEEEEEEEEEEE
    
  7. verify-trash:
    /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/verify-trash.gb out.gb differ: char 335, line 3
    00:0140 
    < 00:0140: 9d9d 8cb9 b62e c6da e7d3 96ff 809f e92c  ...............,
    ---
    00:0140 
    > 00:0140: 9d9d 8cb9 b62e c6da e7d3 96ff 809f ea09  ................
    
  8. verify:
    /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/verify.gb out.gb differ: char 335, line 3
    00:0140 
    < 00:0140: 9d9d 8cb9 b62e c6da e7d3 96ff 8060 1150  .............`.P
    ---
    00:0140 
    > 00:0140: 9d9d 8cb9 b62e c6da e7d3 96ff 8060 1073  .............`.s
    

I don't have a FreeBSD environment or expertise available to debug this directly. Maybe you can try narrowing down the problem(s)? E.g. git bisect and just run test/fix/test.sh.

@nunotexbsd
Copy link
Author

I'm new to this tests and running test/fix/test.sh gives same errors with additional console warns:

cmp: EOF on /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/padding-bigperfect.gb
cmp: EOF on /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/padding-imperfect.gb
cmp: EOF on /wrkdirs/usr/ports/devel/rgbds/work/rgbds/test/fix/padding-perfect.gb

@nunotexbsd
Copy link
Author

Should we investigate if there are some incompatibiliies between BSD and Gnu in programs used by the bash scripts?

@Rangi42
Copy link
Contributor

Rangi42 commented Dec 25, 2024

Yes, I had quoted those from your log.

If the tests were running and passing with RGBDS 0.8.0 but not with 0.9.0, please try narrowing down the commits where they start to fail, e.g. with git bisect.

It's possible the cause is related to a change in the test shell scripts themselves, yes.

@nunotexbsd
Copy link
Author

If the tests were running and passing with RGBDS 0.8.0 but not with 0.9.0, please try narrowing down the
commits where they start to fail, e.g. with git bisect

I never run tests on 0.8.0 before. I will try on that version and check.

@nunotexbsd
Copy link
Author

Unable to test with ctest as 0.8.0 isn't ready for it.

Just a question so I can proceed:

Is cmake build mature to use in production enviroments?

If positive, I can upgrade to 0.9.0 with cmake build and put tests as unsafe.
Providing test units with ports gives us extra testing but it doesn't affect end users.

@Rangi42
Copy link
Contributor

Rangi42 commented Dec 26, 2024

Oh I see, the tests are running now only because 0.9.0 added ctest support?

In that case, yes, cmake build support has been good for years, so if you want to disable/unsafe the tests and release 0.9.0 that should be fine.

@Rangi42
Copy link
Contributor

Rangi42 commented Dec 26, 2024

Maybe one of your end users could investigate why the tests are failing, as well?

@nunotexbsd
Copy link
Author

Sure, there is why its ok to have tests in ports even if tests fails, it always can lead to further investigation.

The only consumer that I can test is sameboy and build/run-test is OK so I've committed update:
https://cgit.freebsd.org/ports/commit/?id=7b5bb5efdad1ca269649861a3b8e38a778c67e54

If upstream want to do some testing on FreeBSD, it can be done on a VM and just go to ports and test:

https://www.freebsd.org/where/
cd /usr/ports/devel/rgbds && make test

@Rangi42 Rangi42 changed the title 0.9.0: tests fails: some .gb mismatches Some RGBFIX tests fail on BSD Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior / crashes; to be fixed ASAP!
Projects
None yet
Development

No branches or pull requests

2 participants