Skip to content

Shim testing framework - #306

Merged
Mossaka merged 3 commits into
containerd:mainfrom
jprendes:shim-tests-framework
Sep 13, 2023
Merged

Shim testing framework#306
Mossaka merged 3 commits into
containerd:mainfrom
jprendes:shim-tests-framework

Conversation

@jprendes

@jprendes jprendes commented Sep 10, 2023

Copy link
Copy Markdown
Collaborator

This PR intends to set the bases to build what's been proposed in #111 .
It creates a new crate that wasm shim implementors can use to test their shims.

@jprendes
jprendes force-pushed the shim-tests-framework branch 13 times, most recently from 6354bd0 to 87a1985 Compare September 11, 2023 18:32
@jprendes jprendes changed the title Initial test framework Shim testing framework Sep 11, 2023
@jprendes
jprendes marked this pull request as ready for review September 11, 2023 18:37
@jprendes
jprendes force-pushed the shim-tests-framework branch from 87a1985 to 87fc1a0 Compare September 11, 2023 22:09
@jprendes

Copy link
Copy Markdown
Collaborator Author

It turns out that the wasmer shim rootfs preopen setup is a bit more involved than initially thought.
That made the has_default_devices test fail.
This PR also fixes that issue.

@jprendes
jprendes force-pushed the shim-tests-framework branch from 87fc1a0 to 403b5db Compare September 11, 2023 22:33
Mossaka
Mossaka previously approved these changes Sep 12, 2023

@Mossaka Mossaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! I love how this testing framework simplies a lot the repeated code in all three shims. Thank you for this amazing work!

I had a few comments / questions. Not a blocker.

Comment thread crates/containerd-shim-wasm-test/src/modules/has_default_devices.rs
Comment thread crates/containerd-shim-wasm-test/src/lib.rs
Comment thread crates/containerd-shim-wasm-test/build.rs
Comment thread crates/containerd-shim-wasm-test/build.rs
Comment thread scripts/test-runner.sh
@Mossaka

Mossaka commented Sep 12, 2023

Copy link
Copy Markdown
Member

Need a rebase

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
@jprendes
jprendes force-pushed the shim-tests-framework branch from 6490f49 to 089bbe5 Compare September 12, 2023 20:55
@jprendes

Copy link
Copy Markdown
Collaborator Author

Rebased

@Mossaka Mossaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm! Thanks

@Mossaka
Mossaka merged commit f450f3c into containerd:main Sep 13, 2023
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.

2 participants