Bluetooth: Add skeleton for SMP self-tests
This patch adds the initial skeleton and kernel config option for SMP
self-tests.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
diff --git a/net/bluetooth/selftest.c b/net/bluetooth/selftest.c
index b9cb33c..a7602b3 100644
--- a/net/bluetooth/selftest.c
+++ b/net/bluetooth/selftest.c
@@ -22,8 +22,10 @@
*/
#include <net/bluetooth/bluetooth.h>
+#include <net/bluetooth/hci_core.h>
#include "ecc.h"
+#include "smp.h"
#include "selftest.h"
#if IS_ENABLED(CONFIG_BT_SELFTEST_ECDH)
@@ -195,7 +197,12 @@
BT_INFO("Starting self testing");
err = test_ecdh();
+ if (err)
+ goto done;
+ err = bt_selftest_smp();
+
+done:
BT_INFO("Finished self testing");
return err;