lib/kunit/try-catch.c

Source file repositories/reference/linux-study-clean/lib/kunit/try-catch.c

File Facts

System
Linux kernel
Corpus path
lib/kunit/try-catch.c
Extension
.c
Size
2456 bytes
Lines
92
Domain
Kernel Services
Bucket
lib
Inferred role
Kernel Services: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.

Dependency Surface

Detected Declarations

Annotated Snippet

else if (exit_code == -EINTR) {
		if (test->last_seen.file)
			kunit_err(test, "try faulted: last line seen %s:%d\n",
				  test->last_seen.file, test->last_seen.line);
		else
			kunit_err(test, "try faulted\n");
	} else if (exit_code == -ETIMEDOUT)
		kunit_err(test, "try timed out\n");
	else if (exit_code)
		kunit_err(test, "Unknown error: %d\n", exit_code);

	try_catch->catch(try_catch->context);
}
EXPORT_SYMBOL_GPL(kunit_try_catch_run);

Annotation

Implementation Notes