Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
scx: Update spaces -> tabs for maybe_null testcase
Browse files Browse the repository at this point in the history
This testcase was mixing tabs and spaces, let's make it use tabs.

Signed-off-by: David Vernet <[email protected]>
  • Loading branch information
Byte-Lab committed Jan 29, 2024
1 parent 8939fe2 commit 1181123
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions tools/testing/selftests/scx/maybe_null.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ void BPF_STRUCT_OPS(maybe_null_running, struct task_struct *p)

void BPF_STRUCT_OPS(maybe_null_success_dispatch, s32 cpu, struct task_struct *p)
{
if (p != NULL)
vtime_test = p->scx.dsq_vtime;
if (p != NULL)
vtime_test = p->scx.dsq_vtime;
}

SEC(".struct_ops.link")
struct sched_ext_ops maybe_null_success = {
.dispatch = maybe_null_success_dispatch,
.dispatch = maybe_null_success_dispatch,
.enable = maybe_null_running,
.name = "minimal",
};
28 changes: 14 additions & 14 deletions tools/testing/selftests/scx/maybe_null.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@

static enum scx_test_status run(void *ctx)
{
struct maybe_null *skel;
struct maybe_null_fail *fail_skel;
struct maybe_null *skel;
struct maybe_null_fail *fail_skel;

skel = maybe_null__open_and_load();
if (!skel) {
SCX_ERR("Failed to open and load maybe_null skel");
return SCX_TEST_FAIL;
}
maybe_null__destroy(skel);
skel = maybe_null__open_and_load();
if (!skel) {
SCX_ERR("Failed to open and load maybe_null skel");
return SCX_TEST_FAIL;
}
maybe_null__destroy(skel);

fail_skel = maybe_null_fail__open_and_load();
if (fail_skel) {
maybe_null_fail__destroy(fail_skel);
SCX_ERR("Should failed to open and load maybe_null_fail skel");
return SCX_TEST_FAIL;
}
fail_skel = maybe_null_fail__open_and_load();
if (fail_skel) {
maybe_null_fail__destroy(fail_skel);
SCX_ERR("Should failed to open and load maybe_null_fail skel");
return SCX_TEST_FAIL;
}

return SCX_TEST_PASS;
}
Expand Down
4 changes: 2 additions & 2 deletions tools/testing/selftests/scx/maybe_null_fail.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ void BPF_STRUCT_OPS(maybe_null_running, struct task_struct *p)

void BPF_STRUCT_OPS(maybe_null_fail_dispatch, s32 cpu, struct task_struct *p)
{
vtime_test = p->scx.dsq_vtime;
vtime_test = p->scx.dsq_vtime;
}

SEC(".struct_ops.link")
struct sched_ext_ops maybe_null_fail = {
.dispatch = maybe_null_fail_dispatch,
.dispatch = maybe_null_fail_dispatch,
.enable = maybe_null_running,
.name = "minimal",
};

0 comments on commit 1181123

Please sign in to comment.