Commit Graph

307 Commits

Author SHA1 Message Date
Sergey Matyukevich cfcb6a7d9c unit: add validate_utf8_tlv tests 2021-01-19 10:05:05 -06:00
Denis Kenzior e3585383be unit: Update to the new stkutil api 2018-12-29 14:15:04 -06:00
Denis Kenzior 5e1471d3eb unit: Use l_util_hexstring instead of encode_hex 2018-12-27 18:18:51 -06:00
Denis Kenzior 2984391b31 unit: Switch decode_hex to l_util_from_hexstring 2018-12-27 18:18:51 -06:00
Denis Kenzior 9396120cf9 unit: Update to use l_free instead of g_free
Previous commit changes character conversion functions to use ell memory
allocation routines.  Update all uses to free memory using the same.
2018-12-27 18:18:51 -06:00
Denis Kenzior b99c15f8e2 unit: Fix memory leak 2018-12-27 18:18:51 -06:00
Denis Kenzior 351088e185 unit: Convert to new convert_utf8_to_gsm API 2018-12-27 18:18:51 -06:00
Denis Kenzior c4b073aa89 unit: Update to the new convert_ucs2_to_gsm API 2018-12-27 18:18:51 -06:00
Denis Kenzior 71544d7fe1 unit: convert usage of g_test_verbose
Convert all usages of this function in favor of using a static VERBOSE
variable.  We almost never use verbose output except while debugging.

Additionally this allows us to more easily convert all unit tests to the
ell unit test framework
2018-12-27 18:18:51 -06:00
Denis Kenzior 538804e191 unit: Update to the new pack_7bit/unpack_7bit api 2018-12-27 18:18:51 -06:00
Denis Kenzior ea172514a2 unit: update to the new util api 2018-12-27 18:18:51 -06:00
Denis Kenzior ed26a0e7a9 unit: Remove test-idmap
No longer used by ofono
2018-12-19 14:46:08 -06:00
Jonas Bonn 3beeff758d treewide: Remove superfluous use of _GNU_SOURCE
There are a large number of files in the tree that define _GNU_SOURCE
despite not actually using features hidden behind this flag.  This patch
removes all these definitions in one fell swoop...
2018-10-17 10:01:57 -05:00
Denis Kenzior 3a1b47aafb unit: Fix gcc warning
In file included from unit/test-mbim.c:28:0:
unit/test-mbim.c: In function ‘parse_device_caps’:
unit/test-mbim.c:332:9: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  assert(cellular_class = 1);
2018-04-24 11:51:51 -05:00
Denis Kenzior 497e38f237 unit: Use sim_app_record_free to avoid memleaks 2018-02-28 11:08:29 -06:00
James Prestwood 62382e8ac3 unit: fix test-simutil failure
A fixup was made in simauth to fix the AUTS length
and the simutil unit test was never updated to reflect
the length change.
2018-01-19 12:50:53 -06:00
Slava Monich 007a855bab unit: Improve idmap.c unit test coverage
This brings function, line and branch coverage for idmap.c to 100%
2018-01-18 14:41:47 -06:00
Denis Kenzior 644df2dcc7 unit: Add ip configuration query sanity check 2017-11-13 21:24:37 -06:00
Denis Kenzior 24a5de0e28 unit: Add mbim packet service notification test 2017-11-13 21:24:37 -06:00
Denis Kenzior 8bf5a3e353 unit: Add Device Subscribe List set build test 2017-11-08 21:41:34 -06:00
Denis Kenzior d7423bdf90 unit: Add SMS Send parse test 2017-11-08 21:41:34 -06:00
Denis Kenzior 1d7a41205b unit: Add SMS Read response tests 2017-11-08 21:02:22 -06:00
Denis Kenzior 1bf22999e5 unit: Fix fragmenting messages < frag_size 2017-11-08 21:02:22 -06:00
Denis Kenzior ee34967a52 unit: Fix up style issues 2017-10-11 10:29:16 -05:00
James Prestwood 43ca69afbb unit: add gsm and umts parse/build unit tests 2017-10-11 10:29:16 -05:00
Denis Kenzior 0b606acde2 unit: Add device caps query build test 2017-10-05 11:08:38 -05:00
Denis Kenzior 5f6a0147ba unit: Add phonebook read build test 2017-10-05 11:08:38 -05:00
Denis Kenzior 0ce051f890 unit: Add subscriber ready build test 2017-10-05 11:08:38 -05:00
Denis Kenzior 95ac1efb13 unit: print mbim messages for easier debugging 2017-10-05 11:08:38 -05:00
Denis Kenzior dc19edbeb4 unit: Add device_caps build test 2017-10-05 11:08:38 -05:00
Denis Kenzior 7ce3f9a401 unit: Add phonebook read parse test 2017-10-05 11:08:38 -05:00
Denis Kenzior bc239450b6 unit: Add subscriber ready status test 2017-10-05 11:08:38 -05:00
Denis Kenzior bbb9f33253 unit: Add test-mbim 2017-10-05 11:08:38 -05:00
Slava Monich 1878f6954d unit: Avoid use of uninitialised data in test-simutil
GTest: run: /testsimutil/ber tlv encode EFpnn
==16777== Conditional jump or move depends on uninitialised value(s)
==16777==    at 0x4068CB: ber_tlv_iter_next (simutil.c:369)
==16777==    by 0x406C39: ber_tlv_find_by_tag (simutil.c:483)
==16777==    by 0x407E1D: sim_eons_add_pnn_record (simutil.c:1027)
==16777==    by 0x402C39: test_ber_tlv_builder_efpnn (test-simutil.c:181)
==16777==    by 0x4EA3A80: g_test_run_suite_internal
==16777==    by 0x4EA3F9A: g_test_run_suite
==16777==    by 0x4EA3FD0: g_test_run
==16777==    by 0x4042FA: main (test-simutil.c:518)
2017-08-24 17:28:17 -05:00
Lukasz Nowak 975a4df862 unit: rilmodem-test - add missing string.h
Remove warnings of undeclared memcpy, strncpy, etc.
2017-03-28 11:57:26 -05:00
Slava Monich a011fea4a4 unit: test-sms: Fix memory leaks in the unit test 2016-12-30 18:13:06 -06:00
Alfonso Sánchez-Beato 8062417071 unit: add rilmodem gprs tests
Add rilmodem gprs tests, which use the rilmodem test engine.
2016-10-25 11:51:43 -05:00
Alfonso Sánchez-Beato 6429e9178d unit: add rilmodem test engine
Add rilmodem test engine. This engine is an improvement on the rilmodem
test server that allows us to test generic interactions with the
rilmodem driver. Instead of just be able to check content of received/
sent bytes on the rild socket, we can now specify a set of steps for a
test that include interactions with the atom. The step types are

- TST_ACTION_SEND: The harness sends a parcel
- TST_ACTION_CALL: The harness calls a driver function
- TST_EVENT_RECEIVE: The driver sends a parcel
- TST_EVENT_CALL: The driver calls a harness (atom) function
2016-10-25 11:51:43 -05:00
John Ernberg 4ae734ef6f unit: Use g_slist_free_full 2016-04-22 15:37:26 -05:00
Kuba Pawlak eb23a88956 unit: fix GCC 6.0 compilation issues
-Werror=unused-const-variable
2016-04-18 09:59:09 -05:00
Tony Espy 96b4f76205 unit: add new test-rilmodem-cb 2015-12-15 12:22:38 -06:00
Tony Espy 0967040809 unit: update test-rilmodem-sms set_sca test case
Update test-rilmodem-sms set_sca test case to take
into account additional quotes used for sending
a SET_SMSC_ADDRESS request.
2015-12-04 16:25:20 -06:00
Tony Espy c4c82c5da9 unit: add new test-rilmodem-sms test cases
Add new test-rilmodem-sms test cases for the remaining
untested atom functions, including two tests for incoming
SMS unsolicited responses. Also updated test-rilmodem-cs
due to rilmodem-test-server changes.
2015-11-29 15:48:26 -06:00
Tony Espy 1d07e484ab unit: add write support to rilmodem-test-server
This change adds write support to the rilmodem-test-server
in order to support testing receipt of unsolicted RIL
responses.
2015-11-29 15:48:22 -06:00
Tony Espy e847d6f204 unit: re-factor test-rilmodem-cs server logic
Use the new rilmodem-test-server functions.
2015-11-19 16:33:14 -06:00
Tony Espy d0cc848026 unit: add new test-rilmodem-sms 2015-11-19 16:33:14 -06:00
Tony Espy 54a630477d unit: add new test rilmodem-cs
This commit adds a new style of build-time/unit test to
rilmodem.  These tests setup a dummy server socket and
attach a gril instance to it.  This allows rilmodem
call-settings atom functions to be tested directly,
validating request parcels received by the server-side,
and callbacks that happen in response to canned responses
sent by the server-side.
2015-11-05 14:46:47 -06:00
Tommi Kenakkala 42deee76a1 unit: Add test to encode / decode 11 char TP-OA 2015-02-13 09:55:16 -06:00
Alfonso Sanchez-Beato 352e3ebb76 unit: Fix test to use valid EF_PNN
test-simutil was not using EF_PNN files with a valid format.
2014-03-14 12:24:26 -05:00
Marcel Holtmann c86997223a unit: Ignore errors about deprecated g_test_trap_fork 2013-12-21 13:27:36 -08:00