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

feat(decl/resources): adds fd test resource and test resource builder #234

Merged
merged 12 commits into from
Oct 29, 2024

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Oct 25, 2024

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind documentation

/kind tests

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area commands

/area pkg

/area events

What this PR does / why we need it:
This PR adds the fd test resource, the test resource builder and fixes some minor issues related to YAML specs validation. The fd test resource is a resource that lets the user declaratively create one file descriptor (or more, in case of pipe) . The user must specify the fd type using the subtype YAML field. The following subtypes have been introduced:

  • file
  • directory
  • pipe
  • event
  • signalfd
  • eventpoll
  • inotify
  • memfd

Depending on the selected subtype more attributes could be required to completely specify the fd test resource. For instance, the following is the YAML declaration of a directory fd test resource:

    ...
    resources:
      - type: fd
        name: directory1
        subtype: directory
        dirPath: "/path/to/dir"
    ...

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

ekoops and others added 11 commits October 25, 2024 10:27
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Add FD resource YAML definition as well as the definition of the
following fd subtypes: file, directory, pipe, event, signalfd,
eventpoll, inotify and memfd.

Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
@poiana poiana requested review from alacuku and leogr October 25, 2024 08:42
@ekoops ekoops changed the title Ekoops/fd feat(decl/resources): adds fd test resource and test resource builder Oct 25, 2024
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
@leogr
Copy link
Member

leogr commented Oct 28, 2024

/kind feature

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link

poiana commented Oct 29, 2024

LGTM label has been added.

Git tree hash: b319bde95bfdd2dcf1affc840119ec2704b44d9d

@poiana
Copy link

poiana commented Oct 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekoops, FedeDP

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 5e0cbe5 into falcosecurity:declarative-testing Oct 29, 2024
5 of 6 checks passed
@ekoops ekoops deleted the ekoops/fd branch October 29, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants