diff options
author | Dan Williams <dcbw@redhat.com> | 2012-11-26 13:56:32 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-11-27 09:56:25 -0600 |
commit | 3e39144100315c5be83396d5ef2433be4b7ae203 (patch) | |
tree | 41c1213e67f25a6cfd521446a924f67869759c21 | |
parent | 33f440c88543c32b70b0ba9458dc047c35ad23c9 (diff) |
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.
-rw-r--r-- | libqcdm/tests/test-qcdm-com.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libqcdm/tests/test-qcdm-com.c b/libqcdm/tests/test-qcdm-com.c index bc299236..4fd0ad06 100644 --- a/libqcdm/tests/test-qcdm-com.c +++ b/libqcdm/tests/test-qcdm-com.c @@ -1646,14 +1646,16 @@ test_com_nw_subsys_modem_snapshot_cdma (void *f, void *data) g_print ("\n"); /* Parse the response into a result structure */ result = qcdm_cmd_nw_subsys_modem_snapshot_cdma_result (buf, reply_len, &err); if (!result) { /* Obviously not all devices implement this command */ - g_assert_cmpint (err, ==, -QCDM_ERROR_RESPONSE_BAD_COMMAND); - return; + if ( err == -QCDM_ERROR_RESPONSE_BAD_COMMAND + || err == -QCDM_ERROR_RESPONSE_BAD_LENGTH) + return; + g_assert_cmpint (err, ==, QCDM_SUCCESS); } g_assert (result); qcdm_result_get_u32 (result, QCDM_CMD_NW_SUBSYS_MODEM_SNAPSHOT_CDMA_ITEM_RSSI, &num32); g_message ("%s: RSSI: %d", __func__, num32); |