]> git.feebdaed.xyz Git - 0xmirror/crun.git/log
0xmirror/crun.git
5 days agoMerge pull request #1940 from giuseppe/tag-1.26 main
Giuseppe Scrivano [Mon, 22 Dec 2025 15:42:08 +0000 (16:42 +0100)]
Merge pull request #1940 from giuseppe/tag-1.26

NEWS: tag 1.26

5 days agoNEWS: tag 1.26
Giuseppe Scrivano [Mon, 22 Dec 2025 15:20:22 +0000 (16:20 +0100)]
NEWS: tag 1.26

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agoMerge pull request #1935 from giuseppe/improve-coverage
Giuseppe Scrivano [Mon, 22 Dec 2025 14:29:39 +0000 (15:29 +0100)]
Merge pull request #1935 from giuseppe/improve-coverage

tests: improve coverage

5 days agoMerge pull request #1938 from martinetd/segv
Giuseppe Scrivano [Mon, 22 Dec 2025 10:40:23 +0000 (11:40 +0100)]
Merge pull request #1938 from martinetd/segv

utils: handle NULL container passed to libcrun_open_proc_file()

5 days agoutils: handle NULL container passed to libcrun_open_proc_file()
Dominique Martinet [Mon, 22 Dec 2025 05:14:37 +0000 (14:14 +0900)]
utils: handle NULL container passed to libcrun_open_proc_file()

It's possible for this function to be called with a NULL container when
called from run_process_child() -> mark_or_close_fds_ge_than() after
close_range() failed (old kernel or restricted syscall)

Handle this by opening a temporary /proc fd, which can be closed
immediately in libcrun_open_proc_file()

There are no other callers of libcrun_get_cached_proc_fd() at this
point, but such users would not need to worry about this fd potentially
leaking as long as container is a valid pointer, and even if they do
cause a leak in the future it's always better than a segfault.

Fixes: #1937
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
5 days agocgroup: rename enter_cgroup_subsystem
Giuseppe Scrivano [Sun, 21 Dec 2025 07:25:14 +0000 (07:25 +0000)]
cgroup: rename enter_cgroup_subsystem

This function is only used for cgroup v1.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add tests for crun custom annotations
Giuseppe Scrivano [Sat, 20 Dec 2025 16:30:51 +0000 (16:30 +0000)]
tests: add tests for crun custom annotations

Add comprehensive tests for crun-specific OCI annotations that were
previously untested:

- run.oci.hooks.stdout/stderr: Test hook output redirection to files
- run.oci.seccomp_fail_unknown_syscall: Test failure on unknown syscalls
- run.oci.systemd.subgroup: Test custom systemd subgroup naming
- run.oci.delegate-cgroup: Test cgroup delegation (cgroup v2 only)
- run.oci.systemd.force_cgroup_v1: Test forcing cgroup v1 on v2 systems
- run.oci.mount_context_type: Test SELinux mount context types
- run.oci.pidfd_receiver: Test pidfd transmission to UNIX socket

All tests include proper skip detection for:
- Nested namespace environments
- Missing root privileges
- Unavailable features (SELinux, systemd, cgroup v2, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add cgroup unit tests for coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 20:13:14 +0000 (20:13 +0000)]
tests: add cgroup unit tests for coverage

Add unit tests for cgroup-related functions:
- test_read_proc_cgroup_v2: Test parsing cgroup v2 content
- test_read_proc_cgroup_v1: Test parsing cgroup v1 content with multiple controllers
- test_read_proc_cgroup_empty: Test with empty content
- test_read_proc_cgroup_named: Test named cgroup controller (name=systemd)
- test_convert_shares_to_weight: Test CPU shares to weight conversion
- test_convert_shares_boundary: Test boundary conditions for conversion
- test_read_proc_cgroup_null_params: Test with NULL output parameters
- test_read_proc_cgroup_selective: Test with selective parameter retrieval

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add more utils unit tests for coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 18:11:57 +0000 (18:11 +0000)]
tests: add more utils unit tests for coverage

Add additional unit tests for utils.c to improve coverage:
- test_has_prefix: Test has_prefix string function
- test_has_suffix: Test has_suffix string function
- test_str_join_array: Test str_join_array with various inputs
- test_get_current_timestamp: Test timestamp generation
- test_crun_ensure_directory: Test directory creation/existence

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add seccomp_notify unit tests for coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 17:41:43 +0000 (17:41 +0000)]
tests: add seccomp_notify unit tests for coverage

Add unit tests for seccomp_notify.c to improve code coverage:
- test_cleanup_null: Test cleanup handler with NULL
- test_free_null_context: Test freeing NULL context
- test_load_invalid_path: Test loading plugin with invalid relative path
- test_load_nonexistent_plugin: Test loading non-existent plugin
- test_notify_no_seccomp: Test notify function without seccomp support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add chroot_realpath unit tests for coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 15:57:47 +0000 (15:57 +0000)]
tests: add chroot_realpath unit tests for coverage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add mount_flags.perf unit tests for coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 11:00:27 +0000 (11:00 +0000)]
tests: add mount_flags.perf unit tests for coverage

Add unit tests for libcrun_str2mount_flags() and
get_mount_flags_from_wordlist() functions using the gperf-generated
perfect hash table from mount_flags.perf. Tests cover all 59 mount
flags including:
- Basic flags (bind, rbind, ro, rw)
- Permission flags (nosuid, nodev, noexec)
- Propagation flags (shared, slave, private, unbindable)
- Recursive variants (rro, rrw, rnosuid, etc.)
- Time flags (noatime, relatime, strictatime)
- Special OCI options (tmpcopyup, idmap, copy-symlink)
- Invalid inputs and error handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add signals.perf unit tests for coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 10:59:59 +0000 (10:59 +0000)]
tests: add signals.perf unit tests for coverage

Add unit tests for str2sig() function that uses the gperf-generated
perfect hash table from signals.perf. Tests cover:
- All 62 standard and real-time signals
- Signal names with and without SIG prefix
- Numeric signal strings
- Real-time signals (RTMIN+N, RTMAX-N)
- Invalid inputs and error handling
- Case sensitivity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add logger info to checkpoint_restore
Giuseppe Scrivano [Sun, 21 Dec 2025 08:03:08 +0000 (08:03 +0000)]
tests: add logger info to checkpoint_restore

Add logging to _get_cmdline and _run_cr_test_with_config to help
debug test failures by providing more context about what went wrong.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add linux.c integration tests for coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 20:19:16 +0000 (20:19 +0000)]
tests: add linux.c integration tests for coverage

Add Python integration tests targeting linux.c code paths:
- test_masked_paths: Test masked paths handling
- test_readonly_paths: Test readonly paths handling
- test_process_rlimits: Test rlimit configuration
- test_process_rlimits_multiple: Test multiple rlimits
- test_dev_null_reopen: Test /dev/null setup
- test_mount_proc: Test /proc mount
- test_mount_tmpfs: Test tmpfs mount
- test_pivot_root: Test pivot_root operation
- test_user_namespace_mapping: Test user namespace mappings
- test_safe_chdir: Test safe chdir to workdir
- test_personality_linux32: Test LINUX32 personality
- test_mount_bind: Test bind mounts
- test_keyring_creation: Test keyring creation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add linux.c unit tests for coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 10:59:35 +0000 (10:59 +0000)]
tests: add linux.c unit tests for coverage

Add unit tests for src/libcrun/linux.c functions including:
- libcrun_find_namespace()
- path_is_slash_dev()
- libcrun_reopen_dev_null()

Many functions in linux.c are static and cannot be tested directly
from unit tests. Integration tests in test_namespaces.py and
test_error_handling.py provide additional coverage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add error handling coverage tests for linux.c
Giuseppe Scrivano [Fri, 19 Dec 2025 14:03:21 +0000 (14:03 +0000)]
tests: add error handling coverage tests for linux.c

Add integration tests to improve coverage for error handling paths in
src/libcrun/linux.c:

- test_invalid_rlimit: Test invalid rlimit type error handling
- test_rlimit_soft_exceeds_hard: Test rlimit validation when soft > hard
- test_oom_score_adj_out_of_range: Test OOM score adjustment bounds
- test_masked_paths_coverage: Test masked paths configuration
- test_readonly_paths_coverage: Test readonly paths configuration
- test_device_permissions_error: Test device creation error handling
- test_user_namespace_without_mappings: Test user namespace without mappings
- test_keyring_creation: Test session keyring creation paths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add namespace coverage tests for linux.c
Giuseppe Scrivano [Fri, 19 Dec 2025 14:00:47 +0000 (14:00 +0000)]
tests: add namespace coverage tests for linux.c

Add integration tests to improve coverage for namespace handling in
src/libcrun/linux.c:

- test_multiple_uid_mappings: Test multiple UID/GID mapping ranges
- test_namespace_path_sharing: Test error handling for invalid namespace paths
- test_hostname_without_uts_namespace: Test hostname requires UTS namespace
- test_domainname_with_uts_namespace: Test domainname with UTS namespace

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add comprehensive tests for custom-handler.c
Giuseppe Scrivano [Fri, 19 Dec 2025 14:33:13 +0000 (14:33 +0000)]
tests: add comprehensive tests for custom-handler.c

Add both unit tests and Python integration tests to improve coverage
for src/libcrun/custom-handler.c which is currently at 28.2% coverage.

Unit tests (tests_libcrun_custom_handler.c):
- Test handler manager creation and cleanup
- Test handler lookup by name
- Test feature tag printing
- Test handler configuration with various scenarios
- Test error paths and edge cases

Python tests (test_custom_handler.py):
- Test sandbox annotation handling
- Test non-existent handler requests
- Test --handler command line option
- Test annotation and context handler conflicts
- Test feature tag output in --version
- Test empty and invalid handler annotations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add more unit tests for error.c coverage
Giuseppe Scrivano [Fri, 19 Dec 2025 10:29:47 +0000 (10:29 +0000)]
tests: add more unit tests for error.c coverage

Add unit tests for error handling functions:
- test_crun_error_wrap: Test error wrapping functionality
- test_crun_error_get_errno: Test errno extraction from errors
- test_libcrun_verbosity: Test verbosity get/set functions
- test_libcrun_set_log_format: Test log format validation
- test_crun_error_release_null: Test NULL handling in error release

These unit tests directly exercise error.c functions for better
coverage without needing to spawn containers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: improve error logging and add more coverage tests
Giuseppe Scrivano [Fri, 19 Dec 2025 00:22:29 +0000 (00:22 +0000)]
tests: improve error logging and add more coverage tests

Improve error logging:
- Add test environment context (uid, rootless, cgroup_v2, cgroup_manager)
  when tests fail, helping diagnose environment-specific issues

Add new command tests:
- test_state_created_container: Test state on created but not started container
- test_state_stopped_container: Test state on stopped container
- test_features_command: Test features command returns valid JSON
- test_ps_json_format: Test ps with JSON format
- test_delete_force: Test force delete on running container
- test_start_command: Test start on created container
- test_version_command: Test version output
- test_help_command: Test help output

Add new exec tests:
- test_exec_cwd: Test exec with working directory
- test_exec_process_json: Test exec with process.json file
- test_exec_detach: Test exec with detach option
- test_exec_multiple: Test multiple exec calls
- test_exec_exit_code: Test exit code propagation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: ignore profiling output in test_simple_delete
Giuseppe Scrivano [Fri, 19 Dec 2025 00:22:18 +0000 (00:22 +0000)]
tests: ignore profiling output in test_simple_delete

When running with coverage builds, profiling messages may appear in
the output. Treat these the same as empty output to avoid spurious
test failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: fix memory-high test to use unified resources
Giuseppe Scrivano [Fri, 19 Dec 2025 00:22:09 +0000 (00:22 +0000)]
tests: fix memory-high test to use unified resources

The memory.high OCI property is only handled by the systemd cgroup
manager. Use the unified map instead, which writes directly to the
cgroup file and works with both cgroupfs and systemd managers.

Also add better debugging output for failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add more seccomp tests for coverage
Giuseppe Scrivano [Thu, 18 Dec 2025 23:04:55 +0000 (23:04 +0000)]
tests: add more seccomp tests for coverage

Add additional seccomp tests to improve code coverage:
- test_seccomp_kill_action: Test SCMP_ACT_KILL action
- test_seccomp_syscall_args: Test syscall argument filtering
- test_seccomp_multiple_syscalls: Test multiple syscalls in one rule
- test_seccomp_errno_default: Test SCMP_ACT_ERRNO as default action
- test_seccomp_comparison_ops: Test different comparison operators
- test_seccomp_flags: Test seccomp filter flags

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add error handling tests for coverage
Giuseppe Scrivano [Thu, 18 Dec 2025 23:02:00 +0000 (23:02 +0000)]
tests: add error handling tests for coverage

Add comprehensive tests for error handling paths including:
- Invalid JSON config handling
- Missing rootfs directory
- Non-existent binary in process args
- Invalid UID mappings
- Duplicate container IDs
- Operations on non-existent containers (state, delete, kill)
- Exec on stopped containers
- Invalid signal names
- Empty args array
- Readonly rootfs
- Non-existent working directory

These tests improve coverage of error paths in container lifecycle
management and validation code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: skip mount-bind-to-rootfs in rootless mode
Giuseppe Scrivano [Thu, 18 Dec 2025 22:40:25 +0000 (22:40 +0000)]
tests: skip mount-bind-to-rootfs in rootless mode

The bind mount to rootfs requires root privileges and doesn't work
in user namespace simulation environments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: improve sd-notify-proxy test error handling
Giuseppe Scrivano [Thu, 18 Dec 2025 18:55:45 +0000 (18:55 +0000)]
tests: improve sd-notify-proxy test error handling

- Add proper socket timeout handling in notify server thread
- Add logging to show actual received datagram on failure
- Add timeouts to thread joins to prevent hangs
- Show stderr output for better debugging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: fix checkpoint/restore tests for stability
Giuseppe Scrivano [Thu, 18 Dec 2025 18:55:39 +0000 (18:55 +0000)]
tests: fix checkpoint/restore tests for stability

- Remove time namespace from external namespace test as CRIU doesn't
  support checkpoint/restore with external time namespaces
- Add better error handling and logging to pre-dump test
- Handle FileNotFoundError in pre-dump size calculation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add Linux features tests
Giuseppe Scrivano [Thu, 18 Dec 2025 15:14:57 +0000 (15:14 +0000)]
tests: add Linux features tests

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add I/O priority tests
Giuseppe Scrivano [Thu, 18 Dec 2025 07:01:51 +0000 (07:01 +0000)]
tests: add I/O priority tests

Add test_io_priority.py to test I/O priority handling in
src/libcrun/io_priority.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add create command tests
Giuseppe Scrivano [Thu, 18 Dec 2025 07:01:03 +0000 (07:01 +0000)]
tests: add create command tests

Add test_create.py to test the create command in src/create.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add cgroup setup tests
Giuseppe Scrivano [Thu, 18 Dec 2025 07:00:11 +0000 (07:00 +0000)]
tests: add cgroup setup tests

Add test_cgroup_setup.py to test cgroup setup code in
src/libcrun/cgroup-setup.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add namespace isolation tests
Giuseppe Scrivano [Wed, 17 Dec 2025 22:23:27 +0000 (22:23 +0000)]
tests: add namespace isolation tests

Add test_namespaces.py to test namespace handling in
src/libcrun/linux.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add scheduler policy tests
Giuseppe Scrivano [Wed, 17 Dec 2025 22:22:25 +0000 (22:22 +0000)]
tests: add scheduler policy tests

Add test_scheduler.py to test process scheduler configuration in
src/libcrun/scheduler.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add comprehensive OCI lifecycle hook tests
Giuseppe Scrivano [Wed, 17 Dec 2025 22:21:26 +0000 (22:21 +0000)]
tests: add comprehensive OCI lifecycle hook tests

Expand test_hooks.py to improve coverage of hook handling code in
src/libcrun/container.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add terminal tests for coverage
Giuseppe Scrivano [Wed, 17 Dec 2025 22:19:34 +0000 (22:19 +0000)]
tests: add terminal tests for coverage

Add tests for src/libcrun/terminal.c:

C unit tests (tests_libcrun_terminal.c) using isolated pty:
- test_cleanup_terminalp_null: NULL cleanup should not crash
- test_terminal_setup_size_invalid_fd: Invalid fd error handling
- test_terminal_setup_size_pty: Set size on isolated pty
- test_set_raw_invalid_fd: Invalid fd error handling
- test_set_raw_pty: Set raw mode on isolated pty
- test_set_raw_no_status: Set raw without saving status
- test_new_terminal: Verify pty creation

Add test_terminal.py to test terminal allocation code in
src/libcrun/terminal.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add comprehensive update command tests
Giuseppe Scrivano [Wed, 17 Dec 2025 22:18:45 +0000 (22:18 +0000)]
tests: add comprehensive update command tests

Expand test_update.py to improve coverage of src/update.c and the
cgroup update code paths.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add command tests for pause, unpause, kill, list, ps, spec
Giuseppe Scrivano [Wed, 17 Dec 2025 22:16:00 +0000 (22:16 +0000)]
tests: add command tests for pause, unpause, kill, list, ps, spec

Add test_commands.py with tests targeting CLI commands.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: skip resources-cpu-weight-systemd when systemd cgroup fails
Giuseppe Scrivano [Wed, 17 Dec 2025 14:47:23 +0000 (14:47 +0000)]
tests: skip resources-cpu-weight-systemd when systemd cgroup fails

Skip the test instead of failing when the systemd cgroup manager
cannot start the container, which can happen in some environments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: skip bpf-devices-systemd when eBPF installation fails
Giuseppe Scrivano [Wed, 17 Dec 2025 13:19:53 +0000 (13:19 +0000)]
tests: skip bpf-devices-systemd when eBPF installation fails

Skip the test instead of failing when systemd cannot install the eBPF
device filter, which can happen in some environments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: fix variable names in test_bpf_devices logger calls
Giuseppe Scrivano [Wed, 17 Dec 2025 12:51:57 +0000 (12:51 +0000)]
tests: fix variable names in test_bpf_devices logger calls

Fix incorrect variable names in logger.info calls that were introduced
when converting from sys.stderr.write to logger.info:
- prop_value -> output
- prog_file -> bpf_path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add more seccomp tests for coverage
Giuseppe Scrivano [Wed, 17 Dec 2025 09:47:37 +0000 (09:47 +0000)]
tests: add more seccomp tests for coverage

Add additional tests to test_seccomp.py to exercise more code paths
in seccomp.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add network device tests for coverage
Giuseppe Scrivano [Wed, 17 Dec 2025 09:46:46 +0000 (09:46 +0000)]
tests: add network device tests for coverage

Add test_net_device.py with tests targeting net_device.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add more BPF device filter tests for coverage
Giuseppe Scrivano [Wed, 17 Dec 2025 09:45:51 +0000 (09:45 +0000)]
tests: add more BPF device filter tests for coverage

Add additional tests to test_bpf_devices.py to exercise more code
paths in ebpf.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add cgroup resources tests for coverage
Giuseppe Scrivano [Wed, 17 Dec 2025 09:45:00 +0000 (09:45 +0000)]
tests: add cgroup resources tests for coverage

Add test_cgroup_resources.py with tests targeting cgroup-resources.c.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add cgroup manager env var support
Giuseppe Scrivano [Wed, 17 Dec 2025 09:42:57 +0000 (09:42 +0000)]
tests: add cgroup manager env var support

Add get_cgroup_manager() that reads the CGROUP_MANAGER environment
variable, defaulting to 'cgroupfs'. This allows running the entire
test suite with a different cgroup manager without modifying tests.

Also add get_test_environment() helper that returns a dict describing
the current test environment (uid, rootless, systemd, cgroup_v2, etc.)
for debugging purposes.

The run_and_get_output() function now uses the env var when the
cgroup_manager parameter is not explicitly specified, allowing tests
to inherit the environment setting while still supporting explicit
overrides.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add multi-environment coverage script
Giuseppe Scrivano [Wed, 17 Dec 2025 09:42:36 +0000 (09:42 +0000)]
tests: add multi-environment coverage script

Add run_coverage_multi_env.sh that runs the test suite in multiple
environments to maximize code coverage:

1. Root with cgroupfs cgroup manager
2. Root with systemd cgroup manager (if available)
3. User namespace via unshare --user --map-root-user
4. Non-root user via unshare --user --map-user=1000

Coverage data accumulates across all runs since lcov merges .gcda
files automatically. This helps exercise code paths that are only
reachable under specific conditions (rootless, systemd, etc.).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: remove unused Makefile
Giuseppe Scrivano [Thu, 18 Dec 2025 22:43:39 +0000 (23:43 +0100)]
tests: remove unused Makefile

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agotests: add exit command to init
Giuseppe Scrivano [Fri, 19 Dec 2025 16:54:21 +0000 (16:54 +0000)]
tests: add exit command to init

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 days agocoverage: add _safe_exit macro to flush gcov data before _exit
Giuseppe Scrivano [Sat, 20 Dec 2025 11:45:47 +0000 (11:45 +0000)]
coverage: add _safe_exit macro to flush gcov data before _exit

When code coverage is enabled (--enable-coverage), forked child
processes that call _exit() do not flush their gcov coverage data,
resulting in incomplete coverage reports.

This patch:
- Adds HAVE_COVERAGE define when --enable-coverage is used
- Introduces _safe_exit() macro in error.h that calls __gcov_dump()
  before _exit() when coverage is enabled
- Replaces all _exit() calls with _safe_exit() across the codebase

This ensures coverage data from forked processes (container setup,
namespace configuration, etc.) is properly captured.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
7 days agoMerge pull request #1892 from rst0git/criu-rpc-config
Giuseppe Scrivano [Sat, 20 Dec 2025 19:07:37 +0000 (20:07 +0100)]
Merge pull request #1892 from rst0git/criu-rpc-config

criu: enable setting of RPC config file

8 days agoMerge pull request #1934 from eriksjolund/criu-error-release
Giuseppe Scrivano [Fri, 19 Dec 2025 09:55:35 +0000 (10:55 +0100)]
Merge pull request #1934 from eriksjolund/criu-error-release

criu: fix error release

8 days agocriu: fix error release
Erik Sjölund [Fri, 19 Dec 2025 08:23:14 +0000 (09:23 +0100)]
criu: fix error release

Suggestion by gemini-code-assist in
https://github.com/containers/crun/pull/1934
was amended.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
9 days agoMerge pull request #1933 from eriksjolund/fix-error-release
Giuseppe Scrivano [Thu, 18 Dec 2025 13:41:33 +0000 (14:41 +0100)]
Merge pull request #1933 from eriksjolund/fix-error-release

container: fix error release

10 days agocontainer: fix error release
Erik Sjölund [Wed, 17 Dec 2025 14:08:36 +0000 (15:08 +0100)]
container: fix error release

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
10 days agocrun.1: add documentation for criu config files
Radostin Stoyanov [Wed, 17 Dec 2025 13:44:22 +0000 (13:44 +0000)]
crun.1: add documentation for criu config files

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
10 days agotests: add tests for criu config set via rpc
Radostin Stoyanov [Tue, 16 Dec 2025 22:08:45 +0000 (22:08 +0000)]
tests: add tests for criu config set via rpc

This patch adds tests to check support for /etc/criu/runc.conf,
/etc/criu/crun.conf, and config file set via container annotation.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
10 days agocriu: enable setting of RPC config file
Radostin Stoyanov [Tue, 7 Oct 2025 15:44:17 +0000 (16:44 +0100)]
criu: enable setting of RPC config file

This commit adds support for specifying a CRIU RPC configuration file.
This config file allows users to overwrite the default CRIU options
used by the container runtime, for example, to specify options such as
`--tcp-established` or `--tcp-close` when checkpointing containers
with TCP connections in Kubernetes.

For compatibility with runc, the default config file path is set to
`/etc/criu/runc.conf`. We also introduce support for crun.conf
that will be used instead of runc.conf when the file is available.

`criu_set_config_file()` was added to libcriu in version 4.2

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
10 days agoMerge pull request #1931 from containers/dependabot/github_actions/actions/cache-5
Giuseppe Scrivano [Wed, 17 Dec 2025 08:39:12 +0000 (09:39 +0100)]
Merge pull request #1931 from containers/dependabot/github_actions/actions/cache-5

build(deps): bump actions/cache from 4 to 5

10 days agoMerge pull request #1930 from containers/dependabot/github_actions/actions/upload...
Giuseppe Scrivano [Wed, 17 Dec 2025 08:39:02 +0000 (09:39 +0100)]
Merge pull request #1930 from containers/dependabot/github_actions/actions/upload-artifact-6

build(deps): bump actions/upload-artifact from 5 to 6

12 days agoMerge pull request #1929 from giuseppe/update-libocispec-13-dec-2025
Giuseppe Scrivano [Mon, 15 Dec 2025 20:59:53 +0000 (21:59 +0100)]
Merge pull request #1929 from giuseppe/update-libocispec-13-dec-2025

libocispec: sync

12 days agobuild(deps): bump actions/cache from 4 to 5
dependabot[bot] [Mon, 15 Dec 2025 17:03:07 +0000 (17:03 +0000)]
build(deps): bump actions/cache from 4 to 5

Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
12 days agobuild(deps): bump actions/upload-artifact from 5 to 6
dependabot[bot] [Mon, 15 Dec 2025 17:03:01 +0000 (17:03 +0000)]
build(deps): bump actions/upload-artifact from 5 to 6

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 weeks agolibocispec: sync
Giuseppe Scrivano [Sat, 13 Dec 2025 07:46:37 +0000 (08:46 +0100)]
libocispec: sync

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agoMerge pull request #1919 from giuseppe/add-coverage
Giuseppe Scrivano [Fri, 12 Dec 2025 14:09:23 +0000 (15:09 +0100)]
Merge pull request #1919 from giuseppe/add-coverage

test: add new target "coverage"

2 weeks agobuild: add tests coverage
Giuseppe Scrivano [Fri, 5 Dec 2025 14:43:02 +0000 (15:43 +0100)]
build: add tests coverage

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agotests: use hide_stderr=True to avoid coverage output interference
Giuseppe Scrivano [Fri, 5 Dec 2025 15:56:07 +0000 (15:56 +0000)]
tests: use hide_stderr=True to avoid coverage output interference

When running tests with --enable-coverage, gcov writes diagnostic
messages to stderr which get mixed with program output due to
stderr=subprocess.STDOUT in run_and_get_output(). This causes
test failures as the TAP parser encounters unexpected output.

Add hide_stderr=True to most run_and_get_output() calls to discard
coverage diagnostics while preserving the actual program output
needed for test validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agotests: do not call function twice
Giuseppe Scrivano [Fri, 5 Dec 2025 14:42:17 +0000 (15:42 +0100)]
tests: do not call function twice

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agotests: replace all sys.stderr.write calls with proper logging
Giuseppe Scrivano [Fri, 5 Dec 2025 11:50:15 +0000 (11:50 +0000)]
tests: replace all sys.stderr.write calls with proper logging

Implement clean logging infrastructure using Python's standard library:

Infrastructure Changes:
- Add simple logging setup in tests_utils.py using logging.basicConfig()
- Configure logger with TAP diagnostic format ('# %(message)s')
- Export logger through __all__ for use in test files
- Set default level to WARNING for production use

Comprehensive Replacement:
- Replace all sys.stderr.write() calls in tests_utils.py with logger calls
- Replace all sys.stderr.write() calls across 15+ test files
- Use appropriate log levels (warning, error, info) based on message type
- Clean up format strings for proper logger parameter passing

Benefits:
- Consistent diagnostic output with TAP '#' prefix
- Standard library only - no external dependencies
- Configurable log levels via logging module
- Proper format string handling with logger parameters
- Cleaner code without manual string formatting

All test files automatically import logger via 'from tests_utils import *'
maintaining backward compatibility while improving logging infrastructure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agotests: improve TAP skip reason reporting with specific explanations
Giuseppe Scrivano [Fri, 5 Dec 2025 11:03:12 +0000 (11:03 +0000)]
tests: improve TAP skip reason reporting with specific explanations

Enhance the TAP test framework to support and display specific skip reasons:
- Modify run_all_tests() to handle (return_code, reason) tuples
- Update tests to return (77, reason) instead of just 77
- Add descriptive skip reasons like "requires root privileges"
- Show skip reasons in TAP output as "#SKIP reason"

This makes test output more informative by explaining why tests
were skipped rather than showing generic skip messages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agotests: add slow test detection and warnings to TAP output
Giuseppe Scrivano [Fri, 5 Dec 2025 10:49:02 +0000 (10:49 +0000)]
tests: add slow test detection and warnings to TAP output

Add timing thresholds to detect slow-running tests:
- Warn for tests taking >30 seconds (slow threshold)
- Warn for tests taking >60 seconds (very slow threshold)

This helps identify performance regressions and tests that may
need optimization or may be hanging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agotests: enhance TAP error reporting with more diagnostic information
Giuseppe Scrivano [Fri, 5 Dec 2025 10:48:25 +0000 (10:48 +0000)]
tests: enhance TAP error reporting with more diagnostic information

Add enhanced diagnostic output for test failures including:
- Exception type and detailed messages
- Process return codes and failed commands
- Process output and stderr
- Working directory and test environment info

This improves debugging of test failures by providing more context
about what went wrong during test execution.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agotests: add writable /tmp tmpfs mount to base test configuration
Giuseppe Scrivano [Fri, 5 Dec 2025 18:40:07 +0000 (18:40 +0000)]
tests: add writable /tmp tmpfs mount to base test configuration

This fixes CRIU checkpoint/restore failures that occur when CRIU tries
to create temporary directories for mount namespace reconstruction but
encounters a read-only filesystem.

The error was:
  Error (criu/mount.c:2955): mnt: Can't create a temporary directory: Read-only file system
  Error (criu/mount.c:3700): mnt: Can't remove the directory /tmp/.criu.mntns.Y96TTI: Device or resource busy

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agotests: remove debug print statements in test_hooks
Giuseppe Scrivano [Fri, 12 Dec 2025 13:28:35 +0000 (13:28 +0000)]
tests: remove debug print statements in test_hooks

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agoMerge pull request #1923 from giuseppe/update-libocispec-11-dec-2025
Giuseppe Scrivano [Fri, 12 Dec 2025 13:01:42 +0000 (14:01 +0100)]
Merge pull request #1923 from giuseppe/update-libocispec-11-dec-2025

libocispec: sync from upstream

2 weeks agoMerge pull request #1925 from giuseppe/run-hooks-before-make-ro
flouthoc [Thu, 11 Dec 2025 19:14:38 +0000 (11:14 -0800)]
Merge pull request #1925 from giuseppe/run-hooks-before-make-ro

linux: run createContainer hooks before making root RO

2 weeks agolinux: run createContainer hooks before making root RO
Giuseppe Scrivano [Thu, 11 Dec 2025 15:57:11 +0000 (16:57 +0100)]
linux: run createContainer hooks before making root RO

Closes: https://github.com/containers/crun/issues/1924
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agolibocispec: sync from upstream
Giuseppe Scrivano [Thu, 11 Dec 2025 09:03:33 +0000 (10:03 +0100)]
libocispec: sync from upstream

Closes: https://github.com/containers/crun/issues/1921
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agoMerge pull request #1922 from giuseppe/fix-honggfuzz
Giuseppe Scrivano [Thu, 11 Dec 2025 09:24:17 +0000 (10:24 +0100)]
Merge pull request #1922 from giuseppe/fix-honggfuzz

tests: install honggfuzz from sources

2 weeks agotests: install honggfuzz from sources
Giuseppe Scrivano [Tue, 9 Dec 2025 09:08:42 +0000 (10:08 +0100)]
tests: install honggfuzz from sources

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2 weeks agoMerge pull request #1920 from eriksjolund/handle_open_error
Giuseppe Scrivano [Tue, 9 Dec 2025 08:50:37 +0000 (09:50 +0100)]
Merge pull request #1920 from eriksjolund/handle_open_error

linux: handle openat error

2 weeks agolinux: handle openat error
Erik Sjölund [Mon, 8 Dec 2025 08:38:55 +0000 (09:38 +0100)]
linux: handle openat error

Fail early to make the code easier to read.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
3 weeks agoMerge pull request #1918 from eriksjolund/fix-error-release
Giuseppe Scrivano [Fri, 5 Dec 2025 09:22:00 +0000 (10:22 +0100)]
Merge pull request #1918 from eriksjolund/fix-error-release

container: fix error release

3 weeks agocontainer: fix error release
Erik Sjölund [Fri, 5 Dec 2025 08:12:16 +0000 (09:12 +0100)]
container: fix error release

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
4 weeks agoMerge pull request #1916 from containers/dependabot/github_actions/actions/checkout-6
Giuseppe Scrivano [Sat, 29 Nov 2025 01:15:18 +0000 (02:15 +0100)]
Merge pull request #1916 from containers/dependabot/github_actions/actions/checkout-6

build(deps): bump actions/checkout from 5 to 6

4 weeks agoMerge pull request #1917 from giuseppe/tag-1.25.1
Giuseppe Scrivano [Tue, 25 Nov 2025 14:34:44 +0000 (15:34 +0100)]
Merge pull request #1917 from giuseppe/tag-1.25.1

NEWS: tag 1.25.1

4 weeks agoNEWS: tag 1.25.1
Giuseppe Scrivano [Tue, 25 Nov 2025 11:44:52 +0000 (12:44 +0100)]
NEWS: tag 1.25.1

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
4 weeks agobuild(deps): bump actions/checkout from 5 to 6
dependabot[bot] [Mon, 24 Nov 2025 17:51:46 +0000 (17:51 +0000)]
build(deps): bump actions/checkout from 5 to 6

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
5 weeks agoMerge pull request #1914 from giuseppe/invalidate-proc-fd-on-close
Giuseppe Scrivano [Wed, 19 Nov 2025 19:46:29 +0000 (20:46 +0100)]
Merge pull request #1914 from giuseppe/invalidate-proc-fd-on-close

utils: invalidate proc_fd on open_proc_file

5 weeks agoutils: invalidate proc_fd on open_proc_file
Giuseppe Scrivano [Wed, 19 Nov 2025 14:18:10 +0000 (15:18 +0100)]
utils: invalidate proc_fd on open_proc_file

invalidate the proc_fd file descriptor if we are closing it as part of
mark_or_close_fds_ge_than.

Closes: https://github.com/containers/crun/issues/1912
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agoMerge pull request #1910 from giuseppe/use-host-proc-fd
flouthoc [Tue, 18 Nov 2025 15:50:04 +0000 (07:50 -0800)]
Merge pull request #1910 from giuseppe/use-host-proc-fd

linux: initial hardening for /proc paths

5 weeks agoutils: use fsopen to open reference to proc
Giuseppe Scrivano [Tue, 18 Nov 2025 09:50:49 +0000 (10:50 +0100)]
utils: use fsopen to open reference to proc

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agosrc: move syscall wrappers to new file
Giuseppe Scrivano [Tue, 18 Nov 2025 10:41:37 +0000 (11:41 +0100)]
src: move syscall wrappers to new file

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agocgroup-systemd: use open_proc_file to get cgroup path
Giuseppe Scrivano [Mon, 17 Nov 2025 13:30:05 +0000 (14:30 +0100)]
cgroup-systemd: use open_proc_file to get cgroup path

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agocgroup: use open_proc_file to get cgroup path
Giuseppe Scrivano [Mon, 17 Nov 2025 13:29:58 +0000 (14:29 +0100)]
cgroup: use open_proc_file to get cgroup path

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agolinux: use open_proc_file to setup namespaces
Giuseppe Scrivano [Mon, 17 Nov 2025 13:28:49 +0000 (14:28 +0100)]
linux: use open_proc_file to setup namespaces

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agolinux: use open_proc_file to setup net devices
Giuseppe Scrivano [Mon, 17 Nov 2025 13:27:45 +0000 (14:27 +0100)]
linux: use open_proc_file to setup net devices

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agolinux: use open_proc_file to initialize security
Giuseppe Scrivano [Mon, 3 Nov 2025 10:27:39 +0000 (11:27 +0100)]
linux: use open_proc_file to initialize security

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agoutils: use open_proc_file for mark_or_close_fds_ge_than
Giuseppe Scrivano [Mon, 3 Nov 2025 11:02:29 +0000 (12:02 +0100)]
utils: use open_proc_file for mark_or_close_fds_ge_than

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
5 weeks agolinux: use open_proc_file to open current mountns
Giuseppe Scrivano [Mon, 3 Nov 2025 10:27:13 +0000 (11:27 +0100)]
linux: use open_proc_file to open current mountns

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>