Bluetooth: Add timing information to SMP test case runs
After successful completion of the SMP test cases, print the time it took to run them. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
fb2969a3a9
commit
255047b0dc
1 changed files with 9 additions and 1 deletions
|
@ -3259,8 +3259,12 @@ static int __init test_h6(struct crypto_hash *tfm_cmac)
|
||||||
static int __init run_selftests(struct crypto_blkcipher *tfm_aes,
|
static int __init run_selftests(struct crypto_blkcipher *tfm_aes,
|
||||||
struct crypto_hash *tfm_cmac)
|
struct crypto_hash *tfm_cmac)
|
||||||
{
|
{
|
||||||
|
ktime_t calltime, delta, rettime;
|
||||||
|
unsigned long long duration;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
calltime = ktime_get();
|
||||||
|
|
||||||
err = test_ah(tfm_aes);
|
err = test_ah(tfm_aes);
|
||||||
if (err) {
|
if (err) {
|
||||||
BT_ERR("smp_ah test failed");
|
BT_ERR("smp_ah test failed");
|
||||||
|
@ -3309,7 +3313,11 @@ static int __init run_selftests(struct crypto_blkcipher *tfm_aes,
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
BT_INFO("SMP test passed");
|
rettime = ktime_get();
|
||||||
|
delta = ktime_sub(rettime, calltime);
|
||||||
|
duration = (unsigned long long) ktime_to_ns(delta) >> 10;
|
||||||
|
|
||||||
|
BT_INFO("SMP test passed in %lld usecs", duration);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue