Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

recent changes broke LinuxKit tests #45

Closed
rn opened this issue Apr 23, 2018 · 4 comments
Closed

recent changes broke LinuxKit tests #45

rn opened this issue Apr 23, 2018 · 4 comments
Assignees
Labels

Comments

@rn
Copy link
Member

rn commented Apr 23, 2018

rtf revision c7b1f074f12ab2116509f69ffa6331aec104e244

$ pwd
~/src/linuxkit/linuxkit/test
$ rtf list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1a8 pc=0x10fa332]

goroutine 1 [running]:
github.com/linuxkit/rtf/local.(*Test).LabelString(0x0, 0x1, 0x1)
        /go/src/github.com/linuxkit/rtf/local/test.go:65 +0x22
github.com/linuxkit/rtf/cmd.list(0x165c880, 0x167f2c0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/linuxkit/rtf/cmd/list.go:66 +0x47e
github.com/linuxkit/rtf/vendor/github.com/spf13/cobra.(*Command).execute(0x165c880, 0x167f2c0, 0x0, 0x0, 0x165c880, 0x167f2c0)
        /go/src/github.com/linuxkit/rtf/vendor/github.com/spf13/cobra/command.go:621 +0x3f8
github.com/linuxkit/rtf/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x165cac0, 0xc42006c058, 0x0, 0xc420109f48)
        /go/src/github.com/linuxkit/rtf/vendor/github.com/spf13/cobra/command.go:700 +0x339
github.com/linuxkit/rtf/vendor/github.com/spf13/cobra.(*Command).Execute(0x165cac0, 0x1, 0x1)
        /go/src/github.com/linuxkit/rtf/vendor/github.com/spf13/cobra/command.go:659 +0x2b
github.com/linuxkit/rtf/cmd.Execute()
        /go/src/github.com/linuxkit/rtf/cmd/root.go:42 +0x31
main.main()
        /go/src/github.com/linuxkit/rtf/main.go:20 +0x20

Probably one of my refactoring changes.

@rn rn added the bug label Apr 23, 2018
@rn rn self-assigned this Apr 23, 2018
@rn
Copy link
Member Author

rn commented Apr 23, 2018

The reason is that with linuxkit.kernel.namespace we skip a group and there for there is not Test object with labels associated with the result.

rn added a commit to rn/rtf that referenced this issue Apr 23, 2018
This fixes an issue (linuxkit#45),
where, if an entire group get's skipped `rtf list` would crash.

This does not seem quite like the right solution and we should
probably restructure the code considerably to *not* return
a test object when just listing the tests...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
rn added a commit to rn/rtf that referenced this issue Apr 23, 2018
Previously, 'rtf list' and 'rtf info' would return a 'Result',
which, with 6fd55cb ("test: Link the test structure into
the Result") also included a link to the test. This complicates
the logic for just listing tests (or showing the test info). In
fact it also broke the case there a entire test group was skipped
(see linuxkit#45)

This commit fixes this by introducing a separate type, 'Info',
being returned for list/info.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
@ijc
Copy link
Contributor

ijc commented Apr 24, 2018

We need a tool to test this test framework 😀

@rn
Copy link
Member Author

rn commented Apr 24, 2018

There are some unit tests...but coverage is not as good as it could be

rn added a commit to rn/rtf that referenced this issue Apr 25, 2018
Previously, 'rtf list' and 'rtf info' would return a 'Result',
which, with 6fd55cb ("test: Link the test structure into
the Result") also included a link to the test. This complicates
the logic for just listing tests (or showing the test info). In
fact it also broke the case there a entire test group was skipped
(see linuxkit#45)

This commit fixes this by introducing a separate type, 'Info',
being returned for list/info.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
@rn
Copy link
Member Author

rn commented Apr 25, 2018

shoud be fixed via #47

@rn rn closed this as completed Apr 25, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants