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

riscv64 test failure: format(fs_bytes(NA)) (actual) not equal to "NA" (expected) #485

Open
mr-c opened this issue Jan 20, 2025 · 3 comments · May be fixed by #488
Open

riscv64 test failure: format(fs_bytes(NA)) (actual) not equal to "NA" (expected) #485

mr-c opened this issue Jan 20, 2025 · 3 comments · May be fixed by #488

Comments

@mr-c
Copy link

mr-c commented Jan 20, 2025

https://ci.debian.net/packages/r/r-cran-fs/testing/riscv64/56754062/

250s BEGIN TEST testthat.R
251s 
251s R version 4.4.2 (2024-10-31) -- "Pile of Leaves"
251s Copyright (C) 2024 The R Foundation for Statistical Computing
251s Platform: riscv64-unknown-linux-gnu
251s 
251s R is free software and comes with ABSOLUTELY NO WARRANTY.
251s You are welcome to redistribute it under certain conditions.
251s Type 'license()' or 'licence()' for distribution details.
251s 
251s R is a collaborative project with many contributors.
251s Type 'contributors()' for more information and
251s 'citation()' on how to cite R or R packages in publications.
251s 
251s Type 'demo()' for some demos, 'help()' for on-line help, or
251s 'help.start()' for an HTML browser interface to help.
251s Type 'q()' to quit R.
251s 
252s > library(testthat)
254s > library(fs)
254s > 
254s > test_check("fs")
579s [ FAIL 1 | WARN 2796 | SKIP 4 | PASS 3481 ]
579s 
579s ══ Skipped tests (4) ═══════════════════════════════════════════════════════════
580s • need elevated permissions to change uid (1): 'test-file.R:164:7'
580s • On CRAN (3): 'test-create.R:45:3', 'test-create.R:72:3', 'test-tree.R:5:7'
580s 
580s ══ Failed tests ════════════════════════════════════════════════════════════════
580s ── Failure ('test-fs_bytes.R:37:5'): format.fs_bytes: handles NA and NaN ───────
580s format(fs_bytes(NA)) (`actual`) not equal to "NA" (`expected`).
580s 
580s `actual`:   "NaN"
580s `expected`: "NA" 
580s 
580s [ FAIL 1 | WARN 2796 | SKIP 4 | PASS 3481 ]
@mr-c mr-c changed the title riscv64 test failure: format(fs_bytes(NA)) (\actual\) not equal to "NA" (\expected\) riscv64 test failure: ``format(fs_bytes(NA)) (actual) not equal to "NA" (expected)`` Jan 20, 2025
@mr-c mr-c changed the title riscv64 test failure: ``format(fs_bytes(NA)) (actual) not equal to "NA" (expected)`` riscv64 test failure: format(fs_bytes(NA)) (actual) not equal to "NA" (expected) Jan 20, 2025
@TimTaylor
Copy link

TimTaylor commented Feb 4, 2025

I'm not sure this is an fs issue. AFAICT this would be to do with the NaN propagation R relies on. Further discussion here https://stat.ethz.ch/pipermail/r-devel/2023-February/082381.html

@mr-c
Copy link
Author

mr-c commented Feb 4, 2025

Thank you @TimTaylor for the pointer. Can you suggest a patch that would automatically skip this test when run on a riscv system?

@TimTaylor
Copy link

@mr-c You could condition that line of the test file on R.version$arch. Assuming it returns something like "riscv" (you'd need to check) then maybe something like

if (R.version$arch != "riscv") expect_equal(format(fs_bytes(NA)), "NA")

mr-c added a commit to mr-c/fs that referenced this issue Feb 4, 2025
@mr-c mr-c linked a pull request Feb 4, 2025 that will close this issue
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 a pull request may close this issue.

2 participants