[MacPorts] #56365: Create test to verify correct functioning of ptys in system call

MacPorts noreply at macports.org
Thu Apr 26 23:28:25 UTC 2018


#56365: Create test to verify correct functioning of ptys in system call
-------------------------+--------------------
 Reporter:  ryandesign   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:  2.4.99
 Keywords:               |       Port:
-------------------------+--------------------
 I would like to create a test to verify the correct functioning of ptys in
 `system` calls—to verify that the changes in
 [changeset: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:

 1. 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.
 2. The expected output is produced, even if the sandbox fix from
 [changeset: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.

-- 
Ticket URL: <https://trac.macports.org/ticket/56365>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list