Skip to content

Commit

Permalink
Add fix to TestHVSock_Container_* tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jie Chen committed Dec 16, 2024
1 parent c4aa00e commit b673a49
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/functional/hvsock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func TestHVSock_UVM_HostBind(t *testing.T) {
})

guestPath := shareSelf(ctx, t, vm, "")
testuvm.Share(ctx, tb, vm, self, guestPath, true)

reexecCmd := fmt.Sprintf(`%s -test.run=%s`, guestPath, util.TestNameRegex(t))
if testing.Verbose() {
Expand Down Expand Up @@ -232,6 +233,7 @@ func TestHVSock_UVM_GuestBind(t *testing.T) {
t.Cleanup(cancel)

guestPath := shareSelf(ctx, t, vm, "")
testuvm.Share(ctx, tb, vm, self, guestPath, true)

reexecCmd := fmt.Sprintf(`%s -test.run=%s`, guestPath, util.TestNameRegex(t))
if testing.Verbose() {
Expand Down Expand Up @@ -352,7 +354,8 @@ func TestHVSock_Container_HostBind(t *testing.T) {

vm := testuvm.CreateAndStart(ctx, t, opts)

guestPath := filepath.Join(`C:\`, filepath.Base(os.Args[0]))
// guestPath := filepath.Join(`C:\`, filepath.Base(os.Args[0]))
guestPath := shareSelf(ctx, t, vm, "")
reexecCmd := fmt.Sprintf(`%s -test.run=%s`, guestPath, util.TestNameRegex(t))
if testing.Verbose() {
reexecCmd += " -test.v"
Expand Down Expand Up @@ -500,7 +503,8 @@ func TestHVSock_Container_GuestBind(t *testing.T) {

vm := testuvm.CreateAndStart(ctx, t, opts)

guestPath := filepath.Join(`C:\`, filepath.Base(os.Args[0]))
// guestPath := filepath.Join(`C:\`, filepath.Base(os.Args[0]))
guestPath := shareSelf(ctx, t, vm, "")
reexecCmd := fmt.Sprintf(`%s -test.run=%s`, guestPath, util.TestNameRegex(t))
if testing.Verbose() {
reexecCmd += " -test.v"
Expand Down Expand Up @@ -1162,7 +1166,6 @@ func shareSelf(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM, base strin
}

guestPath := filepath.Join(base, filepath.Base(self))
testuvm.Share(ctx, tb, vm, self, guestPath, true)

return guestPath
}

0 comments on commit b673a49

Please sign in to comment.