summaryrefslogtreecommitdiff
path: root/android/test-ipc.c
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2014-02-04 15:39:08 +0100
committerSzymon Janc <szymon.janc@gmail.com>2014-02-04 21:35:11 +0100
commit46ad7c46da740a002efc2aeb612f48a86862c388 (patch)
tree70fb7b8506d43af1a9b029f0392cbfe72e283978 /android/test-ipc.c
parentce6444c8bd1468c8028c8ccb41e7243ce9d2eb24 (diff)
downloadbluez-46ad7c46da740a002efc2aeb612f48a86862c388.tar.gz
android/unit: Add case for sending incomplete header
Header size is the bare minimum that should always be sent.
Diffstat (limited to 'android/test-ipc.c')
-rw-r--r--android/test-ipc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/android/test-ipc.c b/android/test-ipc.c
index e4463ebd2..d05544dba 100644
--- a/android/test-ipc.c
+++ b/android/test-ipc.c
@@ -461,6 +461,15 @@ static const struct test_data test_cmd_opcode_invalid_1 = {
.expected_signal = SIGTERM
};
+static const struct test_data test_cmd_hdr_invalid = {
+ .cmd = &test_cmd_1_hdr,
+ .cmd_size = sizeof(test_cmd_1_hdr) - 1,
+ .service = 0,
+ .handlers = cmd_handlers,
+ .handlers_size = 1,
+ .expected_signal = SIGTERM
+};
+
#define VARDATA_EX1 "some data example"
struct vardata {
@@ -556,6 +565,9 @@ int main(int argc, char *argv[])
g_test_add_data_func("/android_ipc/test_cmd_service_offrange",
&test_cmd_service_offrange,
test_cmd_reg);
+ g_test_add_data_func("/android_ipc/test_cmd_hdr_invalid",
+ &test_cmd_hdr_invalid,
+ test_cmd_reg);
return g_test_run();
}