diff options
author | Robin Luk <lubin.lu@alibaba-inc.com> | 2020-11-12 03:52:30 +0000 |
---|---|---|
committer | Robin Luk <lubin.lu@alibaba-inc.com> | 2020-11-12 03:52:37 +0000 |
commit | b7de12fc03c6abde6d39b8bb326fc97cbc455901 (patch) | |
tree | 1d698c869342d33342ca45dc663c09b59d165d19 /pkg/sentry/platform/kvm | |
parent | 9c4102896d8ffbe6a90b57e7aca85f912dcadd9c (diff) |
kvm-test: adjust the check logic in TestWrongVCPU case
Signed-off-by: Robin Luk <lubin.lu@alibaba-inc.com>
Diffstat (limited to 'pkg/sentry/platform/kvm')
-rw-r--r-- | pkg/sentry/platform/kvm/kvm_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/sentry/platform/kvm/kvm_test.go b/pkg/sentry/platform/kvm/kvm_test.go index e58acc071..a650877d6 100644 --- a/pkg/sentry/platform/kvm/kvm_test.go +++ b/pkg/sentry/platform/kvm/kvm_test.go @@ -412,9 +412,10 @@ func TestWrongVCPU(t *testing.T) { // Basic test, one then the other. bluepill(c1) bluepill(c2) - if c2.guestExits == 0 { + if c1.guestExits == 0 { + // Check: vCPU1 will exit due to redpill() in bluepill(c2). // Don't allow the test to proceed if this fails. - t.Fatalf("wrong vCPU#2 exits: vCPU1=%+v,vCPU2=%+v", c1, c2) + t.Fatalf("wrong vCPU#1 exits: vCPU1=%+v,vCPU2=%+v", c1, c2) } // Alternate vCPUs; we expect to need to trigger the |