diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-12-12 09:25:03 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-12-13 11:36:37 +0100 |
commit | b0da5796089191f85daac8ebca957cd0a104fde1 (patch) | |
tree | 1f1cf3bcfad1ede2377142e88d6062eb3df0c9db /testsuites | |
parent | termios: Fix tcflow() error status (diff) | |
download | rtems-b0da5796089191f85daac8ebca957cd0a104fde1.tar.bz2 |
termios: Implement tcflush()
New IO control RTEMS_IO_TCFLUSH.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/libtests/termios02/init.c | 22 | ||||
-rw-r--r-- | testsuites/libtests/termios02/termios02.scn | 6 |
2 files changed, 15 insertions, 13 deletions
diff --git a/testsuites/libtests/termios02/init.c b/testsuites/libtests/termios02/init.c index 92e37add1c..e944bca9af 100644 --- a/testsuites/libtests/termios02/init.c +++ b/testsuites/libtests/termios02/init.c @@ -83,25 +83,27 @@ rtems_task Init( puts( "" ); /***** TEST TCFLUSH *****/ - puts( "tcflush(stdin, TCIFLUSH) - ENOTSUP" ); + puts( "tcflush(stdin, TCIFLUSH) - OK" ); + errno = 0; sc = tcflush( 0, TCIFLUSH ); - rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = ENOTSUP ); + rtems_test_assert( sc == 0 ); + rtems_test_assert( errno == 0 ); - puts( "tcflush(stdin, TCOFLUSH) - ENOTSUP" ); + puts( "tcflush(stdin, TCOFLUSH) - OK" ); sc = tcflush( 0, TCOFLUSH ); - rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = ENOTSUP ); + rtems_test_assert( sc == 0 ); + rtems_test_assert( errno == 0 ); - puts( "tcflush(stdin, TCIOFLUSH) - ENOTSUP" ); + puts( "tcflush(stdin, TCIOFLUSH) - OK" ); sc = tcflush( 0, TCIOFLUSH ); - rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = ENOTSUP ); + rtems_test_assert( sc == 0 ); + rtems_test_assert( errno == 0 ); puts( "tcflush(stdin, 22) - EINVAL" ); + errno = 0; sc = tcflush( 0, 22 ); rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = EINVAL ); + rtems_test_assert( errno == EINVAL ); puts( "" ); diff --git a/testsuites/libtests/termios02/termios02.scn b/testsuites/libtests/termios02/termios02.scn index 5e29a9cc65..9b38d69ba1 100644 --- a/testsuites/libtests/termios02/termios02.scn +++ b/testsuites/libtests/termios02/termios02.scn @@ -10,9 +10,9 @@ tcflow(stdin, TCIOFF) - ENOTSUP tcflow(stdin, TCION) - ENOTSUP tcflow(stdin, 22) - EINVAL -tcflush(stdin, TCIFLUSH) - ENOTSUP -tcflush(stdin, TCOFLUSH) - ENOTSUP -tcflush(stdin, TCIOFLUSH) - ENOTSUP +tcflush(stdin, TCIFLUSH) - OK +tcflush(stdin, TCOFLUSH) - OK +tcflush(stdin, TCIOFLUSH) - OK tcflush(stdin, 22) - EINVAL tcgetpgrp( 1 ) - OK |