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

SchedControl_ConfigureFlags should report ranges in error messages #1293

Open
lsf37 opened this issue Jul 10, 2024 · 0 comments
Open

SchedControl_ConfigureFlags should report ranges in error messages #1293

lsf37 opened this issue Jul 10, 2024 · 0 comments

Comments

@lsf37
Copy link
Member

lsf37 commented Jul 10, 2024

While the rangeError types in SchedControl_ConfigureFlags correctly return the expected ranges, it would be nice if the userError message strings also reported those ranges to make them more discoverable.

E.g. here in

    if (budget_us > MAX_PERIOD_US || budget_ticks < MIN_BUDGET) {
        userError("SchedControl_ConfigureFlags: budget out of range.");
        current_syscall_error.type = seL4_RangeError;
        current_syscall_error.rangeErrorMin = MIN_BUDGET_US;
        current_syscall_error.rangeErrorMax = MAX_PERIOD_US;
        return EXCEPTION_SYSCALL_ERROR;
    }

the message could say something like

userError("SchedControl_ConfigureFlags: budget out of range [MIN_BUDGET (%ld) .. MAX_PERIOD (%ld)].", MIN_BUDGET_US, MAX_PERIOD_US);

(multiple such range checks in SchedControl_ConfigureFlags)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant