Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923301 - dev-java/jna-5.14.0-r1 fails tests on ppc64 (LE&BE): testUnionCallstack(com.sun.jna.DirectArgumentsMarshalTest), testUnionCallstack(com.sun.jna.ArgumentsMarshalTest)
Summary: dev-java/jna-5.14.0-r1 fails tests on ppc64 (LE&BE): testUnionCallstack(com....
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 922472
  Show dependency tree
 
Reported: 2024-01-30 04:00 UTC by matoro
Modified: 2024-02-10 10:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_923301.txt,24.25 KB, text/plain)
2024-01-30 04:01 UTC, matoro
Details
separate-tests.patch (separate-tests.patch,1.41 KB, patch)
2024-02-07 12:52 UTC, Volkmar W. Pogatzki
Details | Diff
ppc64-skip-tests.patch (ppc64-skip-tests.patch,1.95 KB, text/plain)
2024-02-07 21:41 UTC, Volkmar W. Pogatzki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-01-30 04:00:24 UTC
This fails on ppc64, both little and big endian.  Does not repro on amd64, arm64.  Test on ieee-long-double profile pending.  Sample log from LE:

Time: 48.752
There were 2 failures:
1) testUnionCallstack(com.sun.jna.DirectArgumentsMarshalTest)
junit.framework.ComparisonFailure: expected:<...2: 3, dummyDouble2: [4, union1.intValue: 5, union2.doubleValue: 6]> but was:<...2: 3, dummyDouble2: [0, union1.intValue: 2117122384, union2.doubleValue: 0]>
        at junit.framework.Assert.assertEquals(Assert.java:100)
        at junit.framework.Assert.assertEquals(Assert.java:107)
        at junit.framework.TestCase.assertEquals(TestCase.java:260)
        at com.sun.jna.ArgumentsMarshalTest.testUnionCallstack(ArgumentsMarshalTest.java:708)
2) testUnionCallstack(com.sun.jna.ArgumentsMarshalTest)
junit.framework.ComparisonFailure: expected:<...2: 3, dummyDouble2: [4, union1.intValue: 5, union2.doubleValue: 6]> but was:<...2: 3, dummyDouble2: [0, union1.intValue: 2107686280, union2.doubleValue: 0]>
        at junit.framework.Assert.assertEquals(Assert.java:100)
        at junit.framework.Assert.assertEquals(Assert.java:107)
        at junit.framework.TestCase.assertEquals(TestCase.java:260)
        at com.sun.jna.ArgumentsMarshalTest.testUnionCallstack(ArgumentsMarshalTest.java:708)

FAILURES!!!
Tests run: 521,  Failures: 2

Reproducible: Always
Comment 1 matoro archtester 2024-01-30 04:01:33 UTC
Created attachment 883658 [details]
build.log and emerge --info
Comment 2 matoro archtester 2024-01-30 04:02:01 UTC
Not a regression from previous version (5.13.0-r1)
Comment 3 Volkmar W. Pogatzki 2024-02-07 12:52:42 UTC
Created attachment 884465 [details, diff]
separate-tests.patch

(In reply to matoro from comment #2)
> Not a regression from previous version (5.13.0-r1)

Thanks for all this additional information. It makes it easier for me to provide a solution.  However, I don't have ppc64 to test with.  

May I please ask your help testing the 'attached separate.tests.patch'?

You might have seen in the ebuild that it runs java-pkg-simple_src_test() several times.  This is because some tests would fail on Gentoo if not run separately.

In case the failures persist, I would have to provide a different patch selectively @Ignore'ing the failing tests from those two test classes.
Comment 4 matoro archtester 2024-02-07 20:09:06 UTC
(In reply to Volkmar W. Pogatzki from comment #3)
> Created attachment 884465 [details, diff] [details, diff]
> separate-tests.patch
> 
> (In reply to matoro from comment #2)
> > Not a regression from previous version (5.13.0-r1)
> 
> Thanks for all this additional information. It makes it easier for me to
> provide a solution.  However, I don't have ppc64 to test with.  
> 
> May I please ask your help testing the 'attached separate.tests.patch'?
> 
> You might have seen in the ebuild that it runs java-pkg-simple_src_test()
> several times.  This is because some tests would fail on Gentoo if not run
> separately.
> 
> In case the failures persist, I would have to provide a different patch
> selectively @Ignore'ing the failing tests from those two test classes.

Just tested this, unfortunately still fails.

Also, I tested on ieee-long-double profile, after complete world rebuild, and it still fails.  So that is not the cause.
Comment 5 Volkmar W. Pogatzki 2024-02-07 21:41:44 UTC
Created attachment 884501 [details]
ppc64-skip-tests.patch

(In reply to matoro from comment #4)
> [...]
> Just tested this, unfortunately still fails.
> 
> Also, I tested on ieee-long-double profile, after complete world rebuild,
> and it still fails.  So that is not the cause.

Thanks for testing. So please let's try with that tests skipped. I am attaching the 'ppc64-skip-tests.patch'.
Comment 6 matoro archtester 2024-02-07 22:00:55 UTC
(In reply to Volkmar W. Pogatzki from comment #5)
> Created attachment 884501 [details]
> ppc64-skip-tests.patch
> 
> (In reply to matoro from comment #4)
> > [...]
> > Just tested this, unfortunately still fails.
> > 
> > Also, I tested on ieee-long-double profile, after complete world rebuild,
> > and it still fails.  So that is not the cause.
> 
> Thanks for testing. So please let's try with that tests skipped. I am
> attaching the 'ppc64-skip-tests.patch'.

I've had such patches rejected before due to rules against conditional patching, https://devmanual.gentoo.org/ebuild-writing/misc-files/patches/index.html#conditional-patching was cited at the time.

Maybe it could instead be added to JAVA_TEST_EXCLUDES?
Comment 7 Volkmar W. Pogatzki 2024-02-08 10:27:20 UTC
(In reply to matoro from comment #6)
> [...]
> Maybe it could instead be added to JAVA_TEST_EXCLUDES?

Both affected test classes com.sun.jna.DirectArgumentsMarshalTest and com.sun.jna.ArgumentsMarshalTest have 41 tests each but only two of them fail.  JAVA_TEST_EXCLUDES would kill them all. 
I am trying to skip as few tests as possible.  In jnr-posix-3.1.16 we did this with sed.  However using patches instead if sed is regarded more robust.

I would have liked to try doing it with "junit.Assume" but this seems not available for junit3 tests.

You need not merge the patch, only test if the remaining tests would pass. I would then create a PR.
Comment 8 matoro archtester 2024-02-10 05:43:59 UTC
(In reply to Volkmar W. Pogatzki from comment #7)
> (In reply to matoro from comment #6)
> > [...]
> > Maybe it could instead be added to JAVA_TEST_EXCLUDES?
> 
> Both affected test classes com.sun.jna.DirectArgumentsMarshalTest and
> com.sun.jna.ArgumentsMarshalTest have 41 tests each but only two of them
> fail.  JAVA_TEST_EXCLUDES would kill them all. 
> I am trying to skip as few tests as possible.  In jnr-posix-3.1.16 we did
> this with sed.  However using patches instead if sed is regarded more robust.
> 
> I would have liked to try doing it with "junit.Assume" but this seems not
> available for junit3 tests.
> 
> You need not merge the patch, only test if the remaining tests would pass. I
> would then create a PR.

Confirmed that tests pass on both endians with this patch.