-
Notifications
You must be signed in to change notification settings - Fork 882
kvm: Enable functional tests for kvm #2007
kvm: Enable functional tests for kvm #2007
Conversation
Please provide better PR description, about all changes/intentions eg. (pass flavor to func tests, fix empty volume preparation etc... both in PR description as well as in each commit) - that will help rather big change. "TODO list" would be usefull too (eg. list of tests that are still falling). |
ffda3cb
to
500867d
Compare
// If pod won't stop after sending escape sequence, than test will wait | ||
// till go test timeout. | ||
escapeSequence = "\001\170" | ||
processFail = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/processFail/shouldSucceed and explicit information in docs that this behaviors is different from original nspawn (code returned)
ps. exit code returned from lkvm is defined lkvm include/kvm/kvm.h
as SIGVMEXIT
(origniating from code that intercepts the escape sequence) - can be hard to handle "abort situation" in uniform way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
5f6df75
to
17353f4
Compare
@@ -64,7 +64,9 @@ func (d *dirDesc) cleanup() { | |||
return | |||
} | |||
if err := os.RemoveAll(d.dir); err != nil && !os.IsNotExist(err) { | |||
panic(fmt.Sprintf("Failed to remove temporary %s directory %q: %s", d.desc, d.dir, err)) | |||
//TODO: Fix race condition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WIP: Sometimes Cleanup
cannot remove workdir on kvm flavor. It appears when run-build
is running.
This won't make it to 1.0. Let's move it. |
433d3b3
to
4728a0f
Compare
1000567
to
7fbe349
Compare
Subnet: "11.11.1.0/24", | ||
Routes: []map[string]string{ | ||
{"dst": "0.0.0.0/0"}, | ||
func CommonTestNetCustomPtp(runCustomDual bool) testutils.Test { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewNetCustomPtpTest
@mstachowski just many nitpicks really, thanks for the effort! 👍 We'll need this very soon for testing the /cc @steveej as per OOB let's introduce the |
8969a89
to
9c3872f
Compare
|
||
cases = append(cases, CommonPortFwdCases{"172.16.28.1", "--net=default", true}) | ||
cases = append(cases, CommonPortFwdCases{"127.0.0.1", "--net=default", true}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 30 CommonPortFwdCases -> PortFwdTest
Lines 32, 33 CommonPortFwdCases -> PortFwdCase
9c3872f
to
6532dbc
Compare
8000 * Container launches http server on all its interfaces | ||
* Host must be able to connect to container's http server on it's own interfaces | ||
*/ | ||
func NewNetDefaultPortFwdConnectivityTest(cases PortFwdTest) testutils.Test { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func NewPortFwdTest(cases ...PortFwdCase) PortFwdTest {
return PortFwdTest(cases)
}
3ed00ff
to
4654952
Compare
d6c777a
to
2323c2b
Compare
Prepare functional tests for support kvm. Co-authored: @s-urbaniak <sergiusz.urbaniak@gmail.com>
LGTM, if we see further potential for refactorings and reuse for other flavors, we'll address this in subsequent PRs. |
Edited the semaphore CI config to reflect the necessary changes documented here. |
The kvm flavor needs 'bc' to build and 'bc' is not installed by default on Semaphore. This was introduced by rkt#2007
This is first part of enabling functional tests for
kvm
flavor.This pr requires modification in Semaphore configuration
Right now we are skipping:
Also checking error code is turned off