Skip to content

Error when bootloader is specified but does not exist #4136

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 2 commits into from
May 2, 2017

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Apr 7, 2017

Descritpion

This patch changes the behavior when a bootloader is specified, but not
present. It is now considered a Bad Config™.

How to reproduce

Take the mbed-os-example-bootloader-blinky example and delete the
bootloader directory. You will now see a niceawful IOError.

New behavior

Do the steps to reproduce, but with this branch as mbed-os. The error
message that you will get it a ConfigException:
"Bootloader not found".

TODO

  • Write unit test that tests this behavior
  • Ensure that the unit test runs as part of Travis CI

@theotherjimmy
Copy link
Contributor Author

@MaggieMei You caused this error on the online compiler about 10 hours ago, FYI.

@0xc0170 Could you continue to be a great gatekeeper?

@c1728p9 I said I would do it. Now look at what I've done. 😈

tools/config.py Outdated
@@ -502,6 +502,8 @@ def regions(self):
"build a bootloader project")
if 'target.bootloader_img' in target_overrides:
filename = target_overrides['target.bootloader_img']
if not exists(filename):
raise ConfigException("Bootoalder %s not found" % filename)
Copy link
Contributor

@0xc0170 0xc0170 Apr 10, 2017

Choose a reason for hiding this comment

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

Typo: Bootloader. Once fixed, please run tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol. Let me fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also made a typo in the branch name.

@theotherjimmy
Copy link
Contributor Author

@0xc0170 I fixed the typo. Thanks for the review!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 12, 2017

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

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

/morph test-nightly

Output

mbed Build Number: 1895

Example Build failed!

@bridadan
Copy link
Contributor

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

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

/morph test-nightly

Output

mbed Build Number: 27

Test failed!

@sg-
Copy link
Contributor

sg- commented Apr 19, 2017

@studavekar @bridadan

[1492557014.19][CONN][INF] found KV pair in stream: {{max_heap_usage;3984}}, queued...
[1492557014.20][HTST][ERR] orphan event in main phase: {{max_heap_usage;3984}}, timestamp=1492557014.195000
[1492557014.26][CONN][INF] found KV pair in stream: {{__thread_info;"0x00000d869-0x000000000",112,800}}, queued...
[1492557014.26][HTST][ERR] orphan event in main phase: {{__thread_info;"0x00000d869-0x000000000",112,800}}, timestamp=1492557014.259000
[1492557014.31][CONN][INF] found KV pair in stream: {{__thread_info;"0x00000cd7d-0x000000000",1428,4096}}, queued...
[1492557014.31][HTST][ERR] orphan event in main phase: {{__thread_info;"0x00000cd7d-0x000000000",1428,4096}}, timestamp=1492557014.311000
[1492557014.36][CONN][INF] found KV pair in stream: {{__thread_info;"0x000003d45-0x000000000",592,1200}}, queued...
[1492557014.38][HTST][ERR] orphan event in main phase: {{__thread_info;"0x000003d45-0x000000000",592,1200}}, timestamp=1492557014.364000
[1492557014.42][CONN][INF] found KV pair in stream: {{__thread_info;"0x0000024b5-0x020000cdc",160,512}}, queued...
[1492557014.43][HTST][ERR] orphan event in main phase: {{__thread_info;"0x0000024b5-0x020000cdc",160,512}}, timestamp=1492557014.418000
[1492557014.48][CONN][INF] found KV pair in stream: {{__thread_info;"0x0000022a1-0x020000cdc",120,512}}, queued...
[1492557014.49][HTST][ERR] orphan event in main phase: {{__thread_info;"0x0000022a1-0x020000cdc",120,512}}, timestamp=1492557014.481000
[1492557014.53][CONN][INF] found KV pair in stream: {{__thread_info;"0x000002219-0x0200014d8",128,512}}, queued...
[1492557014.54][HTST][ERR] orphan event in main phase: {{__thread_info;"0x000002219-0x0200014d8",128,512}}, timestamp=1492557014.533000
[1492557014.59][CONN][INF] found KV pair in stream: {{__thread_info;"0x00000cdc5-0x000000000",72,512}}, queued...
[1492557014.59][HTST][ERR] orphan event in main phase: {{__thread_info;"0x00000cdc5-0x000000000",72,512}}, timestamp=1492557014.587000
[1492557014.61][CONN][INF] found KV pair in stream: {{end;failure}}, queued...
[1492557014.61][HTST][INF] __notify_complete(False)
[1492557014.62][CONN][INF] found KV pair in stream: {{__exit;0}}, queued...
[1492557014.62][HTST][INF] __exit(0)
[1492557014.63][HTST][INF] __exit_event_queue received
[1492557014.63][HTST][INF] test suite run finished after 14.07 sec...
[1492557014.63][CONN][INF] received special even '__host_test_finished' value='True', finishing
[1492557014.67][HTST][INF] CONN exited with code: 0
[1492557014.67][HTST][INF] No events in queue
[1492557014.67][HTST][INF] stopped consuming events
[1492557014.67][HTST][INF] host test result() call skipped, received: False
[1492557014.67][HTST][INF] calling blocking teardown()
[1492557014.73][HTST][INF] teardown() finished
[1492557014.73][HTST][INF] {{result;failure}}

@studavekar
Copy link
Contributor

looks like more than 1/4 of echo packets received didn't match the size

[1492557005.42][CONN][RXD] [00] sent...256 Bytes
[1492557005.94][CONN][RXD] [00] recv...-3001 Bytes
[1492557005.97][CONN][RXD] [01] sent...256 Bytes
[1492557006.49][CONN][RXD] [01] recv...-3001 Bytes

failure was asserted TEST_ASSERT(success > 3*ECHO_LOOPS/4);

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 19, 2017

looks like more than 1/4 of echo packets received didn't match the size

Seems like random issue, and not not related to this changeset.

cc @geky

@geky
Copy link
Contributor

geky commented Apr 19, 2017

The Austin site actually had internal networking issues last night, we suspect that was responsible for these test failures.
/morph test-nightly

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test-nightly

Output

mbed Build Number: 39

All builds and test passed!

@adbridge
Copy link
Contributor

@theotherjimmy Presumably this still needs the test adding before this should be merged?

@theotherjimmy
Copy link
Contributor Author

@adbridge Yup. I'm going to rebase first.

The changes to build_api.py make the error happen when running things
like get_config.py
@theotherjimmy
Copy link
Contributor Author

@adbridge I added the unit test. I need to refactor the testing frameworks to use one system.

@adbridge
Copy link
Contributor

@theotherjimmy Is this unit test now being automatically run in the ci ?

@theotherjimmy
Copy link
Contributor Author

That's the next check. I'm going to look a travis in a minute or two.

@theotherjimmy
Copy link
Contributor Author

sigh we're waiting in queue

@theotherjimmy
Copy link
Contributor Author

I saw the test run.

@theotherjimmy
Copy link
Contributor Author

I named the test wrong. Re-pushed the commit with a better name

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 21, 2017

/morph test-nightly

@theotherjimmy
Copy link
Contributor Author

It still ran.

@mbed-bot
Copy link

Result: FAILURE

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

/morph test-nightly

Output

mbed Build Number: 60

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 24, 2017

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

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

/morph test-nightly

Output

mbed Build Number: 75

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 25, 2017

Interesting, havent yet seen this one, odin fails for tests-mbedtls-selftest ? Not the same as previosly, I'll rerun.

/morph test-nightly

@bridadan
Copy link
Contributor

bridadan commented Apr 25, 2017

@0xc0170 I remember seeing this once long ago. The device is reporting the failure, so it's definitely legit (not an infrastructure issue). May be worth mentioning to ublox?

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 25, 2017

cc @andreaslarssonublox - please have a look at #4136 (comment) (the failure for odin there)

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test-nightly

Output

mbed Build Number: 83

All builds and test passed!

@andreaslarssonublox
Copy link

andreaslarssonublox commented Apr 26, 2017

@0xc0170 Thanks for the info. We will look at it.
u-blox ref: TE_OM2-46

@theotherjimmy theotherjimmy merged commit 7f0ed3b into ARMmbed:master May 2, 2017
exmachina-auto-deployer pushed a commit to exmachina-dev/mbed-os that referenced this pull request May 16, 2017
…lwip_broadcast

Release mbed OS 5.4.5 and mbed lib v142

Ports for Upcoming Targets

Fixes and Changes

4059: [Silicon Labs] Rename targets ARMmbed#4059
4115: Support for Qt Creator Generic project export and associated Makefile ARMmbed#4115
3915: Feature vscode ARMmbed#3915
4205: tests: race test - add not supported for single threaded env ARMmbed#4205
4187: [NCS36510] Reduce default heap size allocated by IAR to 1/4 of RAM ARMmbed#4187
4145: test - add nanostack to examples.json file ARMmbed#4145
4093: Update.py: New feature - update a branch instead of a fork, plus general improvements. ARMmbed#4093
4225: fixed missing device_name for xDot and removed progen ARMmbed#4225
4243: Config: config header file should contain new line ARMmbed#4243
4251: Fix C++11 build error w/ u-blox EVK-ODIN-W2 ARMmbed#4251
4236: STM32 Fixed warning related to __packed redefinition ARMmbed#4236
4224: Add `mbed new .` output to export ARMmbed#4224
4190: LPC4088: Enable LWIP feature ARMmbed#4190
4136: Error when bootloader is specified but does not exist ARMmbed#4136
3881: Remove debug links to printf/exit in NDEBUG builds ARMmbed#3881
4260: Inherit Xadow M0 target from LPC11U35_501 ARMmbed#4260
4249: Add consistent button names across targets ARMmbed#4249
4254: Removed unused variable in TARGET_NXP/lpc17_emac.c ARMmbed#4254
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.

9 participants