Skip to content

Commit 43c9bb2

Browse files
committed
[nos3#483] Fixed broken UTs after SA[1] update
1 parent bc13771 commit 43c9bb2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

test/unit/ut_sa_save.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ UTEST(SA_SAVE, VERIFY_SAVE_EDGES)
686686
ASSERT_EQ(test_association->est, 0);
687687
ASSERT_EQ(test_association->ast, 0);
688688
ASSERT_EQ(test_association->shivf_len, 12);
689-
ASSERT_EQ(test_association->shsnf_len, 2);
689+
ASSERT_EQ(test_association->shsnf_len, 0);
690690
ASSERT_EQ(test_association->shplf_len, 0);
691691
ASSERT_EQ(test_association->stmacf_len, 0);
692692
ASSERT_EQ(test_association->ecs, 0x00);
@@ -714,7 +714,7 @@ UTEST(SA_SAVE, VERIFY_SAVE_EDGES)
714714
ASSERT_EQ(test_association->abm[i], 0x00);
715715
}
716716
// sa[location].abm[0] = sa_ptr->abm;
717-
ASSERT_EQ(test_association->arsn_len, 2);
717+
ASSERT_EQ(test_association->arsn_len, 0);
718718
for (int i = 0; i < test_association->arsn_len; i++)
719719
{
720720
ASSERT_EQ(test_association->arsn[i], 0);

test/unit/ut_tc_apply.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,15 +1409,15 @@ UTEST(TC_APPLY_SECURITY, PLAINTEXT_W_ARSN)
14091409
Crypto_TC_ApplySecurity((uint8_t *)raw_tc_sdls_ping_b, raw_tc_sdls_ping_len, &ptr_enc_frame, &enc_frame_len);
14101410
// 200300230000010000000100011980D2C9000E197F0B001B0004000400003040D95E85F3
14111411
char *truth_data_h =
1412-
"2003002f0000010000000000000000000000000000000100011980d2c9000e197f0b001b0004000400003040d95e8e56";
1412+
"2003002d000001000000000000000000000000000100011980d2c9000e197f0b001b0004000400003040d95e9750";
14131413
uint8_t *truth_data_b = NULL;
14141414
int truth_data_l = 0;
14151415

14161416
hex_conversion(truth_data_h, (char **)&truth_data_b, &truth_data_l);
14171417
// printf("Encrypted Frame:\n");
14181418
for (int i = 0; i < enc_frame_len; i++)
14191419
{
1420-
// printf("%02x -> %02x ", ptr_enc_frame[i], truth_data_b[i]);
1420+
printf("%02x -> %02x ", ptr_enc_frame[i], truth_data_b[i]);
14211421
ASSERT_EQ(ptr_enc_frame[i], truth_data_b[i]);
14221422
}
14231423

test/unit/ut_tm_apply.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ UTEST(TM_APPLY_SECURITY, HAPPY_PATH_CLEAR_FECF)
232232

233233
// Truth frame setup
234234
char *truth_tm_h =
235-
"003000001800000100000000000000000000000000008899AABBCCDDEEFFA107FF000006D2ABBABBAABBAABBAABBAABBAABBAABBAABBAA"
235+
"003000001800000100000000000000000000000066778899AABBCCDDEEFFA107FF000006D2ABBABBAABBAABBAABBAABBAABBAABBAABBAA"
236236
"BBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABB"
237237
"AABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAA"
238238
"BBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABB"
@@ -264,7 +264,7 @@ UTEST(TM_APPLY_SECURITY, HAPPY_PATH_CLEAR_FECF)
264264
"BBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABB"
265265
"AABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAA"
266266
"BBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABB"
267-
"AABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABB8ECE";
267+
"AABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBB2C1";
268268
char *truth_tm_b = NULL;
269269
int truth_tm_len = 0;
270270
hex_conversion(truth_tm_h, &truth_tm_b, &truth_tm_len);
@@ -285,7 +285,7 @@ UTEST(TM_APPLY_SECURITY, HAPPY_PATH_CLEAR_FECF)
285285
// Now, byte by byte verify the static frame in memory is equivalent to what we started with
286286
for (int i = 0; i < current_managed_parameters_struct.max_frame_size; i++)
287287
{
288-
// printf("Checking %02x against %02X\n", (uint8_t)framed_tm_b[i], (uint8_t)*(truth_tm_b + i));
288+
printf("Checking %02x against %02X\n", (uint8_t)framed_tm_b[i], (uint8_t)*(truth_tm_b + i));
289289
ASSERT_EQ((uint8_t)framed_tm_b[i], (uint8_t) * (truth_tm_b + i));
290290
}
291291

0 commit comments

Comments
 (0)