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

BUG: 62-sim-arch_transactions test fails on big endian architectures #451

Closed
debfx opened this issue Jan 25, 2025 · 4 comments
Closed

BUG: 62-sim-arch_transactions test fails on big endian architectures #451

debfx opened this issue Jan 25, 2025 · 4 comments
Assignees
Labels
Milestone

Comments

@debfx
Copy link
Contributor

debfx commented Jan 25, 2025

With libseccomp 2.6.0 the 62-sim-arch_transactions bpf-sim-fuzz test fails on big endian architectures (s390x, hppa, powerpc and ppc64).

./regression -v output on s390x:

 test mode:  c
 test type:  bpf-sim-fuzz
Test 62-sim-arch_transactions%%005-00001 data:     62-sim-arch_transactions  ec35b            0079f2bd         5e               10c9             9c983d           43de78           f8
FAULT
Test 62-sim-arch_transactions%%005-00001 result:   ERROR bpf_sim rc=14
Test 62-sim-arch_transactions%%005-00002 data:     62-sim-arch_transactions  53f              73b19            3b               3eb42c           3bb2ff           43f              cd9
FAULT
Test 62-sim-arch_transactions%%005-00002 result:   ERROR bpf_sim rc=14
Test 62-sim-arch_transactions%%005-00003 data:     62-sim-arch_transactions  63b0             b4b1             cfa65            7a1b4f6d         7                5eded            6
FAULT
Test 62-sim-arch_transactions%%005-00003 result:   ERROR bpf_sim rc=14
Test 62-sim-arch_transactions%%005-00004 data:     62-sim-arch_transactions  b4a09391         a                d                b299b            36               9d29cfc4         fa
FAULT
Test 62-sim-arch_transactions%%005-00004 result:   ERROR bpf_sim rc=14
Test 62-sim-arch_transactions%%005-00005 data:     62-sim-arch_transactions  398571ab         33c222e          eb4c34           e060             eaf              8155             726
FAULT
Test 62-sim-arch_transactions%%005-00005 result:   ERROR bpf_sim rc=14

Complete build logs for reference:

@debfx debfx changed the title 62-sim-arch_transactions test fails on some architectures 62-sim-arch_transactions test fails on big endian architectures Jan 25, 2025
@pcmoore pcmoore changed the title 62-sim-arch_transactions test fails on big endian architectures BUG: 62-sim-arch_transactions test fails on big endian architectures Jan 25, 2025
@pcmoore pcmoore added the bug label Jan 25, 2025
@pcmoore pcmoore added this to the v2.6.1 milestone Jan 25, 2025
@pcmoore
Copy link
Member

pcmoore commented Jan 25, 2025

D'oh! Thanks for the report @debfx, it looks like we mistakenly added a bpf-sim-fuzz test section to a test that arch/ABI specific code in it, which is a known no-no. The good news is that the library should be okay, the bug is in the tests.

% for i in $(grep "+" *.tests | cut -d':' -f 1 | sort -u); do grep -H "bpf-sim-fuzz" $i; done
62-sim-arch_transactions.tests:test type: bpf-sim-fuzz

The basic problem is that while our framework/simulator is smart enough to do the right thing with respect to arch/ABIs, the fuzzer isn't quite as intelligent. To be honest, the fuzzer is likely of limited value in the majority of cases, but I'm not quite sure we want to remove it.

Give me a few minutes and I should have a PR which should fix this problem with the test.

@pcmoore pcmoore self-assigned this Jan 25, 2025
@pcmoore pcmoore linked a pull request Jan 25, 2025 that will close this issue
@pcmoore
Copy link
Member

pcmoore commented Jan 25, 2025

@debfx would you mind trying PR #452 to see if this resolves this problem?

@debfx
Copy link
Contributor Author

debfx commented Jan 25, 2025

Yes, that fixes it. Thanks!

@drakenclimber
Copy link
Member

Pull request #452 was merged into main and release-2.6 and should resolve this issue. @debfx please let us know if you see any other issues. Thanks for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants