src/tests/inpty.cc: Skip the test on forkpty failures

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2016-11-13 16:13:25 -05:00
parent 74469a7592
commit f7f741dab4
+6 -1
View File
@@ -70,7 +70,12 @@ int main( int argc, char *argv[] )
pid_t child = forkpty( &master, NULL, NULL, &winsize ); pid_t child = forkpty( &master, NULL, NULL, &winsize );
if ( child == -1 ) { if ( child == -1 ) {
perror( "forkpty" ); perror( "forkpty" );
return 1; /* The Debian and Ubuntu build systems fail to set up a working
* /dev/ptmx (https://bugs.debian.org/817236). There is not much
* we can do about that except skip the test. In the future when
* this is fixed, we should turn this into an failure.
*/
return 77;
} else if ( child == 0 ) { } else if ( child == 0 ) {
if ( execvp( argv[1], argv + 1 ) < 0 ) { if ( execvp( argv[1], argv + 1 ) < 0 ) {
perror( "execve" ); perror( "execve" );