Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_objagg.c Create Date:2022-07-28 06:35:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:check_expect

Proto:static int check_expect(struct world *world, const struct action_item *action_item, unsigned int orig_delta_count, unsigned int orig_root_count)

Type:int

Parameter:

TypeParameterName
struct world *world
const struct action_item *action_item
unsigned intorig_delta_count
unsigned intorig_root_count
566  key_id = key_id
569  Case expect_delta == EXPECT_DELTA_SAME
570  If orig_delta_count != delta_count Then
571  pr_err("Key %u: Delta count changed while expected to remain the same.\n", key_id)
573  Return -EINVAL
575  Break
576  Case expect_delta == EXPECT_DELTA_INC
577  If WARN_ON(action == ACTION_PUT) Then Return -EINVAL
579  If orig_delta_count + 1 != delta_count Then
580  pr_err("Key %u: Delta count was not incremented.\n", key_id)
582  Return -EINVAL
584  Break
585  Case expect_delta == EXPECT_DELTA_DEC
586  If WARN_ON(action == ACTION_GET) Then Return -EINVAL
588  If orig_delta_count - 1 != delta_count Then
589  pr_err("Key %u: Delta count was not decremented.\n", key_id)
591  Return -EINVAL
593  Break
598  If orig_root_count != root_count Then
599  pr_err("Key %u: Root count changed while expected to remain the same.\n", key_id)
601  Return -EINVAL
603  Break
605  If WARN_ON(action == ACTION_PUT) Then Return -EINVAL
607  If orig_root_count + 1 != root_count Then
608  pr_err("Key %u: Root count was not incremented.\n", key_id)
610  Return -EINVAL
612  Break
614  If WARN_ON(action == ACTION_GET) Then Return -EINVAL
616  If orig_root_count - 1 != root_count Then
617  pr_err("Key %u: Root count was not decremented.\n", key_id)
619  Return -EINVAL
623  Return 0
Caller
NameDescribe
test_delta_action_item