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

Enable low-power ticker and Sleep for FastModels #10124

Merged
merged 6 commits into from
Apr 9, 2019

Conversation

jamesbeyond
Copy link
Contributor

Description

This PR enabled low-power ticker and Sleep HAL API for FastModels.
with enabling of low-power and Sleep API would allow FastModels run more greentea tests.

Pull request type

[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@@ -74,9 +74,10 @@ Case cases[] = {
Case("1 s delay during deepsleep (attach_us)", test_deepsleep<AttachUSTester<LowPowerTimeout>, 1000000, LONG_DELTA_US>,
greentea_failure_handler),
#endif

#if !defined(__ARM_FM) //FastModels not support time drifting test
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it OK to remove some tests because they are not passing....?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure how is it not supported?

@ARMmbed/mbed-os-hal to review

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is same story as #10030

For partner's targets/platforms, which will be used real life production. we are not allow them to skip tests, if they can't make them pass. The tests are mean to check that all platform comply with mbed HAL API.

FastModel it is a software simulator for Arm platform/cores. mean to be used as a tool for testing or early stage development. It is will never be used for any real IoT products.
They can simulator how ARM core works. One of issue for software simulator is they running on your host PC, they can't grantee the timing accuracy as microelectronics.

So the exception is just for the software models

@ciarmcom
Copy link
Member

@jamesbeyond, thank you for your changes.
@ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-test @ARMmbed/mbed-os-core please review.

@ciarmcom ciarmcom requested review from a team March 15, 2019 14:00
@jamesbeyond
Copy link
Contributor Author

Attched the GreenTea test results:

| target          | platform_name | test suite                                                                   | result | elapsed_time (sec) | copy_method |
|-----------------|---------------|------------------------------------------------------------------------------|--------|--------------------|-------------|
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-basic_test                        | OK     | 9.75               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-basic_test_default                | OK     | 9.33               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_async_validate               | OK     | 9.55               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_control_async                | OK     | 9.75               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_control_repeat               | OK     | 9.62               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_selection                    | OK     | 10.84              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_setup_failure                | OK     | 9.46               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-case_teardown_failure             | OK     | 10.27              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-control_type                      | OK     | 9.64               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-minimal_async_scheduler           | OK     | 9.74               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-minimal_scheduler                 | OK     | 10.64              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup | OK     | 9.56               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-test_setup_case_selection_failure | OK     | 9.36               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-test_setup_failure                | OK     | 10.34              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-frameworks-utest-tests-unit_tests-test_skip                         | OK     | 9.4                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-nvstore-tests-nvstore-functionality                         | OK     | 16.16              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-buffered_block_device                     | OK     | 9.38               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-flashsim_block_device                     | OK     | 9.55               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-general_block_device                      | OK     | 9.52               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-heap_block_device                         | OK     | 9.47               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-mbr_block_device                          | OK     | 9.91               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-blockdevice-util_block_device                         | OK     | 9.62               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-kvstore-static_tests                                  | OK     | 10.22              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | features-storage-tests-kvstore-tdbstore_whitebox                             | OK     | 9.49               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-events-queue                                                           | OK     | 9.84               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-events-timing                                                          | OK     | 38.64              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-integration-basic                                                      | OK     | 9.97               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-c_strings                                                 | OK     | 9.97               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-crc                                                       | OK     | 9.74               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-dev_null                                                  | OK     | 11.56              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-echo                                                      | OK     | 20.47              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-flashiap                                                  | OK     | 9.7                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-generic_tests                                             | OK     | 9.32               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-lp_ticker                                                 | OK     | 9.86               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-lp_timeout                                                | OK     | 10.2               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-lp_timer                                                  | OK     | 9.84               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-race_test                                                 | OK     | 9.7                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-sleep_lock                                                | OK     | 9.49               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-stl_features                                              | OK     | 9.59               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-ticker                                                    | OK     | 9.64               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-timeout                                                   | OK     | 10.35              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-timer                                                     | OK     | 9.82               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_drivers-timerevent                                                | OK     | 9.74               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_functional-callback                                               | OK     | 10.53              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_functional-callback_big                                           | OK     | 9.43               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_functional-callback_small                                         | OK     | 9.75               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_functional-functionpointer                                        | OK     | 9.54               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-common_tickers                                                | OK     | 9.9                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-critical_section                                              | OK     | 10.42              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-flash                                                         | OK     | 9.64               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-lp_ticker                                                     | OK     | 9.37               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-minimum_requirements                                          | OK     | 10.93              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-mpu                                                           | OK     | 9.71               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-pinmap                                                        | OK     | 9.59               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-rtc_time                                                      | OK     | 9.93               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-rtc_time_conv                                                 | OK     | 119.01             | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-sleep                                                         | OK     | 9.45               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-sleep_manager                                                 | OK     | 9.9                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-sleep_manager_racecondition                                   | OK     | 11.88              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-stack_size_unification                                        | OK     | 10.06              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-ticker                                                        | OK     | 10.23              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_hal-us_ticker                                                     | OK     | 9.53               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-circularbuffer                                           | OK     | 9.49               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-critical_section                                         | OK     | 9.86               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-error_handling                                           | OK     | 9.43               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-filehandle                                               | OK     | 9.62               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-sharedptr                                                | OK     | 9.34               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-singletonptr                                             | OK     | 10.4               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-stream                                                   | OK     | 9.64               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-system_reset                                             | OK     | 10.91              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbed_platform-transaction                                              | OK     | 9.55               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-attributes                                              | OK     | 9.46               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-call_before_main                                        | OK     | 9.39               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-cpp                                                     | OK     | 9.39               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-div                                                     | OK     | 10.32              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-mbed-static_assert                                           | OK     | 9.44               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-condition_variable                                 | OK     | 9.38               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-event_flags                                        | OK     | 9.41               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-heap_and_stack                                     | OK     | 9.93               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-kernel_tick_count                                  | OK     | 9.67               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-mail                                               | OK     | 9.94               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-malloc                                             | OK     | 10.49              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-memorypool                                         | OK     | 9.72               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-mutex                                              | OK     | 9.6                | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-queue                                              | OK     | 9.51               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-rtostimer                                          | OK     | 10.09              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-semaphore                                          | OK     | 9.73               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-signals                                            | OK     | 10.09              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedmicro-rtos-mbed-threads                                            | OK     | 9.63               | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedtls-multi                                                          | OK     | 10.28              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-mbedtls-selftest                                                       | OK     | 15.46              | default     |
| FVP_MPS2_M3-ARM | FVP_MPS2_M3   | tests-network-l3ip                                                           | OK     | 10.6               | default     |
mbedgt: test suite results: 92 OK

@cmonr
Copy link
Contributor

cmonr commented Mar 27, 2019

@jamesbeyond I really liked the response for why the test is being skipped for this target (#10124 (comment))

Would you mind ammending the commit that adds that line so that the commit history has that information?

Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

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

Awaiting commit update

Qinghao Shi added 5 commits April 3, 2019 16:37
 - reanme US_TICKER_TIMER1 to US_TICKER_COUNTER
 - reanme US_TICKER_TIMER2 to US_TICKER_INTERRUPT
FastModels are a software simulator for Arm platform/cores.
They mean to be used as a tool for testing or early prototype stage development.
Due to the nature of software simulator can't grantee the timing accuracy like HW.
So time drifting test is skipped for software models.
@jamesbeyond
Copy link
Contributor Author

Hi, the commits been updated. Could you review again?
@cmonr @0xc0170 @ARMmbed/mbed-os-test

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

One small addition - SPDX identifier to new files (sleep_api.c file). Otherwise LGTM

WIll schedule CI as soon as license is fixed in two files

@jamesbeyond
Copy link
Contributor Author

@0xc0170
SPDX identifier license added, Cheers!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 8, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 8, 2019

Test run: FAILED

Summary: 1 of 13 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

@jamesbeyond
Copy link
Contributor Author

Checking the failed exporter test, it failed at UBLOX_EVK_ODIN_W2_make_armc6, which is not related to the changes I bring in. Digging a little deeper into the log, I found it failed due to license issue:

armclang: error: Failed to check out a license.
Unable to connect to the license server. Check that ARMLMD_LICENSE_FILE is set correctly, and the license server is available.
armclang: note: 
Information about this error is available at: http://ds.arm.com/support/lic56/m96
 General licensing information is available at: http://ds.arm.com/support/licensing/
 If you need further help, provide this complete error report to your supplier or license.support@arm.com.
 - ARMLMD_LICENSE_FILE: '8225@armcc.licenses.mbedcloudtesting.com'
 - LM_LICENSE_FILE: unset
 - ARM_TOOL_VARIANT: unset
 - ARM_PRODUCT_PATH: unset
 - Product location: /usr/local/ARMCompiler6.11/sw/mappings
 - Toolchain location: /usr/local/ARMCompiler6.11/lib/tt_default/bin
 - Selected tool variant: sitelicense
armclang: note: 
 - Checkout feature: rvct_site5
 - Feature version: 5.0201810
 - Flex error code: -96
Product: ARM Compiler 6.11 Sitelicense
Component: ARM Compiler 6.11
Tool: armclang [5d3b4200]

make[1]: *** [mbed-os/targets/TARGET_STM/sleep.o] Error 1
make[1]: *** Waiting for unfinished jobs....
armclang: error: Failed to check out a license.

@cmonr
Copy link
Contributor

cmonr commented Apr 8, 2019

CI job restarted: jenkins-ci/mbed-os-ci_exporter

ARMc6 license issue.

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.

None yet

7 participants