Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prog: support optional resources #4580

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-nogikh
Copy link
Collaborator

There are cases when the ability to generate a system call that produces a resource value does not indicate that we should disable all dependent system calls.

Add support for resource N[T, opt] resources. This could be useful at least for #4565 and hopefully resolve many situations that led to #2721.

There are cases when the ability to generate a system call that
produces a resource value does not indicate that we should disable all
dependent system calls.

Add support for resource N[T, opt] resources.
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.2%. Comparing base (e104824) to head (47beee0).

Additional details and impacted files
Files Coverage Δ
pkg/ast/ast.go 71.4% <ø> (ø)
pkg/ast/clone.go 100.0% <100.0%> (ø)
pkg/ast/format.go 95.1% <100.0%> (+0.1%) ⬆️
pkg/ast/parser.go 90.6% <100.0%> (+0.1%) ⬆️
pkg/ast/walk.go 100.0% <100.0%> (ø)
pkg/compiler/check.go 95.6% <100.0%> (+<0.1%) ⬆️
pkg/compiler/compiler.go 96.8% <100.0%> (-<0.1%) ⬇️
pkg/compiler/gen.go 93.7% <100.0%> (+<0.1%) ⬆️
prog/resources.go 95.9% <100.0%> (ø)
prog/types.go 73.7% <ø> (ø)

... and 4 files with indirect coverage changes

@a-nogikh
Copy link
Collaborator Author

From an offline discussion with @dvyukov:

We can already do

struct {
 f    dm_ctl_dev[opt]
}

But the problem is that we get the following error afterwards:

sys/linux/dev_dm_ctl.txt:9:1: resource dm_ctl_dev can't be created (never mentioned as a syscall return value or output argument/field)

@a-nogikh a-nogikh marked this pull request as draft March 21, 2024 13:17
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