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

Fix Greentea test code with deepsleep #7224

Merged
merged 1 commit into from Jun 19, 2018

Conversation

Projects
None yet
5 participants
@ccli8
Contributor

ccli8 commented Jun 15, 2018

Description

In timeout_tests.h > test_deepsleep, original wait time for UART flush before deeplseep is not enough for e.g. NUMAKER_PFM_NUC472 target. This PR fixes it by enlarging the wait time.

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@0xc0170 0xc0170 requested a review from fkjagodzinski Jun 15, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jun 15, 2018

In timeout_tests.h > test_deepsleep, original wait time for UART flush before deeplseep is not enough for e.g. NUMAKER_PFM_NUC472 target. This PR fixes it by enlarging the wait time.

I would like to understand the numbering there. What is causing it to fail (why 20 is enough) ?

@0xc0170 0xc0170 requested a review from ARMmbed/mbed-os-hal Jun 15, 2018

@ccli8

This comment has been minimized.

Contributor

ccli8 commented Jun 15, 2018

Taking NUMAKER_PFM_NUC472 as an example: It has 4-word UART FIFO (16 bytes). With baud rate = 9600, flush UART FIFO would take: 16 * 8 * 1000 / 9600 = 13.3 (ms). So set wait time to 20ms for safe.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jun 18, 2018

@ccli8 That makes it clear. Can you add this info to the commit?

* to allow for hardware serial buffers to completely flush.
* This should be replaced with a better function that checks if the
* hardware buffers are empty. However, such an API does not exist now,
* so we'll use the wait_ms() function for now.
*/
wait_ms(10);
wait_ms(20);

This comment has been minimized.

@fkjagodzinski

fkjagodzinski Jun 18, 2018

Member

As @0xc0170 pointed out, a comment with a short explanation would be very useful here.

This comment has been minimized.

@ccli8

ccli8 Jun 19, 2018

Contributor

@0xc0170 @fkjagodzinski I add comment for enlarging wait time in 39a6fa9 (override original one).

Enlarge wait time in Greentea test function test_deepsleep
Original wait time is not enough for UART to flush out before deepsleep on some targets.

@ccli8 ccli8 force-pushed the OpenNuvoton:nuvoton_fix_greentea_deepsleep branch from e7b3af7 to 39a6fa9 Jun 19, 2018

@cmonr

cmonr approved these changes Jun 19, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 19, 2018

Would have prefered that something specific was given to indicate why 20 was specifically used instead of 50, 100, etc..., but good enough for me.

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jun 19, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Jun 19, 2018

@0xc0170 0xc0170 merged commit 19c795c into ARMmbed:master Jun 19, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 925 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10038 cycles (-92 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9964B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@ccli8 ccli8 deleted the OpenNuvoton:nuvoton_fix_greentea_deepsleep branch Jun 20, 2018

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