diff options
author | alois31 <alois1@gmx-topmail.de> | 2024-07-26 07:08:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-07-26 07:08:35 +0000 |
commit | d945e89e19bb508133bc563fb960b1cf1e785410 (patch) | |
tree | 6a29d77bb1f08e437651163ef58c0063ee0ac2a1 /tests/nixos/io_uring/package.nix | |
parent | 60a48311e84c228e664a44c8d049ea3080879a40 (diff) | |
parent | e7188e211a5a2ac0ba34635a846569560bb5f000 (diff) |
Merge changes I45d3895f,I541be3ea,Ibe51416d into main
* changes:
libstore/build: block io_uring
libstore/build: use an allowlist approach to syscall filtering
libstore/build: always treat seccomp setup failures as fatal
Diffstat (limited to 'tests/nixos/io_uring/package.nix')
-rw-r--r-- | tests/nixos/io_uring/package.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/nixos/io_uring/package.nix b/tests/nixos/io_uring/package.nix new file mode 100644 index 000000000..8f980183a --- /dev/null +++ b/tests/nixos/io_uring/package.nix @@ -0,0 +1,19 @@ +{ runCommandCC }: +runCommandCC "io_uring-is-blocked" { } '' + cat > test.c <<EOF + #include <errno.h> + #include <sys/syscall.h> + #include <unistd.h> + + int main() { + int res = syscall(SYS_io_uring_setup, 0, NULL); + return res == -1 && errno == ENOSYS ? 0 : 1; + } + EOF + "$CC" -o test test.c + if ! ./test; then + echo "Oh no! io_uring is available!" + exit 1 + fi + touch "$out" +'' |