diff options
Diffstat (limited to 'testsuites/libtests/termios06/init.c')
-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(); |