Skip to content

start validation test panics if process was not set #617

@dongsupark

Description

@dongsupark

#578 introduced a new test for StartWithProcUnsetGenError, which is checked by validation/start.go. However, when testing with runc, the test fails because Create() returns exit status 2. It turns out, that's because validateProcessSpec() in runc panics with nil-dereference when its input spec (type of *Process) is nil.

From my understanding, the original idea of the test was probably not to test whether spec.Process is nil or not. It should actually test if process in config.json is valid. So I think we should actually decode a config json file to see if it has a valid process entry.

/cc @liangchenye

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions