diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-19 13:54:47 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-19 13:54:47 +0000 |
commit | 78da8ac3965fd42f11595f3d723386c46f2f0714 (patch) | |
tree | 1514fb31319d13a7013dcefffc9bd7e9d81dc261 /testsuites/libtests/termios06 | |
parent | 2010-07-19 Bharath Suri <bharath.s.jois@gmail.com> (diff) | |
download | rtems-78da8ac3965fd42f11595f3d723386c46f2f0714.tar.bz2 |
2010-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, termios06/init.c: Add initial tests for
XON/XOFF and VMIN/VMAX cases.
* termios07/.cvsignore, termios07/Makefile.am, termios07/init.c,
termios07/termios07.doc, termios07/termios07.scn,
termios08/.cvsignore, termios08/Makefile.am, termios08/init.c,
termios08/termios08.doc, termios08/termios08.scn: New files.
Diffstat (limited to 'testsuites/libtests/termios06')
-rw-r--r-- | testsuites/libtests/termios06/init.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testsuites/libtests/termios06/init.c b/testsuites/libtests/termios06/init.c index 4569f6b052..10b5d014f5 100644 --- a/testsuites/libtests/termios06/init.c +++ b/testsuites/libtests/termios06/init.c @@ -19,6 +19,7 @@ #include <unistd.h> #include <sys/ioctl.h> #include <rtems/dumpbuf.h> +#include <rtems/termiostypes.h> void pppasyncattach(void); void ppp_test_driver_set_rx( const char *expected, size_t len ); @@ -34,6 +35,39 @@ void open_it(void) rtems_test_assert( Test_fd != -1 ); } +void Rx_Wake( + struct termios *tty, + void *arg +) +{ + printk( "Rx_Wake - invoked\n" ); +} + +void Tx_Wake( + struct termios *tty, + void *arg +) +{ + printk( "Tx_Wake - invoked\n" ); +} + +struct ttywakeup RxWake = { Rx_Wake, NULL }; +struct ttywakeup TxWake = { Tx_Wake, NULL }; + +void set_wakeups(void) +{ + int sc; + + puts( "ioctl - RTEMS_IO_SNDWAKEUP - OK" ); + sc = ioctl( Test_fd, RTEMS_IO_SNDWAKEUP, &TxWake ); + rtems_test_assert( sc == 0 ); + + puts( "ioctl - RTEMS_IO_RCVWAKEUP - OK" ); + sc = ioctl( Test_fd, RTEMS_IO_RCVWAKEUP, &RxWake ); + rtems_test_assert( sc == 0 ); + +} + void set_discipline(void) { int pppdisc = PPPDISC; @@ -116,6 +150,7 @@ rtems_task Init( pppasyncattach(); open_it(); + set_wakeups(); set_discipline(); write_it(); ioctl_it(); |