Skip to content

Commit a71cadf

Browse files
alwa-nordickartben
authored andcommitted
Bluetooth: testlib: Fix includes (IWYU)
This commit fixes all includes in testlib according to IWYU rules and sorts all includes in ascending order by name. Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
1 parent eb5597e commit a71cadf

File tree

15 files changed

+70
-31
lines changed

15 files changed

+70
-31
lines changed

tests/bluetooth/common/testlib/include/testlib/addr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#define ZEPHYR_TESTS_BLUETOOTH_COMMON_TESTLIB_INCLUDE_TESTLIB_ADDR_H_
77

88
#include <stdint.h>
9-
109
#include <zephyr/bluetooth/addr.h>
1110
#include <zephyr/bluetooth/byteorder.h>
1211

tests/bluetooth/common/testlib/include/testlib/att_read.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
#define ZEPHYR_TESTS_BLUETOOTH_COMMON_TESTLIB_INCLUDE_TESTLIB_ATT_READ_H_
77

88
#include <stdint.h>
9+
#include <zephyr/bluetooth/att.h>
10+
#include <zephyr/bluetooth/bluetooth.h>
911
#include <zephyr/bluetooth/gatt.h>
12+
#include <zephyr/bluetooth/uuid.h>
13+
#include <zephyr/net_buf.h>
1014

1115
/** Perform a single ATT_READ_BY_TYPE_REQ. */
1216
int bt_testlib_att_read_by_type_sync(struct net_buf_simple *result_data, uint16_t *result_size,

tests/bluetooth/common/testlib/include/testlib/att_write.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#define ZEPHYR_TESTS_BLUETOOTH_COMMON_TESTLIB_INCLUDE_TESTLIB_ATT_WRITE_H_
77

88
#include <stdint.h>
9+
#include <zephyr/bluetooth/att.h>
10+
#include <zephyr/bluetooth/bluetooth.h>
911
#include <zephyr/bluetooth/gatt.h>
1012

1113
int bt_testlib_att_write(struct bt_conn *conn, enum bt_att_chan_opt bearer, uint16_t handle,

tests/bluetooth/common/testlib/include/testlib/conn.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef ZEPHYR_TESTS_BLUETOOTH_COMMON_TESTLIB_INCLUDE_TESTLIB_CONN_H_
66
#define ZEPHYR_TESTS_BLUETOOTH_COMMON_TESTLIB_INCLUDE_TESTLIB_CONN_H_
77

8+
#include <stdint.h>
9+
#include <zephyr/bluetooth/addr.h>
810
#include <zephyr/bluetooth/conn.h>
911

1012
/**

tests/bluetooth/common/testlib/include/testlib/log_utils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
#ifndef ZEPHYR_TESTS_BLUETOOTH_COMMON_TESTLIB_INCLUDE_TESTLIB_LOG_UTILS_H_
66
#define ZEPHYR_TESTS_BLUETOOTH_COMMON_TESTLIB_INCLUDE_TESTLIB_LOG_UTILS_H_
77

8+
#include <stddef.h>
9+
#include <stdint.h>
10+
#include <zephyr/autoconf.h>
11+
#include <zephyr/logging/log_core.h>
812
#include <zephyr/logging/log_ctrl.h>
913
#include <zephyr/sys/__assert.h>
14+
#include <zephyr/sys/util_macro.h>
1015

1116
static inline void bt_testlib_log_level_set(char *module, uint32_t new_level)
1217
{

tests/bluetooth/common/testlib/src/adv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
* SPDX-License-Identifier: Apache-2.0
33
*/
44

5+
#include <stddef.h>
56
#include <stdint.h>
7+
#include <string.h>
68
#include <zephyr/bluetooth/bluetooth.h>
79
#include <zephyr/bluetooth/conn.h>
8-
#include <zephyr/bluetooth/gatt.h>
10+
#include <zephyr/bluetooth/gap.h>
911
#include <zephyr/bluetooth/gatt.h>
1012
#include <zephyr/bluetooth/l2cap.h>
1113
#include <zephyr/bluetooth/uuid.h>
1214
#include <zephyr/kernel.h>
13-
#include <zephyr/kernel.h>
1415
#include <zephyr/sys/__assert.h>
1516

1617
struct bt_testlib_adv_ctx {

tests/bluetooth/common/testlib/src/att.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#include <zephyr/kernel.h>
8-
7+
#include <stddef.h>
8+
#include <stdint.h>
9+
#include <zephyr/bluetooth/addr.h>
10+
#include <zephyr/bluetooth/att.h>
911
#include <zephyr/bluetooth/bluetooth.h>
1012
#include <zephyr/bluetooth/conn.h>
1113
#include <zephyr/bluetooth/gatt.h>
12-
#include <zephyr/bluetooth/att.h>
13-
14+
#include <zephyr/kernel.h>
15+
#include <zephyr/logging/log_core.h>
1416
#include <zephyr/logging/log.h>
17+
#include <zephyr/sys/__assert.h>
1518

1619
LOG_MODULE_REGISTER(bt_testlib_att, LOG_LEVEL_DBG);
1720

tests/bluetooth/common/testlib/src/att_read.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
33
*/
44

55
#include <stdint.h>
6+
#include <testlib/att_read.h>
7+
#include <zephyr/autoconf.h>
8+
#include <zephyr/bluetooth/att.h>
69
#include <zephyr/bluetooth/bluetooth.h>
710
#include <zephyr/bluetooth/conn.h>
811
#include <zephyr/bluetooth/gatt.h>
9-
#include <zephyr/bluetooth/att.h>
1012
#include <zephyr/bluetooth/l2cap.h>
1113
#include <zephyr/bluetooth/uuid.h>
1214
#include <zephyr/kernel.h>
13-
#include <zephyr/sys/__assert.h>
14-
15-
#include <testlib/att_read.h>
15+
#include <zephyr/logging/log_core.h>
1616
#include <zephyr/logging/log.h>
17+
#include <zephyr/net_buf.h>
18+
#include <zephyr/sys/__assert.h>
19+
#include <zephyr/sys/util_macro.h>
20+
#include <zephyr/sys/util.h>
1721

1822
LOG_MODULE_REGISTER(bt_testlib_att_read, LOG_LEVEL_DBG);
1923

tests/bluetooth/common/testlib/src/att_write.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33
*/
44

55
#include <stdint.h>
6+
#include <zephyr/bluetooth/att.h>
67
#include <zephyr/bluetooth/bluetooth.h>
78
#include <zephyr/bluetooth/conn.h>
89
#include <zephyr/bluetooth/gatt.h>
9-
#include <zephyr/bluetooth/att.h>
1010
#include <zephyr/bluetooth/l2cap.h>
1111
#include <zephyr/bluetooth/uuid.h>
1212
#include <zephyr/kernel.h>
13+
#include <zephyr/logging/log_core.h>
14+
#include <zephyr/logging/log.h>
1315
#include <zephyr/sys/__assert.h>
16+
#include <zephyr/sys/util.h>
1417

15-
#include <zephyr/logging/log.h>
1618
LOG_MODULE_REGISTER(bt_testlib_att_write, LOG_LEVEL_DBG);
1719

1820
struct bt_testlib_att_write_closure {

tests/bluetooth/common/testlib/src/conn_ref.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
*/
44

55
#include <stddef.h>
6-
6+
#include <stdint.h>
7+
#include <testlib/conn.h>
78
#include <zephyr/bluetooth/conn.h>
9+
#include <zephyr/sys/__assert.h>
810
#include <zephyr/sys/atomic_builtin.h>
911

10-
#include <testlib/conn.h>
11-
1212
/**
1313
* @file
1414
* @brief Reified connection reference counting.

0 commit comments

Comments
 (0)