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

e2e spec failures with unexpected stty: standard input CLI output #3058

Open
SpComb opened this issue Nov 17, 2017 · 4 comments
Open

e2e spec failures with unexpected stty: standard input CLI output #3058

SpComb opened this issue Nov 17, 2017 · 4 comments

Comments

@SpComb
Copy link
Contributor

SpComb commented Nov 17, 2017

Several e2e specs involving kontena * list commands (using tty-table -> tty-screen?) are failing when run in the Vagrant/docker-compose e2e spec environment:

  1) complete master names for master use
     Failure/Error: expect(rows).to include master_name unless master_name == current_master_name
       expected [] to include "stty: standard input"
     # ./spec/features/completer/completer_spec.rb:63:in `block (4 levels) in <top (required)>'
     # ./spec/features/completer/completer_spec.rb:62:in `each'
     # ./spec/features/completer/completer_spec.rb:62:in `block (3 levels) in <top (required)>'

  2) complete master names can complete master names for master rm
     Failure/Error: expect(rows).to include master_name
       expected ["compose-e2e"] to include "stty: standard input"
     # ./spec/features/completer/completer_spec.rb:72:in `block (4 levels) in <top (required)>'
     # ./spec/features/completer/completer_spec.rb:71:in `each'
     # ./spec/features/completer/completer_spec.rb:71:in `block (3 levels) in <top (required)>'

  3) complete master queries with current master set can complete node names
     Failure/Error: expect(rows).to include node_name
       expected ["localhost"] to include "stty: standard input"
     # ./spec/features/completer/completer_spec.rb:98:in `block (5 levels) in <top (required)>'
     # ./spec/features/completer/completer_spec.rb:97:in `each'
     # ./spec/features/completer/completer_spec.rb:97:in `block (4 levels) in <top (required)>'

  4) external-registry ls when not empty returns a list
     Failure/Error: expect(k.out.lines.first).to match(/NAME/)
     
       expected "stty: standard input\r\n" to match /NAME/
       Diff:
       @@ -1,2 +1,2 @@
       -/NAME/
       +stty: standard input
       
     # ./spec/features/external_registry/list_spec.rb:33:in `block (3 levels) in <top (required)>'

  5) external-registry ls when not empty -q outputs the registry name
     Failure/Error: expect(k.out.strip).to eq 'registry.domain.com'
     
       expected: "registry.domain.com"
            got: "stty: standard input\r\nregistry.domain.com"
     
       (compared using ==)
     
       Diff:
       @@ -1,2 +1,3 @@
       +stty: standard input
        registry.domain.com
       
     # ./spec/features/external_registry/list_spec.rb:44:in `block (4 levels) in <top (required)>'

  22) volume list --quiet lists volume names
      Failure/Error: expect(k.out.lines.sort.map(&:chomp)).to eq ["testVol", "testVol2"]
      
        expected: ["testVol", "testVol2"]
             got: ["stty: standard input", "testVol", "testVol2"]
      
        (compared using ==)
      # ./spec/features/volume/list_spec.rb:27:in `block (3 levels) in <top (required)>'

@SpComb
Copy link
Contributor Author

SpComb commented Dec 21, 2017

Confirm that this is some combination of alpine Linux + rspec + kommando that's causing stty to output that to stderr:

  1) stty outputs size
     Failure/Error: expect(k.out).to match /\d+ \d+/
     
       expected "execve(\"/bin/stty\", [\"stty\", \"size\"], [/* 24 vars */]) = 0\r\narch_prctl(ARCH_SET_FS, 0x7f5b92...andard input\r\n)  = 21\r\nexit_group(0)                           = ?\r\n+++ exited with 0 +++\r\n" to match /\d+ \d+/
       Diff:
       @@ -1,2 +1,13 @@
       -/\d+ \d+/
       +execve("/bin/stty", ["stty", "size"], [/* 24 vars */]) = 0
       +arch_prctl(ARCH_SET_FS, 0x7f5b927e8b48) = 0
       +set_tid_address(0x7f5b927e8b80)         = 29
       +mprotect(0x7f5b927e5000, 4096, PROT_READ) = 0
       +mprotect(0x55a34ec87000, 16384, PROT_READ) = 0
       +getuid()                                = 0
       +ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
       +ioctl(0, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0, ws_ypixel=0}) = 0
       +write(2, "stty: standard input\n", 21stty: standard input
       +)  = 21
       +exit_group(0)                           = ?
       ++++ exited with 0 +++
       
     # ./spec/test.rb:4:in `block (2 levels) in <top (required)>'

On Ubuntu

This does not happen on Ubuntu Linux with glibc:

stty
execve("/bin/stty", ["stty", "size"], [/* 80 vars */]) = 0
<snip>
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0, ws_ypixel=0}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 23), ...}) = 0
write(1, "0 0\n", 40 0
)                    = 4
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++
  outputs size when run with kommando

@SpComb
Copy link
Contributor Author

SpComb commented Dec 21, 2017

Reported as an issue in tty-screen, I think it should be suppressing the stderr output from stty in this case: piotrmurach/tty-screen#6

@kke
Copy link
Contributor

kke commented Jan 9, 2018

piotrmurach/tty-screen#6 is solved so this should be fixable

@SpComb
Copy link
Contributor Author

SpComb commented Jan 9, 2018

It only happens when running the specs in an alpine container, and I've stopped doing that for other reasons since.

Wouldn't hurt to update the CLI deps and then get this closed.

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

No branches or pull requests

2 participants