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:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kunit_resource_test_alloc_resource

Proto:static void kunit_resource_test_alloc_resource(struct kunit *test)

Type:void

Parameter:

TypeParameterName
struct kunit *test
143  ctx = priv
145  free = fake_resource_free
147  res = kunit_alloc_and_get_resource( & test, fake_resource_init, fake_resource_free, GFP_KERNEL, ctx)
153  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, res)
154  KUNIT_EXPECT_PTR_EQ() - Expects that pointers @left and @right are equal(test, & is_resource_initialized, (bool * )allocation)
157  KUNIT_EXPECT_TRUE() - Causes a test failure when the expression is not true(test, list_is_last - tests whether @list is the last entry in list @head*@list: the entry to test*@head: the head of the list)
158  KUNIT_EXPECT_PTR_EQ() - Expects that pointers @left and @right are equal(test, free, free)