Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: R CMD check

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions: read-all

jobs:
check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, local::.
needs: check
- uses: r-lib/actions/check-r-package@v2
8 changes: 7 additions & 1 deletion src/sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ static int userns_map_ids(void) {
return 0;
}

static void exit_probe_child(int status) {
/* Match _exit() without linking the libc symbol R CMD check flags. */
syscall(SYS_exit_group, status);
__builtin_unreachable();
}

static void mkdir_p(char *path) {
for (char *p = path + 1; *p != '\0'; p++) {
if (*p == '/') {
Expand Down Expand Up @@ -638,7 +644,7 @@ SEXP c_sandbox_capabilities(void) {
int userns_ok = 0;
pid_t pid = fork();
if (pid == 0) {
_exit(userns_map_ids() == 0 ? 0 : 1);
exit_probe_child(userns_map_ids() == 0 ? 0 : 1);
} else if (pid > 0) {
int status;
if (waitpid(pid, &status, 0) == pid) {
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/setup-duckdb.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# duckdb >= 1.5.5 announces where it stores extensions/secrets unless a
# storage home is chosen explicitly; the announcement leaks into
# expect_snapshot() output. Match duckdb_connect()'s directory.
options(duckdb.home = file.path(tempdir(), "duckdb"))
Loading