Skip to content

gha: also test and lint stubs#189

Merged
rhatdan merged 4 commits intoopencontainers:mainfrom
thaJeztah:test_stubs
Oct 13, 2022
Merged

gha: also test and lint stubs#189
rhatdan merged 4 commits intoopencontainers:mainfrom
thaJeztah:test_stubs

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

While we were cross-compiling the code, we did not run the tests for the stubs. This patch adds a check, running on macOS to verify that the stubs work as intended.

@thaJeztah thaJeztah changed the title gha: also test stubs gha: also test and lint stubs Oct 11, 2022
rhatdan
rhatdan previously approved these changes Oct 12, 2022
Copy link
Copy Markdown
Collaborator

@rhatdan rhatdan left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Copy Markdown
Collaborator

rhatdan commented Oct 12, 2022

@lsm5 @vrothberg @giuseppe @kolyshkin PTAL

Copy link
Copy Markdown
Collaborator

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

While we were cross-compiling the code, we did not run the tests
for the stubs. This patch adds a check, running on macOS to
verify that the stubs work as intended.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member Author

I need to rebase this one and fix a gofumpt on one file; looks like when running this against main, it picks up one file that's not properly formatted;

go-selinux/selinux_stub.go:12: File is not `gofumpt`-ed (gofumpt)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member Author

👍 fixed; should be good now 👍

return nil
}
}
e := lSetFileLabel(p, label)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit can you change this to err for consistency.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, yes, I should do; thought I changed this one, but perhaps it got in another branch

It's unused on other platforms:

    go-selinux/rchcon.go:11:6: func `rchcon` is unused (unused)
    func rchcon(fpath, label string) error {
         ^

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Copy link
Copy Markdown
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan rhatdan merged commit 0e1975d into opencontainers:main Oct 13, 2022
@thaJeztah thaJeztah deleted the test_stubs branch October 13, 2022 22:10
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.

4 participants