Skip to content
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

validation: Complete process test #624

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhouhao3
Copy link

I try to set terminal to true. But it failed when testing.

failed to create the container
cannot allocate tty if runc will detach without setting console socket
exit status 1

Signed-off-by: Zhou Hao zhouhao@cn.fujitsu.com

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
@@ -12,6 +12,8 @@ func main() {
if err != nil {
util.Fatal(err)
}

g.SetProcessConsoleSize(10, 80)
Copy link
Contributor

Choose a reason for hiding this comment

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

The spec says:

Runtimes MUST ignore consoleSize if terminal is false or unset.

which makes sense. We currently aren't testing that in runtimetest (and for validation/process.go the standard streams shouldn't be terminals anyway. So I don't have a problem setting consoleSize here, but if we actually want to test something by doing that we need to:

  • Setup our own pseudoterminal pair here with a different size and pass the slave in to create as stdin (at least).
  • Add tests to runtimetest to check that that, when consoleSize is false/unset, the actual console size does not match the config.json value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants