diff --git a/doc/test-coverage.txt b/doc/test-coverage.txt
index c979cad..3507520 100644
--- a/doc/test-coverage.txt
+++ b/doc/test-coverage.txt
smp-tester 4 Kernel SMP implementation testing
sco-tester 8 Kernel SCO implementation testing
gap-tester 1 Daemon D-Bus API testing
-hci-tester 9 Controller hardware testing
+hci-tester 10 Controller hardware testing
-----
- 191
+ 200
Android end-to-end testing
diff --git a/tools/hci-tester.c b/tools/hci-tester.c
index b4275b7..8676995 100644
--- a/tools/hci-tester.c
+++ b/tools/hci-tester.c
user->index = 0; \
tester_add_full(name, data, \
test_pre_setup, setup, func, NULL, \
- test_post_teardown, 2, user, test_data_free); \
+ test_post_teardown, 30, user, test_data_free); \
} while (0)
static void setup_features_complete(const void *data, uint8_t size,
test_command(BT_HCI_CMD_READ_LOCAL_CODECS);
}
+static void test_inquiry_complete(const void *data, uint8_t size,
+ void *user_data)
+{
+ tester_test_passed();
+}
+
+static void test_inquiry_status(const void *data, uint8_t size,
+ void *user_data)
+{
+ uint8_t status = *((uint8_t *) data);
+
+ if (status) {
+ tester_warn("HCI inquiry command failed (0x%02x)", status);
+ tester_test_failed();
+ return;
+ }
+}
+
+static void test_inquiry_liac(const void *test_data)
+{
+ struct test_data *data = tester_get_data();
+ struct bt_hci_cmd_inquiry cmd;
+
+ bt_hci_register(data->hci, BT_HCI_EVT_INQUIRY_COMPLETE,
+ test_inquiry_complete, NULL, NULL);
+
+ cmd.lap[0] = 0x00;
+ cmd.lap[1] = 0x8b;
+ cmd.lap[2] = 0x9e;
+ cmd.length = 0x08;
+ cmd.num_resp = 0x00;
+
+ if (!bt_hci_send(data->hci, BT_HCI_CMD_INQUIRY, &cmd, sizeof(cmd),
+ test_inquiry_status, NULL, NULL)) {
+ tester_warn("Failed to send HCI inquiry command");
+ tester_test_failed();
+ return;
+ }
+}
+
int main(int argc, char *argv[])
{
tester_init(&argc, &argv);
test_hci("Read Local Supported Codecs", NULL, NULL,
test_read_local_supported_codecs);
+ test_hci("Inquiry (LIAC)", NULL, NULL, test_inquiry_liac);
+
return tester_run();
}