Skip to content

Timeout & LowPowerTimeout tests #5106

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

Merged
merged 1 commit into from
Mar 15, 2018
Merged

Conversation

fkjagodzinski
Copy link
Member

@fkjagodzinski fkjagodzinski commented Sep 14, 2017

sem->release();
}

void timeout_inc_callback(volatile uint32_t *cnt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

coding style alignment in this file

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I fixed brace positions for function declarations.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 21, 2017

cc @pan- @c1728p9

bulislaw
bulislaw previously approved these changes Sep 26, 2017
0xc0170
0xc0170 previously approved these changes Sep 27, 2017
@theotherjimmy
Copy link
Contributor

/morph test

@theotherjimmy
Copy link
Contributor

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented Oct 3, 2017

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented Oct 3, 2017

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph test

@fkjagodzinski
Copy link
Member Author

As suggested in #5163 I've made an update to avoid code duplication:

  • rebased onto master (c60194f),
  • extracted test case templates to a header file,
  • added unit tests for LowPowerTimeout.

@fkjagodzinski fkjagodzinski changed the title Timeout tests Timeout & LowPowerTimeout tests Oct 3, 2017
Case("Callback override (with attach_us)", test_override<AttachUSTester<LowPowerTimeout> >),

Case("Multiple timeouts running in parallel (with attach)", test_multiple<AttachTester<LowPowerTimeout> >),
Case("Multiple timeouts running in parallel (with attach_us)", test_multiple<AttachUSTester<LowPowerTimeout> >),
Copy link
Member Author

Choose a reason for hiding this comment

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

These two tests with multiple LowPowerTimeout objects fail on K64F, NUCLEO_F070RB, NUCLEO_L476RG. Waiting for the outcome of #5150.

Case("Multiple timeouts running in parallel (with attach_us)", test_multiple<AttachUSTester<LowPowerTimeout> >),

Case("Zero delay (with attach)", test_no_wait<AttachTester<LowPowerTimeout> >),
Case("Zero delay (with attach_us)", test_no_wait<AttachUSTester<LowPowerTimeout> >),
Copy link
Member Author

Choose a reason for hiding this comment

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

These tests fail on NUCLEO_F070RB, NUCLEO_F429ZI and NUCLEO_L476RG -- issue #5159.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 4, 2017

Thanks for the report, I'll label this as needs preceeding PR, and we need to wait for the fixes until this is made green

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

What do you think about moving the tests to
TESTS/mbed_drivers/timeout/{lp_timeout,timeout}/

Also can we make all the tests common (and the same) unless there are some characteristic of the specific timeout that we test.


Case("Zero delay (with attach)", test_no_wait<AttachTester<LowPowerTimeout> >),
Case("Zero delay (with attach_us)", test_no_wait<AttachUSTester<LowPowerTimeout> >),

Case("500us LowPowerTimeout", lp_timeout_500us, greentea_failure_handler),
Copy link
Member

Choose a reason for hiding this comment

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

Can we make these tests common for both test suites?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I'll move these test cases to the header file.

@fkjagodzinski
Copy link
Member Author

What do you think about moving the tests to
TESTS/mbed_drivers/timeout/{lp_timeout,timeout}/

@bulislaw That was my initial idea but as it turned out this would require changing test discovery procedure which now expects strictly defined dir structure

mbed-os/tools/test_api.py

Lines 2046 to 2050 in 373e6ab

# If the test case folder is not called 'host_tests' and it is
# located two folders down from the main 'TESTS' folder (ex. TESTS/testgroup/testcase)
# then add it to the tests
path_depth = get_path_depth(relpath(d, walk_base_dir))
if path_depth == 2:
so I chose a simpler solution.

@bulislaw
Copy link
Member

bulislaw commented Oct 4, 2017

@bulislaw That was my initial idea but as it turned out this would require changing test discovery procedure which now expects strictly defined dir structure

ok, makes sense.

@adbridge
Copy link
Contributor

@fkjagodzinski @bulislaw is this now ready ?

@fkjagodzinski
Copy link
Member Author

is this now ready ?

@adbridge PR needs a minor update. Should be ready tomorrow.

@fkjagodzinski
Copy link
Member Author

Update:

  • rebased onto master, which is now at 8b6a7aa,
  • further increased a tolerance of measured delay SHORT_DELTA_US to 2000 us -- I have seen an error of 1597 us on NRF51_DK during my local tests.

Now all the boards that failed before, that is NCS36510, NRF51_DK and NRF52_DK, pass every test case!

@bulislaw, @0xc0170 could you take alook and accept this PR again, please? No changes (apart that SHORT_DELTA_US) were introduced.

@fkjagodzinski
Copy link
Member Author

@bulislaw, @0xc0170, @cmonr Could you run morph tests please? I'm curious to see the results; there is still one issue left for NCS36510 (#5431) but this does not show up in my local tests using GCC_ARM toolchain and I don't have access to other toolchains at the moment.

@bulislaw
Copy link
Member

bulislaw commented Mar 1, 2018

@fkjagodzinski we are very close to a code freeze for 5.8, only PR critical for 5.8 can be run on the CI till we freeze (hopefully tomorrow). Next week should look better, we'll run it then.

@fkjagodzinski
Copy link
Member Author

@0xc0170, @cmonr Could you update the labels with needs: review and needs: CI, and/or run morph tests please?

@cmonr
Copy link
Contributor

cmonr commented Mar 7, 2018

@0xc0170 @bulislaw Could y'all take another look? It looks like this is ready to go again.

@0xc0170 Does this still need the DNM label?

@fkjagodzinski We can't start CI until we have at least one review OK the PR.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 7, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 7, 2018

Build : SUCCESS

Build number : 1381
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5106/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 7, 2018

@mbed-ci
Copy link

mbed-ci commented Mar 8, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 8, 2018

Restarting, a device error

/morph test

@mbed-ci
Copy link

mbed-ci commented Mar 8, 2018

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.

8 participants