Repository navigation
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Problem
The test suite already covers most cross-platform behavior:
inst/tinytest/test-share.R:22-26checks the POSIX read-once vs Windows repeat-read difference.inst/tinytest/test-nthread.Rchecks thatnThread = 1andnThread = 2give identical results for the five OpenMP functions.inst/tinytest/test-enc.RcheckscheckEnc = TRUEvsFALSE.inst/tinytest/test-psort.Rchecksc.locale = TRUEagainstsort(method = "radix").
Two gaps remain:
- The docs will say a leading
/inmap_nameis optional. Add a test for that on both POSIX and Windows. - CI only runs normal execution. The package has manual memory management, hash tables, OpenMP, and long-vector paths. Add scheduled
gctortureandvalgrindjobs.
What to change
Test
Add to inst/tinytest/test-share.R:
# map_name without a leading slash must work on every platform
noslash <- paste0("kit55-noslash-", Sys.getpid())
h <- tryCatch(shareData(mtcars, noslash), error = function(err) NULL)
if (!is.null(h)) {
expect_identical(getData(noslash), mtcars,
info = "share-0055.015 no leading slash")
expect_true(clearData(h), info = "share-0055.016 no leading slash cleanup")
}CI
Add a scheduled job (weekly or manual) that runs:
R CMD check --use-gct --no-manual --no-build-vignettesR CMD check --use-valgrind --no-manual --no-build-vignettes
Keep these off pull requests; they are slow.
Sketch of the job
c-safety:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::tinytest
- name: gctorture
run: R CMD check --use-gct --no-manual --no-build-vignettes .
- name: valgrind
run: |
sudo apt-get update
sudo apt-get install -y valgrind
rm -rf kit.Rcheck
R CMD check --use-valgrind --no-manual --no-build-vignettes .R floor
DESCRIPTION says R (>= 3.5.0), but CI's oldest job is oldrel-4. Either:
- add a
rocker/r-ver:3.5.3job that runs the tests, or - bump the floor to a version CI actually tests and remove the old-R shims in
src/kit.h.
Acceptance
- The no-slash
shareDatatest passes on Linux, macOS, and Windows. - Scheduled gctorture and valgrind jobs exist and pass.
- The declared R floor is tested, or the floor is raised.
Notes
--use-gct failed locally on macOS with cannot open file 'startup.Rs': Permission denied. That is a local sandbox issue, not a package failure. Run it on Linux CI.
Related: #63 (closed) covered earlier test gaps; #57 (closed) covered the CI matrix.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Activity
docs(news): mark the R 4.2 floor as a breaking change (fastverse#95)