diff --git a/android/test-ipc.c b/android/test-ipc.c
index cb6f518..a2d3085 100644
--- a/android/test-ipc.c
+++ b/android/test-ipc.c
struct test_data {
uint32_t expected_signal;
- const struct hal_hdr *cmd;
+ const void *cmd;
uint16_t cmd_size;
uint8_t service;
const struct ipc_handler *handlers;
{
struct context *context = user_data;
const struct test_data *test_data = context->data;
+ const struct hal_hdr *sent_msg = test_data->cmd;
uint8_t buf[128];
int sk;
+ struct hal_hdr success_resp = {
+ .service_id = sent_msg->service_id,
+ .opcode = sent_msg->opcode,
+ .len = 0,
+ };
+
g_assert(test_data->expected_signal == 0);
if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL)) {
sk = g_io_channel_unix_get_fd(io);
- g_assert(read(sk, buf, sizeof(buf)) == test_data->cmd_size);
- g_assert(!memcmp(test_data->cmd, buf, test_data->cmd_size));
+ g_assert(read(sk, buf, sizeof(buf)) == sizeof(struct hal_hdr));
+ g_assert(!memcmp(&success_resp, buf, sizeof(struct hal_hdr)));
context_quit(context);