bobuhiro11 / gokvm

KVM based tiny x86 hypervisor written in pure golang, which can boot Linux
https://blog.bobuhiro11.net/tags/gokvm.html
MIT License
206 stars 21 forks source link

Kvm/function add 2 #133

Closed ChriMarMe closed 1 year ago

ChriMarMe commented 1 year ago

Even more kvm functions.

And one little fixup: moved machine.Translate to kvm.Translate for the sake of consistency.

ChriMarMe commented 1 year ago

Ready for review. Only fixups now.

ChriMarMe commented 1 year ago
--- FAIL: TestTRPAccessReporting (0.00s)

panic: strings: illegal use of non-zero Builder copied by value [recovered]

    panic: strings: illegal use of non-zero Builder copied by value

goroutine 45 [running]:

testing.tRunner.func1.2({0x5104c0, 0x561a10})

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/testing/testing.go:1389 +0x24e

testing.tRunner.func1()

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/testing/testing.go:1392 +0x39f

panic({0x5104c0, 0x561a10})

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/runtime/panic.go:838 +0x207

strings.(*Builder).copyCheck(...)

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/strings/builder.go:41

strings.(*Builder).WriteString(...)

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/strings/builder.go:122

testing.(*common).decorate(0x40cc65?, {0xc0001294d0, 0x28}, 0x10?)

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/testing/testing.go:663 +0x6ce

testing.(*common).logDepth(0xc0001009c0, {0xc0001294d0, 0x28}, 0x3)

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/testing/testing.go:900 +0x1f6

testing.(*common).log(...)

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/testing/testing.go:869

testing.(*common).Skip(0xc0001009c0, {0xc0000e2748?, 0x2?, 0x0?})

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/testing/testing.go:954 +0x4e

github.com/bobuhiro11/gokvm/kvm_test.TestTRPAccessReporting(0xc0001009c0)

    /home/travis/gopath/src/github.com/bobuhiro11/gokvm/kvm/kvm_test.go:1016 +0x30b

testing.tRunner(0xc0001009c0, 0x53e230)

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/testing/testing.go:1439 +0x102

created by testing.(*T).Run

    /home/travis/.gimme/versions/go1.18.10.linux.amd64/src/testing/testing.go:1486 +0x35f

FAIL    github.com/bobuhiro11/gokvm/kvm 0.340s

I dont know what is going on. Locally it builds and tests just fine.