Bug 330012 - kptyprocesstest.cpp KPtyProcessTest::test_shared_pty looks bogus to me
Summary: kptyprocesstest.cpp KPtyProcessTest::test_shared_pty looks bogus to me
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 4.11.5
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-16 01:28 UTC by Maximiliano Curia
Modified: 2019-12-06 19:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maximiliano Curia 2014-01-16 01:28:11 UTC
Hi,

The KPtyProcessTest::test_shared_pty from kpty/tests/kptyprocesstest.cpp test runs two processes a cat and an echo 'hello from me', connecting the processes with the pty device, so far so good, it test that the output of cat is 'hello from me', great.

echo after sending its output closes stdout and dies, so the remaining part of the test seem to be testing the behaviour of two connected processes, one of which is dead and a partly closed pty device.

So the second part of the test sends input to echo zombie and reads if from cat, which unexpectedly passes.

And the third part sends input to cat and read it from the output of echo zombie, after waiting for input in the cats pty. This tests fails in my system, as the read string is missing the \r\n.

And that's the reason why I started looking at the test code.

I think that the second and third part of the test need to be updated.

Please correct me if I miss something in the test or kpty documentation.

Thanks,

Reproducible: Always
Comment 1 Andrew Crouthamel 2018-11-11 04:21:14 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Andrew Crouthamel 2018-11-21 04:40:11 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Nate Graham 2019-12-06 19:20:12 UTC
Looks like this is okay now.