Skip to content

hostagent/dns: fix panic in TestDNSRecords on Windows #1971

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

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

alexandear
Copy link
Member

This PR fixes the panic in TestDNSRecords. This happened during the run:

=== RUN   TestDNSRecords
    dns_test.go:39: 
--- FAIL: TestDNSRecords (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x62a833]

goroutine 6 [running]:
testing.tRunner.func1.2({0x67cee0, 0x913da0})
	C:/hostedtoolcache/windows/go/1.21.3/x64/src/testing/testing.go:1545 +0x238
testing.tRunner.func1()
	C:/hostedtoolcache/windows/go/1.21.3/x64/src/testing/testing.go:1548 +0x397
panic({0x67cee0?, 0x913da0?})
	C:/hostedtoolcache/windows/go/1.21.3/x64/src/runtime/panic.go:914 +0x21f
github.com/foxcpp/go-mockdns.(*Server).Close(0x0)
	C:/Users/runneradmin/go/pkg/mod/github.com/foxcpp/go-mockdns@v1.0.0/server.go:414 +0x13
runtime.Goexit()
	C:/hostedtoolcache/windows/go/1.21.3/x64/src/runtime/panic.go:523 +0x145
testing.(*common).SkipNow(0xc00005b520)
	C:/hostedtoolcache/windows/go/1.21.3/x64/src/testing/testing.go:1114 +0x45
testing.(*common).Skip(0xc00005b520, {0x0?, 0xc000034d50?, 0x0?})
	C:/hostedtoolcache/windows/go/1.21.3/x64/src/testing/testing.go:1090 +0x54
github.com/lima-vm/lima/pkg/hostagent/dns.TestDNSRecords(0xc00005b520)
	C:/a/lima/lima/pkg/hostagent/dns/dns_test.go:39 +0x391
testing.tRunner(0xc00005b520, 0x6ff4a0)
	C:/hostedtoolcache/windows/go/1.21.3/x64/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 1
	C:/hostedtoolcache/windows/go/1.21.3/x64/src/testing/testing.go:1648 +0x3ad
FAIL	github.com/lima-vm/lima/pkg/hostagent/dns	0.045s

Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
@alexandear alexandear force-pushed the hostagent-dns-fix-test branch from 52ec527 to 2121c36 Compare October 30, 2023 16:18
@AkihiroSuda AkihiroSuda added this to the v0.18.1 milestone Oct 30, 2023
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit c9e5efd into lima-vm:master Oct 30, 2023
@alexandear alexandear deleted the hostagent-dns-fix-test branch October 30, 2023 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants