@@ -49,7 +49,8 @@ static void kdf_case(struct kunit *test)
49
49
50
50
/* Arrange */
51
51
gk5e = gss_krb5_lookup_enctype (param -> enctype );
52
- KUNIT_ASSERT_NOT_NULL (test , gk5e );
52
+ if (!gk5e )
53
+ kunit_skip (test , "Encryption type is not available" );
53
54
54
55
derivedkey .data = kunit_kzalloc (test , param -> expected_result -> len ,
55
56
GFP_KERNEL );
@@ -83,7 +84,8 @@ static void checksum_case(struct kunit *test)
83
84
84
85
/* Arrange */
85
86
gk5e = gss_krb5_lookup_enctype (param -> enctype );
86
- KUNIT_ASSERT_NOT_NULL (test , gk5e );
87
+ if (!gk5e )
88
+ kunit_skip (test , "Encryption type is not available" );
87
89
88
90
Kc .len = gk5e -> Kc_length ;
89
91
Kc .data = kunit_kzalloc (test , Kc .len , GFP_KERNEL );
@@ -517,6 +519,7 @@ static struct kunit_case rfc3961_test_cases[] = {
517
519
.run_case = kdf_case ,
518
520
.generate_params = rfc3961_kdf_gen_params ,
519
521
},
522
+ {}
520
523
};
521
524
522
525
static struct kunit_suite rfc3961_suite = {
@@ -725,7 +728,8 @@ static void rfc3962_encrypt_case(struct kunit *test)
725
728
726
729
/* Arrange */
727
730
gk5e = gss_krb5_lookup_enctype (param -> enctype );
728
- KUNIT_ASSERT_NOT_NULL (test , gk5e );
731
+ if (!gk5e )
732
+ kunit_skip (test , "Encryption type is not available" );
729
733
730
734
cbc_tfm = crypto_alloc_sync_skcipher (gk5e -> aux_cipher , 0 , 0 );
731
735
KUNIT_ASSERT_NOT_ERR_OR_NULL (test , cbc_tfm );
@@ -777,6 +781,7 @@ static struct kunit_case rfc3962_test_cases[] = {
777
781
.run_case = rfc3962_encrypt_case ,
778
782
.generate_params = rfc3962_encrypt_gen_params ,
779
783
},
784
+ {}
780
785
};
781
786
782
787
static struct kunit_suite rfc3962_suite = {
@@ -1319,7 +1324,8 @@ static void rfc6803_encrypt_case(struct kunit *test)
1319
1324
1320
1325
/* Arrange */
1321
1326
gk5e = gss_krb5_lookup_enctype (param -> enctype );
1322
- KUNIT_ASSERT_NOT_NULL (test , gk5e );
1327
+ if (!gk5e )
1328
+ kunit_skip (test , "Encryption type is not available" );
1323
1329
1324
1330
usage .data [3 ] = param -> constant ;
1325
1331
@@ -1411,6 +1417,7 @@ static struct kunit_case rfc6803_test_cases[] = {
1411
1417
.run_case = rfc6803_encrypt_case ,
1412
1418
.generate_params = rfc6803_encrypt_gen_params ,
1413
1419
},
1420
+ {}
1414
1421
};
1415
1422
1416
1423
static struct kunit_suite rfc6803_suite = {
@@ -1810,7 +1817,8 @@ static void rfc8009_encrypt_case(struct kunit *test)
1810
1817
1811
1818
/* Arrange */
1812
1819
gk5e = gss_krb5_lookup_enctype (param -> enctype );
1813
- KUNIT_ASSERT_NOT_NULL (test , gk5e );
1820
+ if (!gk5e )
1821
+ kunit_skip (test , "Encryption type is not available" );
1814
1822
1815
1823
* (__be32 * )usage .data = cpu_to_be32 (2 );
1816
1824
@@ -1902,6 +1910,7 @@ static struct kunit_case rfc8009_test_cases[] = {
1902
1910
.run_case = rfc8009_encrypt_case ,
1903
1911
.generate_params = rfc8009_encrypt_gen_params ,
1904
1912
},
1913
+ {}
1905
1914
};
1906
1915
1907
1916
static struct kunit_suite rfc8009_suite = {
@@ -1975,7 +1984,8 @@ static void encrypt_selftest_case(struct kunit *test)
1975
1984
1976
1985
/* Arrange */
1977
1986
gk5e = gss_krb5_lookup_enctype (param -> enctype );
1978
- KUNIT_ASSERT_NOT_NULL (test , gk5e );
1987
+ if (!gk5e )
1988
+ kunit_skip (test , "Encryption type is not available" );
1979
1989
1980
1990
cbc_tfm = crypto_alloc_sync_skcipher (gk5e -> aux_cipher , 0 , 0 );
1981
1991
KUNIT_ASSERT_NOT_ERR_OR_NULL (test , cbc_tfm );
@@ -2023,6 +2033,7 @@ static struct kunit_case encryption_test_cases[] = {
2023
2033
.run_case = encrypt_selftest_case ,
2024
2034
.generate_params = encrypt_selftest_gen_params ,
2025
2035
},
2036
+ {}
2026
2037
};
2027
2038
2028
2039
static struct kunit_suite encryption_test_suite = {
0 commit comments