Skip to contentSkip to conversation

tools/ioctl-tester - Add ioctl-tester

PATCH Superseded Tedd Ho-Jeong An 2 participants 2 messages Sep 21, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/ioctl-tester - Add ioctl-tester

From: Tedd Ho-Jeong An <[email protected]>

This patch adds ioctl-tester which tests the IOCTL commands.

HCI Down
Device List
Device List - Invalid Param 1
Device Info
Reset Stat
Set Link Mode - ACCEPT
Set Link Mode - MASTER
Set Pkt Type - DM
Set Pkt Type - DH
Set Pkt Type - HV
Set Pkt Type - 2-DH
Set Pkt Type - 2-DH
Set Pkt Type - ALL
Set ACL MTU - 1
Set ACL MTU - 2
Set SCO MTU - 1
Set SCO MTU - 2
Block BDADDR - Success
Block BDADDR - Fail
Unblock BDADDR - Success
Unblock BDADDR - Fail
Connection List - No Conn
Connection List
Connection Info
Connection Info - No Connection
Connection Info - Wrong Type
Authentication Info - No Connection
Authentication Info

---
 Makefile.tools       |  11 +-
 tools/ioctl-tester.c | 955 +++++++++++++++++++++++++++++++++++++++++++
 tools/test-runner.c  |   2 +
 3 files changed, 967 insertions(+), 1 deletion(-)
 create mode 100644 tools/ioctl-tester.c
Makefile.tools +10 -1
index f4b951474..a99d768dc 100644
@@ -87,7 +87,7 @@ noinst_PROGRAMS += emulator/btvirt emulator/b1ee emulator/hfp \
 					tools/smp-tester tools/hci-tester \
 					tools/rfcomm-tester tools/bnep-tester \
 					tools/userchan-tester tools/iso-tester \
-					tools/mesh-tester
+					tools/mesh-tester tools/ioctl-tester
 
 emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \
 				emulator/serial.h emulator/serial.c \
@@ -213,6 +213,15 @@ tools_iso_tester_SOURCES = tools/iso-tester.c monitor/bt.h \
 				emulator/smp.c
 tools_iso_tester_LDADD = lib/libbluetooth-internal.la \
 				src/libshared-glib.la $(GLIB_LIBS)
+
+tools_ioctl_tester_SOURCES = tools/ioctl-tester.c monitor/bt.h \
+				emulator/hciemu.h emulator/hciemu.c \
+				emulator/vhci.h emulator/vhci.c \
+				emulator/btdev.h emulator/btdev.c \
+				emulator/bthost.h emulator/bthost.c \
+				emulator/smp.c
+tools_ioctl_tester_LDADD = lib/libbluetooth-internal.la \
+				src/libshared-glib.la $(GLIB_LIBS)
 endif
 
 if TOOLS
tools/ioctl-tester.c new file +955 -0

955 lines not on this page · raw message

tools/test-runner.c +2 -0
index e1794e8c1..560d638e4 100644
@@ -615,6 +615,7 @@ static const char *test_table[] = {
 	"sco-tester",
 	"iso-tester",
 	"mesh-tester",
+	"ioctl-tester",
 	"bnep-tester",
 	"check-selftest",
 	"tools/mgmt-tester",
@@ -624,6 +625,7 @@ static const char *test_table[] = {
 	"tools/sco-tester",
 	"tools/iso-tester",
 	"tools/mesh-tester",
+	"tools/ioctl-tester",
 	"tools/bnep-tester",
 	"tools/check-selftest",
 	NULL
Signature · 1 line
2.34.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=678840

---Test result---

Test Summary:

CheckPatch                    PASS      2.16 seconds
GitLint                       PASS      0.78 seconds
Prep - Setup ELL              PASS      33.10 seconds
Build - Prep                  PASS      0.93 seconds
Build - Configure             PASS      10.37 seconds
Build - Make                  PASS      1118.93 seconds
Make Check                    PASS      12.50 seconds
Make Check w/Valgrind         PASS      349.69 seconds
Make Distcheck                PASS      291.85 seconds
Build w/ext ELL - Configure   PASS      10.42 seconds
Build w/ext ELL - Make        PASS      106.25 seconds
Incremental Build w/ patches  PASS      0.00 seconds
Scan Build                    WARNING   735.25 seconds

Details
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches. Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************
tools/ioctl-tester.c:561:17: error: initializer element is not a compile-time constant

        .conn_info = { conn_info_1 },
                       ^~~~~~~~~~~
tools/ioctl-tester.c:572:17: error: initializer element is not a compile-time constant
        .conn_info = { conn_info_1 },
                       ^~~~~~~~~~~

2 errors generated.

---
Regards,
Linux Bluetooth