tools/testing/selftests/membarrier/membarrier_test_impl.h

Source file repositories/reference/linux-study-clean/tools/testing/selftests/membarrier/membarrier_test_impl.h

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/membarrier/membarrier_test_impl.h
Extension
.h
Size
9013 bytes
Lines
351
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

if (errno == ENOSYS) {
			/*
			 * It is valid to build a kernel with
			 * CONFIG_MEMBARRIER=n. However, this skips the tests.
			 */
			ksft_exit_skip(
				"sys membarrier (CONFIG_MEMBARRIER) is disabled.\n");
		}
		ksft_exit_fail_msg("sys_membarrier() failed\n");
	}
	if (!(ret & MEMBARRIER_CMD_GLOBAL))
		ksft_exit_skip(
			"sys_membarrier unsupported: CMD_GLOBAL not found.\n");

	ksft_test_result_pass("sys_membarrier available\n");
	return 0;
}

Annotation

Implementation Notes