Commit Graph

113 Commits

Author SHA1 Message Date
Jakub Sitnicki
7552030ef9 build: add code coverage support
Build all targets, except for CLI tools (mmcli, uml290), with special
flags needed for collecting code coverage information when the build has
been configured with --enable-code-coverage.

Three new targets are available in the top build directory:

 - `check-code-coverage' runs the test suite and generates a code
   coverage report,

 - `code-coverage-capture' generates a code coverage report from already
   collected data, which can come in handy when one wants to see code
   paths touched by a particular test,

 - `code-coverage-clean' removes the collected coverage data and the
   generated reports.
2015-01-11 19:32:43 +01:00
Aleksander Morgado
f6b0fd3f7b libqcdm: new 'reset' tester
Just like 'modepref', but not doing any mode changes, just OFFLINE+RESET.
2014-07-03 16:21:31 +02:00
Aleksander Morgado
a691eec6ca build: avoid using 'INCLUDES' in Makefile.am
Avoids warnings during build; e.g.:
    warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2014-06-22 18:24:21 +02:00
Ben Chan
54b75e3bcd qcdm: fix memory leaks in tests 2014-05-29 10:05:45 +02:00
Yunlian Jiang
c48b97b118 libqcdm: use NULL instead of 0 for empty pointer
When I use clang 3.5 to build it, I got

commands.c:1444:16: error: expression which evaluates to zero treated as a
null
      pointer constant of type 'QcdmResult *' (aka 'struct QcdmResult *')
      [-Werror,-Wnon-literal-null-conversion]
        return FALSE;
               ^~~~~
./utils.h:29:15: note: expanded from macro 'FALSE'
#define FALSE ((u_int8_t) 0)
              ^~~~~~~~~~~~~~
commands.c:1464:20: error: expression which evaluates to zero treated as a
null
      pointer constant of type 'QcdmResult *' (aka 'struct QcdmResult *')
      [-Werror,-Wnon-literal-null-conversion]
            return FALSE;
                   ^~~~~
./utils.h:29:15: note: expanded from macro 'FALSE'
#define FALSE ((u_int8_t) 0)
              ^~~~~~~~~~~~~~
2 errors generated.
make[3]: *** [libqcdm_la-commands.lo] Error 1
make[3]: *** Waiting for unfinished jobs....

Below is the patch that fixes it
2014-02-06 03:18:15 -06:00
Bjørn Mork
f721c650d2 qcdm: add utility to display and set the "IPv6 enabled" variable
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:48 -06:00
Bjørn Mork
fa0fa1c647 qcdm: add IPv6 nvram setting to test suite
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:12 -06:00
Bjørn Mork
13552aa8b6 qcdm: add IPv6 nvram setting
Some Qualcomm firmwares disable IPv6 unless this flag is set in nvram, at
least for the LTE default bearer. The firmware will happily let you
configure the IPV6 and IPV4V6 PDP types, also including the default
profile, but any attempt to connect will fail.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:09 -06:00
Aleksander Morgado
2a922f836d build: remove unneeded GLIB_CHECK_VERSION checks, 2.32 already required 2013-06-18 16:55:29 +02:00
Aleksander Morgado
2ad39277d2 build: setup gtester based tests 2013-06-18 16:50:47 +02:00
Ben Chan
1f99eaf80e qcdm: remove unnecessary NULL check on free()
This patch removes a few unnecessary NULL checks on free(), which also fixes
the following clang warnings:

result.c:59:27: error: if statement has empty body [-Werror,-Wempty-body]
        if (v->u.u8_array);
                          ^
result.c:59:27: note: put the semicolon on a separate line to silence this warning
result.c:62:28: error: if statement has empty body [-Werror,-Wempty-body]
        if (v->u.u16_array);
                           ^
result.c:62:28: note: put the semicolon on a separate line to silence this warning

Bug reported on https://code.google.com/p/chromium/issues/detail?id=219280
Patched by Yunlian Jiang <yunlian@chromium.org>
2013-04-25 08:46:00 +02:00
Dan Williams
9fa5b9001a qcdm: fix CDMA1x Pilot Sets pilot handling
The helper functions got the return code of qcdm_result_* wrong
and thus failed all requests for pilot sets.
2013-04-17 17:21:28 -05:00
Dan Williams
372a49bbf6 qcdm: add unsolicited signal level indication from Samsung Z810 2013-04-05 10:33:16 -05:00
Dan Williams
b67a3948b5 qcdm: fix IM*I buffer sizes for GSM and WCDMA state info requests
Found by Enrico Murador.
2013-04-02 12:10:54 -05:00
Dan Williams
671d34cf92 qcdm: add auto-LTE modes for GSM and CDMA
as in, CDMA+EVDO+LTE and GSM+UMTS+LTE which were missing before.
2013-03-13 10:31:06 -05:00
Dan Williams
dd4be407b2 qcdm: modepref: reset device after setting mode preference
Otherwise it doesn't actually take until you unplug/replug.
2013-03-12 16:50:49 -05:00
Dan Williams
e390d21075 qcdm: add modepref utility
Sets and gets the NV "mode pref" item for allowed access
technologies.
2013-03-12 13:01:31 -05:00
Dan Williams
5efb1ceb5e qcdm: fix up NV Mode Pref item handling
While the QCDM and DIAG_NV are the same, in reality they shouldn't
be and there should be a mapping between them.  That wasn't happening,
so fix that up and add a few missing modes to the NV item defines.
2013-03-12 13:01:31 -05:00
Dan Williams
67fcac2541 qcdm: fix handling of active pilot set
Typo caused candidate or remaining sets to be treated as the
active pilot set.
2013-02-08 09:15:55 -06:00
Dan Williams
74e94e624d qcdm: add Novatel ERI subsystem support
Returns various ERI information like Indicator ID/Index, Icon
ID/Index, Icon Mode, and banner.
2013-02-06 11:57:00 -06:00
Dan Williams
bf07f02cff qcdm: rename Novatel subsystem defines 2013-02-06 11:57:00 -06:00
Dan Williams
7489951f88 qcdm: various LTE-related NV mode pref and sysmode updates 2013-01-14 13:50:27 -06:00
Dan Williams
3e39144100 qcdm: handle more test failures for NW subsystem
Bandrich C120 returns BAD_LENGTH rather than BAD_COMMAND, perhaps
because it re-uses the same subsystem number for something else.
2012-11-27 09:56:25 -06:00
Dan Williams
b74741e642 qcdm: get/set functions for hybrid preference 2012-11-14 11:11:03 -06:00
Dan Williams
773d0022d0 qcdm: trivial cleanup of log item numbers 2012-11-14 11:08:04 -06:00
Dan Williams
79652bb671 qcdm: clarify log item command length member 2012-11-14 11:07:57 -06:00
Dan Williams
fb65cba607 qcdm: add qcdm_cmd_control_new() to set operating mode 2012-09-27 10:55:20 -05:00
Dan Williams
946dcca4fc qcdm: add some EVDO log item numbers 2012-08-15 12:18:59 -05:00
Dan Williams
1e286f80ea qcdm: interpret MCC value from StatusSnapshot command 2012-08-08 16:23:02 -05:00
Dan Williams
5337b2277a qcdm: fix 1x/HDR mode pref and add GSM/UMTS mode prefs 2012-06-04 13:53:34 -05:00
Dan Williams
9fb8158279 qcdm: namespace stuff properly 2012-05-30 11:48:42 -05:00
Dan Williams
2e99aa2557 qcdm: decode some more log items 2012-02-17 13:06:11 -06:00
Dan Williams
4fd6264848 build: more libwmc and libqcdm standalone fixes
Make it pass distcheck.
2012-01-27 15:14:30 -06:00
Dan Williams
38498e3c5d qcdm: fix some build errors when building standalone 2012-01-24 11:32:20 -06:00
Dan Williams
0737a24f43 qcdm: clarify IMxI conversions a bit; fix up WCDMA L1 states 2012-01-21 11:23:17 -06:00
Dan Williams
c9a42d98c2 qcdm: add some mode prefs 2012-01-19 09:52:06 -06:00
Dan Williams
04e87e70ff qcdm: some devices do implement SW_VERSION
Like the MF627 for some reason.  Also, the format appears to be
more like the DM_CMD_VERSION_INFO response where at least the
comp_date and comp_time fields are the same size as
VERSION_INFO, just with some padding between.
2012-01-18 17:10:23 -06:00
Dan Williams
43e6039cee qcdm: GSM MCC, MNC, LAC and CI don't seem to valid in WCDMA mode
So don't bother trying to parse them.
2012-01-18 13:44:20 -06:00
Dan Williams
e08e46fb1a qcdm: let WCDMA/GSM devices pass CDMA-only tests
Obviously they don't implement the CDMA-only commands.
2012-01-18 13:25:00 -06:00
Dan Williams
178f30bdd3 qcdm: fill in some GSM and WCDMA stuff 2012-01-17 18:49:18 -06:00
Dan Williams
a6548ebe40 qcdm: start filling out log messages and items
Log messages are enabled by LOG_CONFIG and are then reported
as unsolicited responses with code DM_CMD_LOG.  Each log type
appears to have its own message format which are now being
added to log-items.h.
2012-01-12 13:00:52 -06:00
Dan Williams
474d9136ba qcdm: fix warning when no log codes are enabled 2012-01-11 17:55:10 -06:00
Dan Williams
bf31764bab qcdm: enhance LOG_CONFIG testcase 2012-01-11 16:10:37 -06:00
Dan Williams
b14044bc9a qcdm: only warn on unknown mode pref NV item values 2012-01-11 16:10:02 -06:00
Dan Williams
29a1385e6c qcdm: LOG_CONFIG fixups
Fix some buffer overruns.  Log codes are also 16-bit not 32.
2012-01-11 15:30:45 -06:00
Dan Williams
f3208bf3a6 qcdm: add support for Log Config command
This appears to be a newer version of EXT_LOGMASK that also
works with GSM/UMTS and other subsystems.
2012-01-11 14:25:23 -06:00
Dan Williams
b22b2d99db qcdm: add u16 arrays to results 2012-01-11 14:24:43 -06:00
Dan Williams
1804ae2fe5 qcdm: fix stringification of qcdm_xxx_if_fail() macros
Actually reading about preprocessor concatenation and stringification helps.
2012-01-11 12:53:06 -06:00
Dan Williams
2e2c8ad7ef qcdm: add some more commands
Found in CodeAurora diagchar_core.c driver.
2012-01-10 19:54:40 -06:00
Dan Williams
e98f2ebf40 qcdm: clarify some subsystems 2012-01-10 19:01:40 -06:00