Lines Matching refs:chan

34 static int crasher_connect(handle_t* chan) {  in crasher_connect()  argument
35 return tipc_connect(chan, CRASHER_PORT); in crasher_connect()
38 static int crasher_command(handle_t chan, enum crasher_command cmd) { in crasher_command() argument
45 ret = tipc_send1(chan, &msg, sizeof(msg)); in crasher_command()
49 ret = wait(chan, &evt, INFINITE_TIME); in crasher_command()
62 ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in crasher_command()
76 handle_t chan = INVALID_IPC_HANDLE; in TEST() local
77 ASSERT_EQ(crasher_connect(&chan), 0); in TEST()
78 ASSERT_EQ(crasher_command(chan, CRASHER_NOP), 0); in TEST()
81 close(chan); in TEST()
121 handle_t chan = INVALID_IPC_HANDLE; in TEST() local
122 ASSERT_EQ(crasher_connect(&chan), 0); in TEST()
123 ASSERT_EQ(crasher_command(chan, CRASHER_READ_NULL_PTR), ERR_CHANNEL_CLOSED); in TEST()
126 close(chan); in TEST()
131 handle_t chan = INVALID_IPC_HANDLE; in TEST() local
132 ASSERT_EQ(crasher_connect(&chan), 0); in TEST()
133 ASSERT_EQ(crasher_command(chan, CRASHER_BRK), ERR_CHANNEL_CLOSED); in TEST()
136 close(chan); in TEST()
141 handle_t chan = INVALID_IPC_HANDLE; in TEST() local
142 ASSERT_EQ(crasher_connect(&chan), 0); in TEST()
143 ASSERT_EQ(crasher_command(chan, CRASHER_READ_BAD_PTR), ERR_CHANNEL_CLOSED); in TEST()
146 close(chan); in TEST()
150 handle_t chan = INVALID_IPC_HANDLE; in TEST() local
151 ASSERT_EQ(crasher_connect(&chan), 0); in TEST()
152 ASSERT_EQ(crasher_command(chan, CRASHER_WRITE_BAD_PTR), ERR_CHANNEL_CLOSED); in TEST()
155 close(chan); in TEST()
159 handle_t chan = INVALID_IPC_HANDLE; in TEST() local
160 ASSERT_EQ(crasher_connect(&chan), 0); in TEST()
161 ASSERT_EQ(crasher_command(chan, CRASHER_WRITE_RO_PTR), ERR_CHANNEL_CLOSED); in TEST()
164 close(chan); in TEST()
168 handle_t chan = INVALID_IPC_HANDLE; in TEST() local
169 ASSERT_EQ(crasher_connect(&chan), 0); in TEST()
170 ASSERT_EQ(crasher_command(chan, CRASHER_EXEC_RODATA), ERR_CHANNEL_CLOSED); in TEST()
173 close(chan); in TEST()
177 handle_t chan = INVALID_IPC_HANDLE; in TEST() local
178 ASSERT_EQ(crasher_connect(&chan), 0); in TEST()
179 ASSERT_EQ(crasher_command(chan, CRASHER_EXEC_DATA), ERR_CHANNEL_CLOSED); in TEST()
182 close(chan); in TEST()