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

Rework TestPseudoConsolePowershell #1255

Merged
merged 1 commit into from
Dec 31, 2021
Merged

Conversation

dcantah
Copy link
Contributor

@dcantah dcantah commented Dec 23, 2021

Before, this test used to write something to the pty and then see if we
could read the same thing shortly afterwards. Really all we wanna test here
is just that we can write things in general, so the same thing that
TestExecStdinPowershell is currently doing should suffice.

If the process exits then the 'exit' write went through so that should be
plenty for this test. This change additionally adds a timeout for waiting
for the process to exit for TestPseudoConsolePowershell as well as
TestExecStdinPowershell so we have an indicator for if the 'exit' write
didn't work.

@dcantah dcantah requested a review from a team as a code owner December 23, 2021 21:17
@dcantah dcantah force-pushed the rework-pty-test branch 3 times, most recently from 9e33c56 to 5892a85 Compare December 23, 2021 21:39
@@ -1,3 +1,6 @@
run:
timeout: 8m
Copy link
Contributor Author

@dcantah dcantah Dec 23, 2021

Choose a reason for hiding this comment

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

Bumped this as the linter was timing out while running. We have too much code now 😐

@helsaawy helsaawy self-assigned this Dec 27, 2021
@helsaawy
Copy link
Contributor

It would be nice to have a test checking that the output we get from the conpty OutPipe() is what we want and not garbled or anything, if possible

@dcantah
Copy link
Contributor Author

dcantah commented Dec 29, 2021

@helsaawy Agreed, let me look into this. Do we want to merge this for the time being so we can de-flake the CI? (after review of course haha)

@helsaawy
Copy link
Contributor

@helsaawy Agreed, let me look into this. Do we want to merge this for the time being so we can de-flake the CI? (after review of course haha)

That sounds good, since it may take some experimentation to see if thats possible

Before this test used to write something to the pty and then see if we
could read the same thing shortly afterwards. Really all we wanna test here
is just that we can write things in general, so the same thing that
TestExecStdinPowershell is currently doing should suffice.

If the process exits then the 'exit' write went through so that should be
plenty for this test. This change additionally adds a timeout for waiting
for the process to exit for TestPseudoConsolePowershell as well as
TestExecStdinPowershell so we have some indicator for if the 'exit' write
didn't work.

Signed-off-by: Daniel Canter <[email protected]>
@dcantah
Copy link
Contributor Author

dcantah commented Dec 31, 2021

Needed to rebase to pull in this 0124eb3

@dcantah dcantah merged commit e093fbd into microsoft:master Dec 31, 2021
dcantah added a commit to dcantah/hcsshim that referenced this pull request Jan 4, 2022
Before this test used to write something to the pty and then see if we
could read the same thing shortly afterwards. Really all we wanna test here
is just that we can write things in general, so the same thing that
TestExecStdinPowershell is currently doing should suffice.

If the process exits then the 'exit' write went through so that should be
plenty for this test. This change additionally adds a timeout for waiting
for the process to exit for TestPseudoConsolePowershell as well as
TestExecStdinPowershell so we have some indicator for if the 'exit' write
didn't work.

Signed-off-by: Daniel Canter <[email protected]>
(cherry picked from commit e093fbd)
Signed-off-by: Daniel Canter <[email protected]>
dcantah added a commit to dcantah/hcsshim that referenced this pull request Jan 4, 2022
Before this test used to write something to the pty and then see if we
could read the same thing shortly afterwards. Really all we wanna test here
is just that we can write things in general, so the same thing that
TestExecStdinPowershell is currently doing should suffice.

If the process exits then the 'exit' write went through so that should be
plenty for this test. This change additionally adds a timeout for waiting
for the process to exit for TestPseudoConsolePowershell as well as
TestExecStdinPowershell so we have some indicator for if the 'exit' write
didn't work.

Signed-off-by: Daniel Canter <[email protected]>
(cherry picked from commit e093fbd)
Signed-off-by: Daniel Canter <[email protected]>
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.

None yet

3 participants