Thanks to visit codestin.com
Credit goes to github.com

Skip to content

flake: scaletest/reconnectingpty Test_Runner/OK #98

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

Closed
spikecurtis opened this issue Oct 14, 2024 · 2 comments · Fixed by coder/coder#15079
Closed

flake: scaletest/reconnectingpty Test_Runner/OK #98

spikecurtis opened this issue Oct 14, 2024 · 2 comments · Fixed by coder/coder#15079
Assignees
Labels

Comments

@spikecurtis
Copy link

    t.go:99: 2024-10-14 06:55:12.440 [debu]  agent.reconnecting-pty: unable to read pty output; screen might have exited  remote=[fd7a:115c:a1e0:43b9:a80a:af47:9fae:9a73]:17200  local=[fd7a:115c:a1e0:4645:a307:63ea:957f:8e40]:2  message_id=f64f9dc6-27e5-45ff-8d5c-c4c3ac6ee8f9  connection_id=e7d169d7-4367-44b6-b506-a17cd2f2db77  error=EOF
    run_test.go:46: Runner logs:
        
        Opening reconnecting PTY connection to agent via coderd...
        	ID:      f64f9dc6-27e5-45ff-8d5c-c4c3ac6ee8f9
        	Width:   80
        	Height:  24
        	Command: "echo 'hello world'; sleep 1"
        
        Output:
        	p3;4l1hhello world
screen 4.09.00 (GNU) 30-Jan-22  ��
                                
        	1l
        	[screen is terminating]
        
    run_test.go:52: 
        	Error Trace:	/home/runner/work/coder/coder/scaletest/reconnectingpty/run_test.go:52
        	Error:      	"Opening reconnecting PTY connection to agent via coderd...\n\tID:      f64f9dc6-27e5-45ff-8d5c-c4c3ac6ee8f9\n\tWidth:   80\n\tHeight:  24\n\tCommand: \"echo 'hello world'; sleep 1\"\n\nOutput:\n\t\x1b[!p\x1b[?3;4l\x1b[4l\x1b>\x1b[4l\x1b[?1h\x1b=\x1b[0m\x1b(B\x1b[1;24r\x1b[H\x1b[2J\x1b[H\x1b[2Jhello world\r\x1b[23B\x1b[7mscreen 4.09.00 (GNU) 30-Jan-22\x1b[27m  \b\b\r                                \x1b[1;12H\n\t\x1b[?1l\x1b>\x1b[24;1H\n\t[screen is terminating]\n" does not contain "hello world\n"
        	Test:       	Test_Runner/OK

https://github.com/coder/coder/actions/runs/11322160456/job/31483045664

The problem appears to be that the output is via a PTY, but we don't properly parse the terminal command sequences, just pretend it's plaintext. So, sometimes a command sequence is in the middle of the string we are looking for.

@spikecurtis
Copy link
Author

Check out https://github.com/coder/coder/blob/79d24d210162813720ec5b4351409fdff61a1dd1/testutil/pty.go#L23 for utilities for handling terminal output in tests

@matifali matifali transferred this issue from coder/coder Oct 14, 2024
@mtojek
Copy link
Member

mtojek commented Oct 15, 2024

Looking into this

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

Successfully merging a pull request may close this issue.

2 participants