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

sleep_manager_racecondition test fix for devices with low CPU clock #6162

Merged
merged 1 commit into from Feb 23, 2018

Conversation

Projects
None yet
5 participants
@maciejbocianski
Member

maciejbocianski commented Feb 22, 2018

Description

This RP contains fix for sleep_manager_racecondition test for very slow devices (like NRF51)
It fixes the test itself as well as side effects of fix introduced in #5046 (us ticker: fix fire interrupt handling)

The idea of the test was to test race condition between main thread and interrupt handler calling the same function. To efficiently test this, each handler call should interrupt main thread to make race more likely. On very slow devices (like NRF51) when we set very low ticker period (e.g less then 1000us for NRF51) there is no much time for thread scheduling. On such slow devices, setting period to 500 us cause that main thread is scheduled very rarely and only handler is constantly called making test unreliable. Fix introduced in #5046 (us ticker: fix fire interrupt handling) changed fire_interrupt function implementation causing more interrupt tailing thus even less time for main thread scheduling.

After introduction of #5046 (us ticker: fix fire interrupt handling) when running sleep_manager_racecondition test on NRF51 (with ticker1.attach_us(&sleep_manager_locking_irq_test, 500);) test is failing with timeout due to the fact that interrupt handler is constantly called and main thread is never scheduled.

#Related issues
#5284
#5046

Pull request type

  • Fix
  • Refactor
  • New Target
  • Feature
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 22, 2018

#5284
#5046

This will unblock those 2 (fixes one and unblock TimerEvent PR) as I understand?

👍 for the description

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 22, 2018

/morph build

@maciejbocianski maciejbocianski referenced this pull request Feb 22, 2018

Merged

TimerEvent tests #5046

@maciejbocianski

This comment has been minimized.

Member

maciejbocianski commented Feb 22, 2018

Exactly

@mbed-ci

This comment has been minimized.

mbed-ci commented Feb 22, 2018

Build : SUCCESS

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

Triggering tests

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

1 similar comment
@mbed-ci

This comment has been minimized.

mbed-ci commented Feb 22, 2018

Build : SUCCESS

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

Triggering tests

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

sleep_manager_racecondition: fix for slow devices
sleep_manager_racecondition test fix for devices with low CPU clock

This RP contains fix for sleep_manager_racecondition test
for very slow devices (like NRF51). It fixes the test itself
as well as side effects of fix introduced in
 #5046 (us ticker: fix fire interrupt handling)

The idea of the test was to test race condition between main thread
and interrupt handler calling the same function.
To efficiently test this, each handler call should interrupt
main thread to make race more likely.
On very slow devices (like NRF51) when we set very low ticker period
(e.g less then 1000us for NRF51) there is no much time for thread scheduling.
On such slow devices, setting period to 500 us cause that
main thread is scheduled very rarely and only handler is
constantly called making test unreliable.
Fix introduced in #5046 (us ticker: fix fire interrupt handling)
changed fire_interrupt function implementation causing more
interrupt tailing thus even less time for main thread scheduling.
After introduction of #5046 (us ticker: fix fire interrupt handling)
when running sleep_manager_racecondition test on NRF51
(with ticker1.attach_us(&sleep_manager_locking_irq_test, 500);)
test is failing with timeout due to the fact that interrupt
handler is constantly called and main thread is never scheduled.

@maciejbocianski maciejbocianski force-pushed the maciejbocianski:sleep_manager_racecondition_test_fix branch from d3b0588 to 5aaad08 Feb 22, 2018

@0xc0170 0xc0170 added the needs: CI label Feb 22, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 22, 2018

I aborted the test, needs to rerun as this PR was updated

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Feb 22, 2018

@maciejbocianski

This comment has been minimized.

Member

maciejbocianski commented Feb 22, 2018

[DEBUG] Return: 1
        [DEBUG] Errors: Error: Q9555E: Failed to check out a license.
        [DEBUG] Errors: Unable to connect to the license server. Check that ARMLMD_LICENSE_FILE is set correctly, and the license server is available.
        [DEBUG] Errors: Information about this error is available at: http://ds.arm.com/support/lic56/m96
        [DEBUG] Errors:  General licensing information is available at: http://ds.arm.com/support/licensing/
        [DEBUG] Errors:  If you need further help, provide this complete error report to your supplier or license.support@arm.com.
        [DEBUG] Errors:  - ARMLMD_LICENSE_FILE: '8225@10.10.10.101'
        [DEBUG] Errors:  - LM_LICENSE_FILE: unset
        [DEBUG] Errors:  - ARM_TOOL_VARIANT: unset
        [DEBUG] Errors:  - ARM_PRODUCT_PATH: unset
        [DEBUG] Errors:  - Product location: /usr/local/ARM_Compiler_5.06u3/sw/mappings
        [DEBUG] Errors:  - Toolchain location: /usr/local/ARM_Compiler_5.06u3/bin
        [DEBUG] Errors:  - Selected tool variant: product
        [DEBUG] Errors:  - Checkout feature: compiler5
        [DEBUG] Errors:  - Feature version: 5.0201605
        [DEBUG] Errors:  - Flex error code: -96
        [DEBUG] Errors: Product: ARM Compiler 5.06
        [DEBUG] Errors: Component: ARM Compiler 5.06 update 3 (build 300)
        [DEBUG] Errors: Tool: fromelf [4d35c3]
        [DEBUG] Errors: Finished: 3 information, 0 warning and 1 error messages.
@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 22, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Feb 22, 2018

Build : SUCCESS

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

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.

@cmonr cmonr merged commit 55f710f into ARMmbed:master Feb 23, 2018

18 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
mbed-ci-generic Build finished.
Details
travis-ci/docs/ Local docs testing has passed
Details
travis-ci/events/ Local events testing has passed
Details
travis-ci/littlefs/ Local littlefs testing has passed
Details
travis-ci/mbed2-ATMEL/ Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM/ Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC/ Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON/ Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP/ Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-SILICON_LABS/ Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM/ Local mbed2-STM testing has passed
Details
@mbed-ci

This comment has been minimized.

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