Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing return statement (fix #47) #49

Merged
merged 1 commit into from
Aug 28, 2021
Merged

Conversation

axel-h
Copy link
Member

@axel-h axel-h commented Aug 28, 2021

add missing return statement as fix #47 for. @yyshen suggested just to return 0 here, but this seem to contradict what all other test are doing.

@lsf37
Copy link
Member

lsf37 commented Aug 28, 2021

The function sched0022_to_fn() is not itself a test, it's only a helper function inside a test. There are plenty of these helper functions that do return 0, e.g. in the same file prio_test_func:

static int
prio_test_func(seL4_Word my_prio, volatile seL4_Word *last_prio, seL4_CPtr ep)
{
COMPILER_MEMORY_FENCE();
test_check(*last_prio - 1 == my_prio);
*last_prio = my_prio;
COMPILER_MEMORY_FENCE();
/* Unsuspend the top thread if we are the last one. */
if (my_prio == MIN_PRIO) {
seL4_MessageInfo_t tag = seL4_MessageInfo_new(0, 0, 0, 0);
seL4_Send(ep, tag);
}
return 0;

I think return 0 is right here. sel4test_get_result() will probably not do anything bad, because the return value of sched0022_to_fn() is ignored anyway in this test, but it's not what is expected at that point.

Signed-off-by: Axel Heider <[email protected]>
@axel-h
Copy link
Member Author

axel-h commented Aug 28, 2021

change.

@lsf37 lsf37 merged commit f65e92d into seL4:master Aug 28, 2021
@axel-h axel-h deleted the patch-axel-2 branch September 20, 2021 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sched0022_to_fn() does not return a value
2 participants