tools/testing/selftests/sync/synctest.h

Source file repositories/reference/linux-study-clean/tools/testing/selftests/sync/synctest.h

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/sync/synctest.h
Extension
.h
Size
2151 bytes
Lines
68
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

#ifndef SELFTESTS_SYNCTEST_H
#define SELFTESTS_SYNCTEST_H

#include <stdio.h>
#include "../kselftest.h"

#define ASSERT(cond, msg) do { \
	if (!(cond)) { \
		ksft_print_msg("[ERROR]\t%s", (msg)); \
		return 1; \
	} \
} while (0)

#define RUN_TEST(x) run_test((x), #x)

/* Allocation tests */
int test_alloc_timeline(void);
int test_alloc_fence(void);
int test_alloc_fence_negative(void);

/* Fence tests with one timeline */
int test_fence_one_timeline_wait(void);
int test_fence_one_timeline_merge(void);

/* Fence merge tests */
int test_fence_merge_same_fence(void);

/* Fence wait tests */
int test_fence_multi_timeline_wait(void);

/* Stress test - parallelism */
int test_stress_two_threads_shared_timeline(void);

/* Stress test - consumer */
int test_consumer_stress_multi_producer_single_consumer(void);

/* Stress test - merging */
int test_merge_stress_random_merge(void);

#endif

Annotation

Implementation Notes