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

Create Tests workflow, will house certification tests #7381

Merged
merged 31 commits into from
Jun 4, 2021

Conversation

woody-apple
Copy link
Contributor

Problem

Now that we have a simple description language for tests, certification will use it to run all tests in CI for the SDK

Change overview

  • GitHub workflow to run tests
  • A fix to allow messages to work
  • Setup pairing in chip-tool test mode

Testing

How was this tested? (at least one bullet point required)

  • Ran act to verify the job runs
  • Run locally on my linux server
  • Tested using two yamls

@woody-apple woody-apple mentioned this pull request Jun 4, 2021
@woody-apple
Copy link
Contributor Author

Note: Linux crashes now in Exchange, not sure why. Would love eyes on it.

Need to also have this auto gen tests.

@github-actions
Copy link

github-actions bot commented Jun 4, 2021

Size increase report for "esp32-example-build" from bfe602b

File Section File VM
chip-all-clusters-app.elf .flash.rodata 72 72
chip-all-clusters-app.elf .flash.text 44 44
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,121
.debug_line,0,88
.flash.rodata,72,72
.debug_loc,0,59
.flash.text,44,44
[Unmapped],0,-72

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize


@github-actions
Copy link

github-actions bot commented Jun 4, 2021

Size increase report for "gn_qpg6100-example-build" from bfe602b

File Section File VM
chip-qpg6100-lighting-example.out .text 128 128
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,339
.text,128,128
.debug_str,0,63
.debug_line,0,56
.debug_loc,0,56
.debug_abbrev,0,26
.debug_frame,0,4
[Unmapped],0,-128

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'


@woody-apple
Copy link
Contributor Author

OK, this is ready for integration now. Thanks @pan-apple!

This covers testing of:
• Real ubuntu/linux C++ chip tool
• Darwin built C++ chip tool

Note: there are races in our stack that this has already found, and will continue to do so. A couple major ones are fixed/worked around in here

Next steps post this PR are:
• Auto-generating code from the YAML files, instead of requiring manual generation.
• Fix all the races

@Damian-Nordic @andy31415 @jepenven-silabs @hawk248 @jelderton @bzbarsky-apple ?

scripts/tests/test_suites.sh Outdated Show resolved Hide resolved
src/transport/AdminPairingTable.h Show resolved Hide resolved
src/transport/SecureSessionMgr.cpp Show resolved Hide resolved
woody-apple and others added 2 commits June 4, 2021 14:12
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
@todo
Copy link

todo bot commented Jun 4, 2021

Remove this work around due to crashes when storage is accessed from multiple threads and passed around

// TODO: Remove this work around due to crashes when storage is accessed from multiple threads and passed around
static PersistentStorage gStorage;
int Commands::Run(NodeId localId, NodeId remoteId, int argc, char ** argv)
{
CHIP_ERROR err = CHIP_NO_ERROR;
err = chip::Platform::MemoryInit();
VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(Controller, "Init Memory failure: %s", chip::ErrorStr(err)));


This comment was generated by todo based on a TODO comment in 7020bbc in #7381. cc @woody-apple.

@todo
Copy link

todo bot commented Jun 4, 2021

Remove this workaround once we understand the message queue and shutdown race

// TODO: Remove this workaround once we understand the message queue and shutdown race
test_os_sleep_ms(1000);
mCommissioner.Shutdown();
VerifyOrReturnError(GetCommandExitStatus(), CHIP_ERROR_INTERNAL);


This comment was generated by todo based on a TODO comment in 7020bbc in #7381. cc @woody-apple.

echo " ===== Running test: $i"
echo " * Starting cluster server"
rm -rf /tmp/chip_tool_config.ini
sleep 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we should avoid having "sleep" calls anywhere in the code. This seems to indicate we have some racing issues here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep. We do; see all the TODO comments. I have PRs up to fix the races (#7428 and #7430) and a PR up at #7433 that removes the sleeps and another at #7434 to remove the TODO workarounds. Reviews on those would be much appreciated, @andy31415 !

nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
)

* Initial stab

* Adding test runs

* Removing this

* Making this +x

* Oops

* Running all tests

* Delete storage just inc ase

* Trying to run this in darwin too

* Moving darwin into tests

* Testing out mbedtls

* Fixing gStorage

* Fixing quoting

* Wait for pairing

* next

* Trying 0.0.0.0

* ::1

* Testing cache

* Removing cache

* IPv6 localhost for today

* IPv6 localhost

* Moving to this pin code

* check validity of mTransportMgr

* collect core dump

* remove controller shutdown

* delay controller shutdown in the test

* restyled

* Removing this, not needed anymore

* Empty defines

* Update scripts/tests/test_suites.sh

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Adding todos

Co-authored-by: Pankaj Garg <pgarg2@apple.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
@woody-apple woody-apple deleted the test_ci branch July 6, 2022 01:04
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.

6 participants