Changeset 902ffed in rtems
- Timestamp:
- 02/24/17 13:56:51 (7 years ago)
- Branches:
- 5, master
- Children:
- f71ccc34
- Parents:
- 36635433
- git-author:
- Sebastian Huber <sebastian.huber@…> (02/24/17 13:56:51)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (02/28/17 08:09:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/libtests/termios09/init.c
r36635433 r902ffed 1066 1066 sc = rtems_task_delete(ctx->flush_task_id); 1067 1067 rtems_test_assert(sc == RTEMS_SUCCESSFUL); 1068 } 1069 1070 static void test_tx_callback(test_context *ctx) 1071 { 1072 size_t i = INTERRUPT; 1073 device_context *dev = &ctx->devices[i]; 1074 char c; 1075 ssize_t n; 1076 1077 clear_output(ctx, i); 1078 dev->callback_counter = 0; 1079 dev->tty->tty_snd.sw_pfn = callback; 1080 dev->tty->tty_snd.sw_arg = dev; 1081 1082 c = 'a'; 1083 n = write(ctx->fds[i], &c, sizeof(c)); 1084 rtems_test_assert(n == 1); 1085 rtems_test_assert(dev->callback_counter == 0); 1086 flush_output(ctx, i); 1087 rtems_test_assert(dev->callback_counter == 1); 1088 rtems_test_assert(dev->output_count == 1); 1089 rtems_test_assert(dev->output_buf[0] == 'a'); 1090 1091 dev->tty->tty_snd.sw_pfn = NULL; 1092 dev->tty->tty_snd.sw_arg = NULL; 1068 1093 } 1069 1094 … … 1091 1116 test_olcuc(ctx); 1092 1117 test_write(ctx); 1118 test_tx_callback(ctx); 1093 1119 1094 1120 TEST_END();
Note: See TracChangeset
for help on using the changeset viewer.