tools/testing/selftests/sched_ext/rt_stall.c

Source file repositories/reference/linux-study-clean/tools/testing/selftests/sched_ext/rt_stall.c

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/sched_ext/rt_stall.c
Extension
.c
Size
7046 bytes
Lines
294
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 (is_ext) {
			memset(&skel->data->uei, 0, sizeof(skel->data->uei));
			link = bpf_map__attach_struct_ops(skel->maps.rt_stall_ops);
			SCX_FAIL_IF(!link, "Failed to attach scheduler");
		}
		res = sched_stress_test(is_ext);
		if (is_ext) {
			SCX_EQ(skel->data->uei.kind, EXIT_KIND(SCX_EXIT_NONE));
			bpf_link__destroy(link);
		}

		if (!res)
			ksft_exit_fail();
	}

	return SCX_TEST_PASS;
}

static void cleanup(void *ctx)
{
	struct rt_stall *skel = ctx;

	rt_stall__destroy(skel);
}

struct scx_test rt_stall = {
	.name = "rt_stall",
	.description = "Verify that RT tasks cannot stall SCHED_EXT tasks",
	.setup = setup,
	.run = run,
	.cleanup = cleanup,
};
REGISTER_SCX_TEST(&rt_stall)

Annotation

Implementation Notes