Skip to content

Big Endian: add daily workflow UT job and fix UTs#3330

Merged
enjoy-binbin merged 6 commits into
valkey-io:unstablefrom
rainsupreme:big-endian-uts
May 1, 2026
Merged

Big Endian: add daily workflow UT job and fix UTs#3330
enjoy-binbin merged 6 commits into
valkey-io:unstablefrom
rainsupreme:big-endian-uts

Conversation

@rainsupreme

Copy link
Copy Markdown
Contributor

Big endian support on Valkey is "best effort" and not guaranteed, but we haven't been doing any regular testing at all afaik. This PR adds a job to the daily workflow to run UTs on an emulated big endian platform. Integration tests failed excessively because of how slow emulation is.

I fixed several problems with tests and improved UT coverage of key points where endian byte order matters - and fwiw I didn't find any bugs. I think the main coverage gap remaining after this is RDB serialization (maybe little endian <-> big endian round trips?)

And why did I do this? I wrote a couple lines of endian-specific code for #3166 and wanted to test it.

@codecov

codecov Bot commented Mar 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.70%. Comparing base (8091c6c) to head (ac228e6).
⚠️ Report is 15 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3330      +/-   ##
============================================
+ Coverage     76.42%   76.70%   +0.28%     
============================================
  Files           159      162       +3     
  Lines         80113    80608     +495     
============================================
+ Hits          61225    61831     +606     
+ Misses        18888    18777     -111     
Files with missing lines Coverage Δ
src/server.h 100.00% <ø> (ø)
src/unit/test_endianconv.cpp 100.00% <100.00%> (ø)
src/unit/test_intset.cpp 99.32% <100.00%> (+0.01%) ⬆️
src/unit/test_t_stream.cpp 100.00% <100.00%> (ø)
src/unit/test_timeout.cpp 100.00% <100.00%> (ø)
src/unit/test_ziplist.cpp 69.87% <100.00%> (+0.69%) ⬆️
src/unit/test_zipmap.cpp 100.00% <100.00%> (ø)

... and 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Scottcjn

Scottcjn commented Mar 9, 2026

Copy link
Copy Markdown

Great to see big-endian getting proper CI attention in Valkey!

We run an IBM POWER8 S824 (16-core, 128 threads, 512GB RAM) as a daily driver for LLM inference and blockchain attestation — native big-endian ppc64. Happy to run the full Valkey test suite on real hardware if that would be useful for validating beyond QEMU emulation.

We also have Power Mac G5s (PPC64 big-endian, Mac OS X / Linux) and PowerPC G4s (32-bit big-endian) if older architectures are of interest.

Real hardware catches timing-dependent and memory-ordering issues that emulation often misses. Let us know if we can help.

@madolson

madolson commented Mar 9, 2026

Copy link
Copy Markdown
Member

@Scottcjn That would be amazing if you could help run some tests! We at some point tried to acquire some IBM hardware for testing and hit some snags. In the past we've discussed that IBM is sort of tier 2 supported, we will accept fixes but since we can't reliably test on it it's hard to say it's officially supported.

@zuiderkwast zuiderkwast added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Mar 9, 2026
@rainsupreme

Copy link
Copy Markdown
Contributor Author

Here's a run of just the new job: https://github.com/rainsupreme/valkey/actions/runs/22814475783

@rainsupreme rainsupreme requested a review from madolson March 11, 2026 21:16
@rainsupreme rainsupreme requested a review from zuiderkwast March 24, 2026 19:31
@roshkhatri roshkhatri requested a review from hpatro March 31, 2026 21:06

@enjoy-binbin enjoy-binbin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please fix the conflict.

Integration tests (TCL-based) are unreliable under QEMU emulation due to
timing issues

Signed-off-by: Rain Valentine <rsg000@gmail.com>
Signed-off-by: Rain Valentine <rsg000@gmail.com>
Signed-off-by: Rain Valentine <rsg000@gmail.com>
Signed-off-by: Rain Valentine <rsg000@gmail.com>
Signed-off-by: Rain Valentine <rsg000@gmail.com>
Signed-off-by: Rain Valentine <rsg000@gmail.com>
@enjoy-binbin enjoy-binbin merged commit cea9354 into valkey-io:unstable May 1, 2026
62 of 67 checks passed
@sarthakaggarwal97

Copy link
Copy Markdown
Contributor

There is one issue where this doesn't skip gtest in the old branches during the weekly runs.

lucasyonge pushed a commit that referenced this pull request May 12, 2026
Big endian support on Valkey is "best effort" and not guaranteed, but we
haven't been doing any regular testing at all afaik. This PR adds a job
to the daily workflow to run UTs on an emulated big endian platform.
Integration tests failed excessively because of how slow emulation is.

I fixed several problems with tests and improved UT coverage of key
points where endian byte order matters - and fwiw I didn't find any
bugs. I think the main coverage gap remaining after this is RDB
serialization (maybe little endian <-> big endian round trips?)

There are couple lines of endian-specific code for #3166 and this change
can test it.

Signed-off-by: Rain Valentine <rsg000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants