Opened 7 years ago
Last modified 7 years ago
#56365 new enhancement
Create test to verify correct functioning of ptys in system call
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.4.99 |
Keywords: | Cc: | ||
Port: |
Description
I would like to create a test to verify the correct functioning of ptys in system
calls—to verify that the changes in 8765c14223c2826c958cddd4e33c17801d63ddb4/macports-base work and continue working.
I do not understand our test system so I'm having trouble doing this.
I tried the attached patch. It tries to run expect -c "spawn echo"
and then verify that the output is indeed "spawn echo". It doesn't work for two reasons:
- The output seemingly has whitespace at the end. Being output from terminal, it should have a carriage return and a newline at the end.
[string trim]
should be removing those, but isn't, for reasons I don't understand. - The expected output is produced, even if the sandbox fix from 8765c14223c2826c958cddd4e33c17801d63ddb4/macports-base is reverted, which suggests the test isn't being run under the sandbox and is therefore useless for verifying correct functioning within the sandbox.
Attachments (1)
Change History (2)
Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | system.tcl.diff added |
---|
comment:1 Changed 7 years ago by raimue (Rainer Müller)
Note: See
TracTickets for help on using
tickets.
Only some of the targets in port1.0 are executed in a sandbox. I do not think we have any units tests being executed in the sandbox.
There are also the tests with Portfiles. That would be the most realistic environment for this kind of test, so I would add it there.