Re: [PATCH v1 1/1] lib/crypto: tests: Add KUnit tests for AES
From: kernel test robot <hidden>
Date: 2026-01-16 00:26:27
Also in:
lkml, llvm, oe-kbuild-all
Hi Holger, kernel test robot noticed the following build errors: [auto build test ERROR on 47753e09a15d9fd7cdf114550510f4f2af9333ec] url: https://github.com/intel-lab-lkp/linux/commits/Holger-Dengler/lib-crypto-tests-Add-KUnit-tests-for-AES/20260116-030041 base: 47753e09a15d9fd7cdf114550510f4f2af9333ec patch link: https://lore.kernel.org/r/20260115183831.72010-2-dengler%40linux.ibm.com patch subject: [PATCH v1 1/1] lib/crypto: tests: Add KUnit tests for AES config: hexagon-randconfig-002-20260116 (https://download.01.org/0day-ci/archive/20260116/202601160822.yLaBf86R-lkp@intel.com/config) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260116/202601160822.yLaBf86R-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202601160822.yLaBf86R-lkp@intel.com/ (local) All errors (new ones prefixed by >>):
quoted
lib/crypto/tests/aes_kunit.c:73:24: error: use of undeclared identifier 'SZ_1M'
73 | (t_enc ?: 1) * SZ_1M));
| ^quoted
lib/crypto/tests/aes_kunit.c:73:24: error: use of undeclared identifier 'SZ_1M'
lib/crypto/tests/aes_kunit.c:80:24: error: use of undeclared identifier 'SZ_1M'
80 | (t_dec ?: 1) * SZ_1M));
| ^
lib/crypto/tests/aes_kunit.c:80:24: error: use of undeclared identifier 'SZ_1M'
4 errors generated.
vim +/SZ_1M +73 lib/crypto/tests/aes_kunit.c
27
28 static void benchmark_aes(struct kunit *test, const struct aes_testvector *tv)
29 {
30 const size_t num_iters = 10000000;
31 u8 out[AES_BLOCK_SIZE];
32 struct aes_key aes_key;
33 u64 t_enc, t_dec;
34 int rc;
35
36 if (!IS_ENABLED(CONFIG_CRYPTO_LIB_BENCHMARK))
37 kunit_skip(test, "not enabled");
38
39 rc = aes_preparekey(&aes_key, tv->key.b, tv->key.len);
40 KUNIT_ASSERT_EQ(test, 0, rc);
41
42 /* warm-up enc */
43 for (size_t i = 0; i < 1000; i++)
44 aes_encrypt(&aes_key, out, tv->plain);
45
46 preempt_disable();
47 t_enc = ktime_get_ns();
48
49 for (size_t i = 0; i < num_iters; i++)
50 aes_encrypt(&aes_key, out, tv->plain);
51
52 t_enc = ktime_get_ns() - t_enc;
53 preempt_enable();
54
55 /* warm-up dec */
56 for (size_t i = 0; i < 1000; i++)
57 aes_decrypt(&aes_key, out, tv->cipher);
58
59 preempt_disable();
60 t_dec = ktime_get_ns();
61
62 for (size_t i = 0; i < num_iters; i++)
63 aes_decrypt(&aes_key, out, tv->cipher);
64
65 t_dec = ktime_get_ns() - t_dec;
66 preempt_enable();
67
68 kunit_info(test, "enc (iter. %zu, duration %lluns)",
69 num_iters, t_enc);
70 kunit_info(test, "enc (len=%zu): %llu MB/s",
71 (size_t)AES_BLOCK_SIZE,
72 div64_u64((u64)AES_BLOCK_SIZE * num_iters * NSEC_PER_SEC,
> 73 (t_enc ?: 1) * SZ_1M));
74
75 kunit_info(test, "dec (iter. %zu, duration %lluns)",
76 num_iters, t_dec);
77 kunit_info(test, "dec (len=%zu): %llu MB/s",
78 (size_t)AES_BLOCK_SIZE,
79 div64_u64((u64)AES_BLOCK_SIZE * num_iters * NSEC_PER_SEC,
80 (t_dec ?: 1) * SZ_1M));
81 }
82
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki