[L] Change in fuchsia/fuchsia[main]: [zx] Expose signals from zx_object_wait.

3 views
Skip to first unread message

'Hunter Freyer (Gerrit)' via owners-override

unread,
Apr 18, 2025, 9:37:12 AM4/18/25
to Owners Override
Attention needed from Owners Override

Hunter Freyer has uploaded the change for review

Hunter Freyer would like Owners Override to review this change.

Commit message

[zx] Expose signals from zx_object_wait.

Currently, wait and handle_wait in the zx crate only return Signals when
the syscall result is ZX_OK. However, the docs make it clear that the
result is defined when the status is ZX_OK, ZX_ERR_TIMED_OUT, or
ZX_ERR_CANCELED.

ZX_ERR_TIMED_OUT is useful in practice: it's common to wait with an
INFINITE_PAST deadline in order to see the signals currently asserted on
an object.

ZX_ERR_CANCELED is less likely to be useful, but since it's defined
according to the docs, we should probably expose it at this layer.

Bug: 410869980
Change-Id: I469fd4ea4a64dbfaa76f6feae6dbd1ac89a08647

Change diff


Change information

Files:
  • M sdk/rust/zx/src/eventpair.rs
  • M sdk/rust/zx/src/handle.rs
  • M sdk/rust/zx/src/time.rs
  • M sdk/rust/zx/src/wait.rs
  • M src/connectivity/bluetooth/tools/tests/bt-tool-cli-tests/src/lib.rs
  • M src/connectivity/network/tests/integration/socket/src/lib.rs
  • M src/connectivity/policy/http-client/src/main.rs
  • M src/lib/diagnostics/log/rust/src/fuchsia/sink.rs
  • M src/lib/fake-clock/svc/src/main.rs
  • M src/lib/fuchsia-async/src/handle/zircon/on_signals.rs
  • M src/lib/fuchsia-async/src/handle/zircon/rwhandle.rs
  • M src/lib/scoped_task/src/zircon.rs
  • M src/starnix/kernel/fs/fuchsia/sync_file.rs
  • M src/starnix/kernel/fs/fuchsia/zxio.rs
  • M src/starnix/kernel/time/utc.rs
  • M src/starnix/kernel/vfs/pidfd.rs
  • M src/starnix/kernel/vfs/timer.rs
  • M src/starnix/lib/kernel_manager/src/suspend.rs
  • M src/storage/ext4/server/tests/ext4_server_test.rs
  • M src/storage/lib/block_server/src/c_interface.rs
  • M src/sys/component_manager/src/model/tests/directory.rs
  • M src/sys/pkg/bin/fake-system-update-committer/src/main.rs
  • M src/sys/pkg/bin/system-update-committer/src/metadata.rs
  • M src/sys/pkg/lib/blobfs/src/lib.rs
  • M src/sys/pkg/lib/fidl-fuchsia-update-ext/src/commit.rs
  • M src/sys/pkg/lib/fuchsia-pkg-testing/src/package.rs
  • M src/sys/pkg/testing/blobfs-ramdisk/src/test.rs
  • M src/sys/pkg/tests/pkgdir/src/directory.rs
  • M src/sys/pkg/tests/pkgdir/src/node.rs
  • M src/sys/pkg/tests/system-update-committer/src/lib.rs
  • M src/testing/sl4f/src/time/facade.rs
  • M src/virtualization/tests/virtio_vsock_test_util/src/fuchsia_main.rs
Change size: L
Delta: 32 files changed, 260 insertions(+), 88 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I469fd4ea4a64dbfaa76f6feae6dbd1ac89a08647
Gerrit-Change-Number: 1253204
Gerrit-PatchSet: 6
Gerrit-Owner: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/7dc3e28f34aa05842025b3bab1842f61511d4bd0-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Hunter Freyer (Gerrit)' via owners-override

unread,
Apr 18, 2025, 9:37:17 AM4/18/25
to Owners Override, Adam Perry, GI Try Builder, CQ Bot
Attention needed from Owners Override

Hunter Freyer voted and added 1 comment

Votes added by Hunter Freyer

Fuchsia-Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Adam Perry . resolved

Thanks! Agree this is a much more correct API to present. //sdk/rust/zx, //src/lib/fuchsia-async, //src/starnix all LGTM.

I think doing a mechanical translation is probably best but I do see a bunch of places with empty signals being returned on TIMED_OUT -- I wonder if any of those are bugs that we should follow up on.

Hunter Freyer

I think doing a mechanical translation is probably best but I do see a bunch of places with empty signals being returned on TIMED_OUT -- I wonder if any of those are bugs that we should follow up on.

Yeah, there's a number of places that could be improved (and possibly fixed), but right now I'm focusing on making it _possible_ to do the right thing.

Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I469fd4ea4a64dbfaa76f6feae6dbd1ac89a08647
Gerrit-Change-Number: 1253204
Gerrit-PatchSet: 6
Gerrit-Owner: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Fri, 18 Apr 2025 13:37:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Adam Perry <adam...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/7dc3e28f34aa05842025b3bab1842f61511d4bd0-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'James Robinson (Gerrit)' via owners-override

unread,
Apr 18, 2025, 11:28:08 AM4/18/25
to Hunter Freyer, Owners Override, Adam Perry, GI Try Builder, CQ Bot
Attention needed from Hunter Freyer and Owners Override

James Robinson voted

Code-Review+2
Owners-Override+1
Open in Gerrit

Related details

Attention is currently required from:
  • Hunter Freyer
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I469fd4ea4a64dbfaa76f6feae6dbd1ac89a08647
Gerrit-Change-Number: 1253204
Gerrit-PatchSet: 6
Gerrit-Owner: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Hunter Freyer <hjfr...@google.com>
Gerrit-Comment-Date: Fri, 18 Apr 2025 15:27:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/e181962c254e9b7c8280b48f15643c0e84747af8-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'CQ Bot (Gerrit)' via owners-override

unread,
Apr 18, 2025, 11:29:22 AM4/18/25
to Hunter Freyer, Auto-Submit, James Robinson, Owners Override, Adam Perry, GI Try Builder

CQ Bot submitted the change

Change information

Commit message:
[zx] Expose signals from zx_object_wait.

Currently, wait and handle_wait in the zx crate only return Signals when
the syscall result is ZX_OK. However, the docs make it clear that the
result is defined when the status is ZX_OK, ZX_ERR_TIMED_OUT, or
ZX_ERR_CANCELED.

ZX_ERR_TIMED_OUT is useful in practice: it's common to wait with an
INFINITE_PAST deadline in order to see the signals currently asserted on
an object.

ZX_ERR_CANCELED is less likely to be useful, but since it's defined
according to the docs, we should probably expose it at this layer.

Bug: 410869980
Change-Id: I469fd4ea4a64dbfaa76f6feae6dbd1ac89a08647
Fuchsia-Auto-Submit: Hunter Freyer <hjfr...@google.com>
Owners-Override: James Robinson <jam...@google.com>
Reviewed-by: Adam Perry <adam...@google.com>
Reviewed-by: James Robinson <jam...@google.com>
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Adam Perry, +2 by James Robinson
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I469fd4ea4a64dbfaa76f6feae6dbd1ac89a08647
Gerrit-Change-Number: 1253204
Gerrit-PatchSet: 7
Gerrit-Owner: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/c462e7e6c40a23b5c80c42601b39a29fabf4340a-HTML%40fuchsia-review.googlesource.com.
open
diffy
satisfied_requirement

'GI Roller (Gerrit)' via owners-override

unread,
Apr 18, 2025, 11:32:19 AM4/18/25
to Hunter Freyer, CQ Bot, Auto-Submit, James Robinson, Owners Override, Adam Perry, GI Try Builder

Message from GI Roller

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I469fd4ea4a64dbfaa76f6feae6dbd1ac89a08647
Gerrit-Change-Number: 1253204
Gerrit-PatchSet: 7
Gerrit-Owner: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Auto-Submit <auto-...@fuchsia-infra.iam.gserviceaccount.com>
Gerrit-Reviewer: Hunter Freyer <hjfr...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Fri, 18 Apr 2025 15:32:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/51807e146c59ccc982997dae64ef9df6e3c3080d-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages