1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2023 Meta Platforms, Inc. and affiliates.
8 #include <scx/common.h>
11 #include "minimal.bpf.skel.h"
14 static enum scx_test_status setup(void **ctx)
18 skel = minimal__open_and_load();
20 SCX_ERR("Failed to open and load skel");
28 static enum scx_test_status run(void *ctx)
30 struct minimal *skel = ctx;
31 struct bpf_link *link;
33 link = bpf_map__attach_struct_ops(skel->maps.minimal_ops);
35 SCX_ERR("Failed to attach scheduler");
39 bpf_link__destroy(link);
44 static void cleanup(void *ctx)
46 struct minimal *skel = ctx;
48 minimal__destroy(skel);
51 struct scx_test minimal = {
53 .description = "Verify we can load a fully minimal scheduler",
58 REGISTER_SCX_TEST(&minimal)