unit: STE Unit Tests
cover unit: STE Unit Tests
From: Sjur Brændeland <[email protected]>
This patch set introduces unit tests for functionality in
o CAIF RTNL functions in drivers/stemodem/caif_rtnl.c
o GPRS context handling in drivers/stemodem/gprs-context.c
o Radio State settings in drivers/stemodem/radio-settings.c
o Test for CAIF Character devices are removed as this is not supported by upstream version of CAIF.
The unit tests calls functions in the driver and simulates AT-responses received from the modem.
Patches should apply and compile cleanly. Successful execution depends on patches:
stemodem: Create network interfaces statically
stemodem: Use RTNL to create network interfaces.
Sjur Brændeland (2):
unit: CAIF test: remove character dev tests and add RTNL.
unit: Add unit tests for STE modem
Makefile.am | 19 ++- unit/test-caif.c | 108 +++++++---- unit/test-ste.c | 554 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 645 insertions(+), 36 deletions(-) create mode 100644 unit/test-ste.c
PATCH 1/2 unit: CAIF test: remove character dev tests and add RTNL.
From: Sjur Brændeland <[email protected]>
- Remove tests for CAIF Character device. Character devices are depreceated and replaced with Sockets.
- Add RTNL Tests for creating and removing CAIF GPRS Network Interface.
--- Makefile.am | 4 +- unit/test-caif.c | 108 +++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 77 insertions(+), 35 deletions(-)
Makefile.am +3 -1
@@ -474,7 +474,9 @@ unit_objects += $(unit_test_mux_OBJECTS) unit_test_caif_SOURCES = unit/test-caif.c $(gatchat_sources) \ drivers/stemodem/caif_socket.h \ - drivers/stemodem/if_caif.h + drivers/stemodem/caif_rtnl.c \ + drivers/stemodem/caif_rtnl.h \ + drivers/stemodem/if_caif.h unit_test_caif_LDADD = @GLIB_LIBS@ unit_objects += $(unit_test_caif_OBJECTS)
unit/test-caif.c +74 -34
174 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 2/2 unit: Add unit tests for STE modem
In reply to Sjur BrændelandFrom: Sjur Brændeland <[email protected]>
Add unit tests for AT handling in stemodem/radio-settings.c and stemodem/gprs-context.c. The tests integrates with gatchat and verifies AT commands sent to modem and simulates modem responses.
--- Makefile.am | 15 ++- unit/test-ste.c | 554 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 568 insertions(+), 1 deletions(-) create mode 100644 unit/test-ste.c
Makefile.am +14 -1
@@ -437,7 +437,7 @@ dist_man_MANS = doc/ofonod.8 noinst_PROGRAMS = unit/test-common unit/test-util unit/test-idmap \ unit/test-sms unit/test-simutil \ unit/test-mux unit/test-caif \ - unit/test-stkutil + unit/test-stkutil unit/test-ste unit_objects =
@@ -480,6 +480,19 @@ unit_test_caif_SOURCES = unit/test-caif.c $(gatchat_sources) \ unit_test_caif_LDADD = @GLIB_LIBS@ unit_objects += $(unit_test_caif_OBJECTS) +unit_test_ste_SOURCES = unit/test-ste.c $(gatchat_sources) \ + $(gdbus_sources) $(local_headers) \ + drivers/stemodem/stemodem.h \ + drivers/atmodem/atutil.h \ + drivers/atmodem/atutil.c \ + drivers/stemodem/radio-settings.c \ + drivers/stemodem/gprs-context.c \ + drivers/stemodem/caif_socket.h \ + drivers/stemodem/if_caif.h + +unit_test_ste_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ +unit_objects += $(unit_test_ste_OBJECTS) + noinst_PROGRAMS += tools/huawei-audio tools_huawei_audio_SOURCES = $(gdbus_sources) tools/huawei-audio.c
unit/test-ste.c new file +554 -0
554 lines not on this page · raw message
Signature · 1 line
1.7.0.4