summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/termios06/init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-01-28 15:39:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-01-28 15:39:46 +0000
commita4325457a7293ae9eb973b1db93fc11863cc4841 (patch)
tree00809123b9fe59111969de0b795678372b8e6398 /testsuites/libtests/termios06/init.c
parent2011-01-27 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-a4325457a7293ae9eb973b1db93fc11863cc4841.tar.bz2
2011-01-28 Bharath Suri <bharath.s.jois@gmail.com>
PR 1661/testing * termios06/init.c: Extend the test to cover sections related to flow control in termios.c * termios06/termios06.doc: Updated test concept * termios06/termios06.scn: Updated test run log
Diffstat (limited to 'testsuites/libtests/termios06/init.c')
-rw-r--r--testsuites/libtests/termios06/init.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuites/libtests/termios06/init.c b/testsuites/libtests/termios06/init.c
index 10b5d014f5..37ec1f7951 100644
--- a/testsuites/libtests/termios06/init.c
+++ b/testsuites/libtests/termios06/init.c
@@ -89,10 +89,35 @@ void set_discipline(void)
void ioctl_it(void)
{
int rc;
+ struct termios t;
puts( "ioctl(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
rc = ioctl( Test_fd, 0xFFFF, NULL );
rtems_test_assert( rc == 0 );
+
+ puts( "tcgetattr(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+ rc = tcgetattr( Test_fd, &t );
+ rtems_test_assert( rc == 0 );
+
+ puts( "Turn on flow control on output - OK" );
+ t.c_iflag |= IXON;
+ rc = tcsetattr( Test_fd, TCSANOW, &t );
+ rtems_test_assert( rc == 0 );
+
+ puts( "Turn off flow control on output - OK" );
+ t.c_iflag &= ~IXON;
+ rc = tcsetattr( Test_fd, TCSANOW, &t );
+ rtems_test_assert( rc == 0 );
+
+ puts( "Turn on flow control on input - OK" );
+ t.c_iflag |= IXOFF;
+ rc = tcsetattr( Test_fd, TCSANOW, &t );
+ rtems_test_assert( rc == 0 );
+
+ puts( "Turn off flow control on input - OK" );
+ t.c_iflag &= ~IXOFF;
+ rc = tcsetattr( Test_fd, TCSANOW, &t );
+ rtems_test_assert( rc == 0 );
}
void close_it(void)