Skip to content

tests: use identical(NA_real_+0, NA_real_) to skip tests that depend on NA payload propagation#7702

Merged
aitap merged 5 commits intomasterfrom
skip-riscv64
Apr 9, 2026
Merged

tests: use identical(NA_real_+0, NA_real_) to skip tests that depend on NA payload propagation#7702
aitap merged 5 commits intomasterfrom
skip-riscv64

Conversation

@aitap
Copy link
Copy Markdown
Member

@aitap aitap commented Apr 9, 2026

RISC-V chips do not propagate NaN payload through arithmetic operations, so skip two tests on this architecture. If this surfaces again, we can modify test() to ignore NA / NaN differences on such architectures. Ironically, the tests in froll.Rraw that are skipped on RISC-V due to long double size ("under Valgrind") do pass on Valgrind now, but they probably won't pass on RISC-V (for the same reason) if enabled. Should I reuse the exact_NaN test instead?

@charles-plessy, this seems to work for me in a Trixie QEMU chroot. Does anything else need fixing?

Fixes: #7695

RISC-V chips do not propagate NaN payload through arithmetic operations.
@aitap aitap requested a review from MichaelChirico as a code owner April 9, 2026 08:09
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.04%. Comparing base (76ec862) to head (d4ba469).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7702   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files          87       87           
  Lines       17037    17037           
=======================================
  Hits        16874    16874           
  Misses        163      163           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@charles-plessy
Copy link
Copy Markdown

Thanks a lot! In my understanding we do not need to fix anything else.

Copy link
Copy Markdown
Member

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

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

Is this truly unique to riscv64? I saw something in another thread about this platform supporting 128-bit long doubles, I think this issue is separate, right?

I also saw this might be the same as some behavior observable with {base}, could this be a behavioral skip instead? if (identical(NA+0, NaN)) something like that (sorry I didn't read very carefully)?

Basically my preference ordering here:

  1. Skip on a behavior observable in base R
  2. Skip on capabilities()
  3. Skip on a specific Sys.info() entry

I trust your judgment on if either of 1/2 are feasible without inordinate effort. Thanks!

@aitap aitap changed the title froll.Rraw: skip tests that depend on NA payload tests: use identical(NA_real_+0, NA_real_) to skip tests that depend on NA payload propagation Apr 9, 2026
@aitap
Copy link
Copy Markdown
Member Author

aitap commented Apr 9, 2026

Of course, you're right! Checking whether an arithmetic operation on NA_real_ returns NA or NaN is the right answer here. Tested again with -d valgrind, inside the QEMU chroot, and on an R build configured not to use long double.

@aitap aitap merged commit 8364344 into master Apr 9, 2026
13 checks passed
@aitap aitap deleted the skip-riscv64 branch April 9, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing tests on riscv64 architecture.

3 participants