Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kunit_try_catch_test_init

Proto:static int kunit_try_catch_test_init(struct kunit *test)

Type:int

Parameter:

TypeParameterName
struct kunit *test
80  ctx = kunit_kzalloc() - Just like kunit_kmalloc(), but zeroes the allocation.*@test: The test context object.*@size: The size in bytes of the desired memory.*@gfp: flags passed to underlying kmalloc().* See kzalloc() and kunit_kmalloc() for more information.
81  KUNIT_ASSERT_NOT_ERR_OR_NULL() - Assertion that @ptr is not null and not err.*@test: The test context object.*@ptr: an arbitrary pointer.* Sets an assertion that the value that @ptr evaluates to is not null and not* an errno stored in a pointer(test, ctx)
82  priv = ctx
84  try_catch = kunit_kmalloc(test, size of try_catch , GFP_KERNEL)
87  KUNIT_ASSERT_NOT_ERR_OR_NULL() - Assertion that @ptr is not null and not err.*@test: The test context object.*@ptr: an arbitrary pointer.* Sets an assertion that the value that @ptr evaluates to is not null and not* an errno stored in a pointer(test, try_catch)
89  Return 0