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

tests: kernel: submit a simple test for zero-latency irqs #17045

Merged

Conversation

ioannisg
Copy link
Member

Fixes #16901

The commit contributes a simple test for the Zero-Latency
IRQ feature (CONFIG_ZERO_LATENCY_IRQS=y) for ARM platforms.

Signed-off-by: Ioannis Glaropoulos Ioannis.Glaropoulos@nordicsemi.no

@ioannisg ioannisg requested a review from andrewboie as a code owner June 25, 2019 12:17
@zephyrbot zephyrbot added area: Tests Issues related to a particular existing or missing test area: Kernel labels Jun 25, 2019
@zephyrbot
Copy link
Collaborator

zephyrbot commented Jun 25, 2019

All checks are passing now.

Review history of this comment for details about previous failed status.
Note that some checks might have not completed yet.

@ioannisg ioannisg force-pushed the tests_kernel_zero_latency_irqs branch from aa82340 to 2fef862 Compare June 25, 2019 12:26
@@ -0,0 +1,20 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it split into two files?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose, I just followed the arm_irq_vector_table test structure

@ioannisg ioannisg force-pushed the tests_kernel_zero_latency_irqs branch from 2fef862 to 6c0ab49 Compare June 25, 2019 13:05
@ioannisg ioannisg added the bug The issue is a bug, or the PR is fixing a bug label Jun 25, 2019
@ioannisg ioannisg requested a review from cvinayak June 25, 2019 13:17
@ioannisg
Copy link
Member Author

@cvinayak could you also take a quick look?

Copy link
Contributor

@cvinayak cvinayak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ioannisg ioannisg force-pushed the tests_kernel_zero_latency_irqs branch 2 times, most recently from 24b2869 to 14c6700 Compare June 25, 2019 13:58
zassert_false(test_flag, "Test flag not initialized to zero\n");

for (i = CONFIG_NUM_IRQS - 1; i >= 0; i--) {
if (NVIC_GetEnableIRQ(i) == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment as to why GetEnableIRQ() allows you to find an available interrupt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like what we have in line 22?

Copy link
Member Author

@ioannisg ioannisg Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or a more detailed comment, e.g.

/*
 * Interrupts configured statically with IRQ_CONNECT(..) are automatically enabled. NVIC_GetEnableIRQ() returning
 * false implies that the IRQ line is not currently in use by Zephyr.
 */

@ioannisg ioannisg force-pushed the tests_kernel_zero_latency_irqs branch from 14c6700 to fb7f9da Compare June 25, 2019 14:56
Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me

ioannisg added 2 commits June 25, 2019 18:52
The commit contributes a simple test for the Zero-Latency
IRQ feature (CONFIG_ZERO_LATENCY_IRQS=y) for ARM platforms.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add the arm tag to tests/kernel/arm_runtime_nmi test.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
@ioannisg ioannisg force-pushed the tests_kernel_zero_latency_irqs branch from fb7f9da to b95a719 Compare June 25, 2019 16:52
@ioannisg ioannisg requested a review from carlescufi June 25, 2019 19:36
@ioannisg ioannisg added this to the v2.0.0 milestone Jun 26, 2019
@nashif nashif merged commit 1e29d40 into zephyrproject-rtos:master Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Code Coverage area: Kernel area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No test coverage for CONFIG_ZERO_LATENCY_IRQS
8 participants