Skip to content

Commit 9a63ca7

Browse files
Truncate comments to not exceed 100 columns
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Steven Bellock <sbellock@nvidia.com>
1 parent 4bf0964 commit 9a63ca7

17 files changed

+124
-62
lines changed

unit_test/test_spdm_requester/challenge.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,10 +1245,12 @@ static libspdm_return_t receive_message(
12451245
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
12461246
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
12471247
}
1248-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
1248+
/* skip some reserved error codes (0d to 3e) */
1249+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
12491250
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
12501251
}
1251-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
1252+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
1253+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
12521254
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
12531255
}
12541256
}
@@ -3249,10 +3251,12 @@ static void req_challenge_case20(void **state) {
32493251
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
32503252
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
32513253
}
3252-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
3254+
/* skip some reserved error codes (0d to 3e) */
3255+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
32533256
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
32543257
}
3255-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
3258+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
3259+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
32563260
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
32573261
}
32583262
}

unit_test/test_spdm_requester/end_session.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,12 @@ static libspdm_return_t receive_message(
553553
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
554554
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
555555
}
556-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
556+
/* skip some reserved error codes (0d to 3e) */
557+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
557558
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
558559
}
559-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
560+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
561+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
560562
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
561563
}
562564
}
@@ -1422,10 +1424,12 @@ static void req_end_session_case10(void **state) {
14221424
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
14231425
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
14241426
}
1425-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
1427+
/* skip some reserved error codes (0d to 3e) */
1428+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
14261429
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
14271430
}
1428-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
1431+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
1432+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
14291433
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
14301434
}
14311435
}

unit_test/test_spdm_requester/error_test/get_capabilities_err.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,10 +864,12 @@ static libspdm_return_t receive_message(
864864
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
865865
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
866866
}
867-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
867+
/* skip some reserved error codes (0d to 3e) */
868+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
868869
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
869870
}
870-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
871+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
872+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
871873
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
872874
}
873875
}
@@ -1730,10 +1732,12 @@ static void libspdm_test_requester_get_capabilities_err_case29(void **state) {
17301732
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
17311733
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
17321734
}
1733-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
1735+
/* skip some reserved error codes (0d to 3e) */
1736+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
17341737
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
17351738
}
1736-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
1739+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
1740+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
17371741
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
17381742
}
17391743
}

unit_test/test_spdm_requester/error_test/get_digests_err.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,12 @@ static libspdm_return_t receive_message(
634634
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
635635
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
636636
}
637-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
637+
/* skip some reserved error codes (0d to 3e) */
638+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
638639
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
639640
}
640-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
641+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
642+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
641643
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
642644
}
643645
}
@@ -1517,10 +1519,12 @@ static void libspdm_test_requester_get_digests_err_case22(void **state) {
15171519
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
15181520
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
15191521
}
1520-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
1522+
/* skip some reserved error codes (0d to 3e) */
1523+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
15211524
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
15221525
}
1523-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
1526+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
1527+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
15241528
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
15251529
}
15261530
}

unit_test/test_spdm_requester/error_test/get_measurements_err.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,10 +2179,12 @@ static libspdm_return_t receive_message(
21792179
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
21802180
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
21812181
}
2182-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
2182+
/* skip some reserved error codes (0d to 3e) */
2183+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
21832184
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
21842185
}
2185-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
2186+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
2187+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
21862188
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
21872189
}
21882190
}
@@ -4349,10 +4351,12 @@ static void libspdm_test_requester_get_measurements_err_case33(void **state) {
43494351
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
43504352
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
43514353
}
4352-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
4354+
/* skip some reserved error codes (0d to 3e) */
4355+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
43534356
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
43544357
}
4355-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
4358+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
4359+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
43564360
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
43574361
}
43584362
}

unit_test/test_spdm_requester/error_test/get_version_err.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,12 @@ static libspdm_return_t receive_message(
381381
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
382382
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
383383
}
384-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
384+
/* skip some reserved error codes (0d to 3e) */
385+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
385386
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
386387
}
387-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
388+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
389+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
388390
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
389391
}
390392
}
@@ -781,10 +783,12 @@ static void libspdm_test_requester_get_version_err_case14(void **state) {
781783
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
782784
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
783785
}
784-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
786+
/* skip some reserved error codes (0d to 3e) */
787+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
785788
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
786789
}
787-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
790+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
791+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
788792
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
789793
}
790794
}

unit_test/test_spdm_requester/error_test/key_exchange_err.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,12 @@ static libspdm_return_t receive_message(
11721172
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
11731173
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
11741174
}
1175-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
1175+
/* skip some reserved error codes (0d to 3e) */
1176+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
11761177
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
11771178
}
1178-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
1179+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
1180+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
11791181
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
11801182
}
11811183
}
@@ -5015,10 +5017,12 @@ static void libspdm_test_requester_key_exchange_err_case10(void **state) {
50155017
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
50165018
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
50175019
}
5018-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
5020+
/* skip some reserved error codes (0d to 3e) */
5021+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
50195022
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
50205023
}
5021-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
5024+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
5025+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
50225026
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
50235027
}
50245028
}

unit_test/test_spdm_requester/finish.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,12 @@ static libspdm_return_t receive_message(
630630
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
631631
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
632632
}
633-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
633+
/* skip some reserved error codes (0d to 3e) */
634+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
634635
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
635636
}
636-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
637+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
638+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
637639
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
638640
}
639641
}
@@ -2367,10 +2369,12 @@ static void req_finish_case10(void **state) {
23672369
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
23682370
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
23692371
}
2370-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
2372+
/* skip some reserved error codes (0d to 3e) */
2373+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
23712374
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
23722375
}
2373-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
2376+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
2377+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
23742378
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
23752379
}
23762380
}

unit_test/test_spdm_requester/get_capabilities.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,10 +888,12 @@ static libspdm_return_t receive_message(
888888
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
889889
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
890890
}
891-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
891+
/* skip some reserved error codes (0d to 3e) */
892+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
892893
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
893894
}
894-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
895+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
896+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
895897
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
896898
}
897899
}

unit_test/test_spdm_requester/get_certificate.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,10 +1048,12 @@ static libspdm_return_t receive_message(
10481048
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
10491049
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
10501050
}
1051-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
1051+
/* skip some reserved error codes (0d to 3e) */
1052+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
10521053
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
10531054
}
1054-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
1055+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
1056+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
10551057
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
10561058
}
10571059
}
@@ -3311,10 +3313,12 @@ static void req_get_certificate_case16(void **state) {
33113313
if(error_code == SPDM_ERROR_CODE_BUSY) { /*busy is treated in cases 5 and 6*/
33123314
error_code = SPDM_ERROR_CODE_UNEXPECTED_REQUEST;
33133315
}
3314-
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) { /*skip some reserved error codes (0d to 3e)*/
3316+
/* skip some reserved error codes (0d to 3e) */
3317+
if(error_code == LIBSPDM_ERROR_CODE_RESERVED_0D) {
33153318
error_code = LIBSPDM_ERROR_CODE_RESERVED_3F;
33163319
}
3317-
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) { /*skip response not ready, request resync, and some reserved codes (44 to fc)*/
3320+
/* skip response not ready, request resync, and some reserved codes (44 to fc) */
3321+
if(error_code == SPDM_ERROR_CODE_RESPONSE_NOT_READY) {
33183322
error_code = LIBSPDM_ERROR_CODE_RESERVED_FD;
33193323
}
33203324
}

0 commit comments

Comments
 (0)