aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-03-30 00:57:15 -0700
committerDan Williams <dcbw@redhat.com>2010-03-30 00:57:15 -0700
commita7e7854171e5029e43b2442c9e25814b59cd7c67 (patch)
treed7e074f08b65e485e2227e404d71e8d4308ad0f3
parent41c2e0a946f6d0d14805cdea60d5d03ec67f3fb2 (diff)
qcdm: don't fail testcase on unknown mode pref values
EC168C has a value of 0x16 for mode pref, which is unknown. But that shouldn't fail the testcases.
-rw-r--r--libqcdm/tests/test-qcdm-com.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libqcdm/tests/test-qcdm-com.c b/libqcdm/tests/test-qcdm-com.c
index e03093df..a8262b4f 100644
--- a/libqcdm/tests/test-qcdm-com.c
+++ b/libqcdm/tests/test-qcdm-com.c
@@ -414,7 +414,10 @@ test_com_read_mode_pref (void *f, void *data)
/* Parse the response into a result structure */
result = qcdm_cmd_nv_get_mode_pref_result (buf, reply_len, &error);
- g_assert (result);
+ if (!result) {
+ g_assert_error (error, QCDM_COMMAND_ERROR, QCDM_COMMAND_NVCMD_FAILED);
+ return;
+ }
g_print ("\n");
@@ -432,7 +435,8 @@ test_com_read_mode_pref (void *f, void *data)
msg = "automatic";
break;
default:
- g_assert_not_reached ();
+ msg = "unknown";
+ break;
}
g_message ("%s: Mode preference: 0x%02X (%s)", __func__, pref, msg);