Skip to content

Feat: Add Ino, Eventfd and Signalfd to fdinfo - #14735

Open
rahulk789 wants to merge 5 commits into
google:masterfrom
rahulk789:master
Open

rahulk789 wants to merge 5 commits into
google:masterfrom
rahulk789:master

Conversation

@rahulk789

Copy link
Copy Markdown

Description

Adds Ino, Event fd and Signalfd fields to /proc fdinfo.
Includes conclusive go and syscall tests for the added fdinfo fields. The tests pass as expected.

make test TARGETS="//pkg/sentry/fsimpl/proc:proc_test //pkg/sentry/fsimpl/eventfd:eventfd_test //pkg/sentry/fsimpl/proc:proc_nogo //pkg/sentry/fsimpl/eventfd:eventfd_nogo" OPTIONS="--test_output=errors"

Output:

--- TAG default
--- DOCKER BUILD
gvisor-builder-e313a4e7-x86_64
sha256:2eccf172fd274164a13de09a38f80bc4161335597f3cf4ae9dd92f3701c4d6e6

Waiting for it to complete...
Another command (pid=388084) is running. Waiting for it to complete on the server (server_pid=388087)...
Computing main repo mapping: 
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.7.1, but got bazel_skylib@1.8.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Loading: 
Loading: 2 packages loaded
Analyzing: 4 targets (653 packages loaded, 42144 targets configured)
Analyzing: 4 targets (653 packages loaded, 50999 targets configured)
[1 / 1] no actions running
INFO: Analyzed 4 targets (653 packages loaded, 51131 targets configured).
[604 / 2,234] checking cached actions
[3,136 / 4,820] checking cached actions
[5,278 / 5,364] 1 / 4 tests; checking cached actions
INFO: Found 4 test targets...
INFO: Elapsed time: 13.044s, Critical Path: 1.27s
INFO: 1 process: 5375 action cache hit, 1 internal.
//pkg/sentry/fsimpl/eventfd:eventfd_nogo                        (cached) PASSED in 0.1s
//pkg/sentry/fsimpl/eventfd:eventfd_test                        (cached) PASSED in 0.0s
//pkg/sentry/fsimpl/proc:proc_nogo                              (cached) PASSED in 0.1s
//pkg/sentry/fsimpl/proc:proc_test                              (cached) PASSED in 0.8s
Executed 0 out of 4 tests: 4 tests pass.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
INFO: Build completed successfully, 1 total action
INFO: 
INFO: Build Event Protocol files produced successfully.

Syscall Tests:

make syscall-tests TARGETS="//test/syscalls:proc_test_runsc_systrap_directfs" OPTIONS="--test_filter=ProcSelfFdInfo.*"

Output:

--- TAG default
--- DOCKER BUILD
gvisor-builder-e313a4e7-x86_64
sha256:3acd50a232a30b37efa64680a0f527caa345a0eb27e4a12dd15364a59ada445d
--- COPY //:release /tmp/master

Computing main repo mapping: 
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.7.1, but got bazel_skylib@1.8.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Loading: 
Loading: 2 packages loaded
Analyzing: target //:release (3 packages loaded, 0 targets configured)
Analyzing: target //:release (3 packages loaded, 0 targets configured)

WARNING: /gvisor/runsc/prewarmer/BUILD:19:8: target 'gvisor-sentry-prewarmer' is both a rule and a file; please choose another name for the rule
Analyzing: target //:release (98 packages loaded, 2712 targets configured)

Analyzing: target //:release (162 packages loaded, 8708 targets configured)

Analyzing: target //:release (786 packages loaded, 13733 targets configured)

Analyzing: target //:release (1214 packages loaded, 36482 targets configured)

Analyzing: target //:release (1281 packages loaded, 54359 targets configured)

INFO: Analyzed target //:release (1284 packages loaded, 57789 targets configured).
[1,079 / 3,756] checking cached actions
[3,745 / 3,756] [Prepa] GoLink shim/containerd-shim-runsc-v1_/containerd-shim-runsc-v1
[3,749 / 3,756] [Prepa] Executing genrule //runsc/checkpointgofer:checkpointgofer_noflate
[3,754 / 3,756] GoLink runsc/runsc_/runsc; 0s linux-sandbox
INFO: Found 1 target...
Target //:release up-to-date:
  bazel-bin/release/runsc
  bazel-bin/release/containerd-shim-runsc-v1
  bazel-bin/release/gvisor-bin/checkpointgofer
  bazel-bin/release/gvisor-bin/runsc-metric-server
  bazel-bin/release/gvisor-bin/gvisor_sentry
  bazel-bin/release/gvisor-bin/gvisor-sentry-prewarmer
[3,756 / 3,756] no actions running
INFO: Elapsed time: 14.235s, Critical Path: 4.12s
INFO: 9 processes: 3754 action cache hit, 1 internal, 8 linux-sandbox.
INFO: Build completed successfully, 9 total actions
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Analyzing: target //:release (0 packages loaded, 0 targets configured)
INFO: Analyzed target //:release (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
INFO: Elapsed time: 0.293s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 0 total actions
--- TEST --test_filter=ProcSelfFdInfo.* --test_env=RUNTIME=/tmp/master/runsc --test_env=GVISOR_SIDECAR_BINARIES_DIR=/tmp/master/gvisor-bin --cxxopt=-Werror --test_env=PARTITION=1 --test_env=TOTAL_PARTITIONS=1 -- //test/syscalls:proc_test_runsc_systrap_directfs
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
WARNING: Build options --cxxopt, --strip, and --test_env have changed, discarding analysis cache (this can be expensive, see https://bazel.build/advanced/performance/iteration-speed).
Analyzing: target //test/syscalls:proc_test_runsc_systrap_directfs (1 packages loaded, 0 targets configured)
Analyzing: target //test/syscalls:proc_test_runsc_systrap_directfs (1 packages loaded, 0 targets configured)

Analyzing: target //test/syscalls:proc_test_runsc_systrap_directfs (42 packages loaded, 43666 targets configured)

INFO: Analyzed target //test/syscalls:proc_test_runsc_systrap_directfs (42 packages loaded, 58342 targets configured).
[1 / 1] no actions running
[4,027 / 4,040] [Prepa] GoLink shim/containerd-shim-runsc-v1_/containerd-shim-runsc-v1
[4,032 / 4,040] GoLink runsc/checkpointgofer/checkpointgofer_binary_/checkpointgofer_binary; 1s linux-sandbox
[4,038 / 4,040] GoLink runsc/runsc_/runsc; 1s linux-sandbox
INFO: Found 1 test target...
Target //test/syscalls:proc_test_runsc_systrap_directfs up-to-date:
  bazel-bin/test/syscalls/proc_test_runsc_systrap_directfs
INFO: Elapsed time: 10.145s, Critical Path: 4.83s
INFO: 9 processes: 4047 action cache hit, 1 internal, 8 linux-sandbox.
INFO: Build completed successfully, 9 total actions
INFO: 
//test/syscalls:proc_test_runsc_systrap_directfs                (cached) PASSED in 0.2s
  Stats over 8 runs: max = 0.2s, min = 0.1s, avg = 0.2s, dev = 0.1s

Executed 0 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
INFO: Build Event Protocol files produced successfully.

@google-cla

google-cla Bot commented Sep 13, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rahulk789

Copy link
Copy Markdown
Author

@fvoznika @rexren-gif Bumping!

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 this pull request may close these issues.

1 participant