forked from microsoft/hcsshim
-
Notifications
You must be signed in to change notification settings - Fork 0
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
test pr #2
Closed
Closed
test pr #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c974624
to
07a863d
Compare
Have `internal\cmd.Cmd` ignore relay and close errors from the underlying IO channel being closed, since not all `io.Reader`/`io.Writer`s return an `io.EOF` if the are closed during an IO operation. This standardizes behavior between an `hcs`/`gcs` `Process` (which use a `go-winio.win32File` for their IO channels, and return `io.EOF` for read and write operations on a closed handle) and `JobProcess` (which uses an `os.Pipe` that instead return an `os.ErrClosed`). Additionally, ignore errors from closing an already-closed std IO channel. Update `Cmd.Wait` to return a known error value if it times out waiting on IO copy after the command exits (and update `TestCmdStuckIo` to check for that error). Prior, the test checked for an `io.ErrClosedPipe`, which: 1. is not the best indicator that IO is stuck; and 2. is now ignored as an error value raised during IO relay. Signed-off-by: Hamza El-Saawy <[email protected]>
Remove unused/legacy functional test flags/environment variables. Unify [TestMain] control flow, so there is only one exit call, and `defer` is used to run cleanup after the tests are run. Standardize UVM `default[L|W]COWOptions` to accept a context, and add context parameter to `namespacedContext` Remove all build tags aside from `functional`, since features are used to select the tests to run. This standardizes the functional tests with the cri-containerd tests, even though the feature names themselves are different. Add `test/pkg/uvm.CreateWCOW` function to mirror `CreateLCOW`, and add `Create` and `CreateAndStart` functions that pick LCOW or WCOW based on the options provided. Have uVM scratch and image layers be created under a dedicated and persisted folder within `%TEMP%` that is excluded from Windows defender. (The folder will be removed during OS restart, regardless of contents.) Remove copied OCI spec options from `test/internal/oci`, add new options for creating HostProcess containers. Add a `internal\sync.OnceValue`(`Ctx`) function that mirrors `sync.OnceValues` (introduced in go1.21) to have a type-safe `Once` function. Check that required privileges are held (only once) when unpacking Windows layers. Fix LCOW tests in `lcow_test.go` that were setting `KernelDirect` without also updating `KernelFile`. Add `util.Context` function to create context that times out before test timeout, to help with timing issues and allow time for cleanup and logging. Rename `cri_util` to `criutil`, since underscores are frowned upon in package names. Add a `test` prefix to `github.com/Microsoft/hcsshim/test/pkg/*` and `github.com/Microsoft/hcsshim/test/internal/*` imports to be consistent across all `test/functional/*` files. Signed-off-by: Hamza El-Saawy <[email protected]>
ebf1413
to
136f0c0
Compare
Update and un-skip WCOW uVM and container tests (and add WCOW uVM benchmarks), as well as WCOW vSMB and LCOW boto files tests. Add WCOW host process tests, including dedicated tests for setting username, and verifying hostname and volume mounts. Moved: - `lcow_bench_test.go` to `uvm_bench_test.go` - `lcow_container_test.go` to `container_test.go` - `lcow_test.go` to `lcow_uvm_test.go` and `uvm_test.go` Fix bug where removing a direct-mapped vSMB share fails. Run (non-virtualization/uVM) functional tests within CI. Make sure container specs are created with the default working directory (`C:\`), similar to how `internal\cmd` works). Relies on PR: microsoft#1974 Signed-off-by: Hamza El-Saawy <[email protected]>
Add tests for binding to and listening on hyper-v sockets from within a uVM (as well as a hyper-v isolated containerd). Tests verify default SDDL and wildcard bind settings, as well updating the settings for a particular service ID. Signed-off-by: Hamza El-Saawy <[email protected]>
4668a33
to
04607e4
Compare
Signed-off-by: Hamza El-Saawy <[email protected]>
f592f71
to
fcb7cc9
Compare
bc56d8e
to
7e449aa
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR for testing PR/merge CI