msc_vlr_tests: clearly separate Ciph Mode from Security Mode checking
Clearly distinguish between Ciphering Mode Command on GERAN and Security Mode
Control on UTRAN.
Cosmetic: explicitly verify the key strings in the testing code (not only in
the expected output).
Change-Id: Ica93ed06c4c63dc6768736d25231de8068001114
diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h
index 03aa3ae..858936c 100644
--- a/tests/msc_vlr/msc_vlr_tests.h
+++ b/tests/msc_vlr/msc_vlr_tests.h
@@ -76,6 +76,28 @@
extern bool cipher_mode_cmd_sent;
extern bool cipher_mode_cmd_sent_with_imeisv;
+extern const char *cipher_mode_expect_kc;
+
+extern bool security_mode_ctrl_sent;
+extern const char *security_mode_expect_ck;
+extern const char *security_mode_expect_ik;
+
+static inline void expect_cipher_mode_cmd(const char *kc)
+{
+ cipher_mode_cmd_sent = false;
+ cipher_mode_expect_kc = kc;
+ /* make sure we don't mix up the two */
+ security_mode_ctrl_sent = false;
+}
+
+static inline void expect_security_mode_ctrl(const char *ck, const char *ik)
+{
+ security_mode_ctrl_sent = false;
+ security_mode_expect_ck = ck;
+ security_mode_expect_ik = ik;
+ /* make sure we don't mix up the two */
+ cipher_mode_cmd_sent = false;
+}
extern bool paging_sent;
extern bool paging_stopped;