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

[Tizen] Fix systemd services race when running tests #25460

Merged
merged 4 commits into from
Mar 7, 2023

Conversation

arkq
Copy link
Contributor

@arkq arkq commented Mar 3, 2023

Problem

Tests on Tizen QEMU image are launched by the serial-getty service after auto login to root. However, there is no explicit before/after ordering between serial-getty service and the ISO image mounting service. On slow systems (e.g. CI) it might happen that the serial-getty is started before ISO image mount target. This results in tests being not launched...

Changes

  • add explicit run ordering between serial-getty and multi-user target, which shall guarantee that tests will be launched after CHIP ISO image is mounted and all Tizen services are ready
  • improve tizen-qemu docker build time by batching guestfish commands
  • add required by GDB libncurses5 to Tizen docker image

Testing

Tested locally, that the [email protected] is always run after multi-user.target:

before:

...
INFO    [  OK  ] Started Serial Getty on ttyAMA0. 
INFO    [  OK  ] Reached target Login Prompts.           <-- this should be the last service
INFO    [  OK  ] Started Cleanup private sharing.
INFO    [  OK  ] Found device /dev/disk/by-label/CHIP. 
...
INFO    [  OK  ] Mounted /mnt/chip.
...

INFO    localhost login: root (automatic login)

after:

...
INFO    [  OK  ] Reached target Multi-User System.
INFO    [  OK  ] Started Serial Getty on ttyAMA0. 
INFO    [  OK  ] Reached target Login Prompts. 
INFO  
INFO
INFO    localhost login: root (automatic login)
...

On the Tizen QEMU image tests are launched by the serial-getty service
after auto login to root. However, there is no explicit before/after
ordering between serial-getty service and ISO image mounting service. On
slow systems (e.g. CI) it might happen that the serial-getty is started
before ISO image mount target. This results in tests being not
launched...

This commit adds explicit run ordering between serial-getty and
multi-user target, which shall guarantee that tests will be launched
after CHIP ISO image is mounted and all Tizen services are ready.
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

PR #25460: Size comparison from af3fdc5 to ac9cdc8

Increases (1 build for cc32xx)
platform target config section af3fdc5 ac9cdc8 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20262928 20262929 1 0.0
Full report (2 builds for cc32xx, mbed)
platform target config section af3fdc5 ac9cdc8 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643465 643465 0 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930213 930213 0 0.0
.debug_aranges 87336 87336 0 0.0
.debug_frame 300024 300024 0 0.0
.debug_info 20262928 20262929 1 0.0
.debug_line 2657820 2657820 0 0.0
.debug_loc 2800026 2800026 0 0.0
.debug_ranges 282240 282240 0 0.0
.debug_str 3023883 3023883 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 378514 378514 0 0.0
.symtab 256560 256560 0 0.0
.text 535412 535412 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2467384 2467384 0 0.0
.bss 215804 215804 0 0.0
.data 5880 5880 0 0.0
.text 1430028 1430028 0 0.0

@github-actions
Copy link

github-actions bot commented Mar 6, 2023

PR #25460: Size comparison from 32fb896 to 729b51a

Increases (1 build for cc32xx)
platform target config section 32fb896 729b51a change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20262927 20262928 1 0.0
Full report (1 build for cc32xx)
platform target config section 32fb896 729b51a change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643465 643465 0 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930213 930213 0 0.0
.debug_aranges 87336 87336 0 0.0
.debug_frame 300024 300024 0 0.0
.debug_info 20262927 20262928 1 0.0
.debug_line 2657822 2657822 0 0.0
.debug_loc 2800026 2800026 0 0.0
.debug_ranges 282240 282240 0 0.0
.debug_str 3023883 3023883 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 378514 378514 0 0.0
.symtab 256560 256560 0 0.0
.text 535412 535412 0 0.0

@github-actions
Copy link

github-actions bot commented Mar 6, 2023

PR #25460: Size comparison from 32fb896 to ab517fb

Increases (1 build for cc32xx)
platform target config section 32fb896 ab517fb change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20262927 20262928 1 0.0
Full report (1 build for cc32xx)
platform target config section 32fb896 ab517fb change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643465 643465 0 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930213 930213 0 0.0
.debug_aranges 87336 87336 0 0.0
.debug_frame 300024 300024 0 0.0
.debug_info 20262927 20262928 1 0.0
.debug_line 2657822 2657822 0 0.0
.debug_loc 2800026 2800026 0 0.0
.debug_ranges 282240 282240 0 0.0
.debug_str 3023883 3023883 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 378514 378514 0 0.0
.symtab 256560 256560 0 0.0
.text 535412 535412 0 0.0

@andy31415 andy31415 merged commit 69ec3ea into project-chip:master Mar 7, 2023
@arkq arkq deleted the tizen-qemu-race-fix branch March 7, 2023 07:58
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
)

* [Tizen] Fix systemd services race when running tests

On the Tizen QEMU image tests are launched by the serial-getty service
after auto login to root. However, there is no explicit before/after
ordering between serial-getty service and ISO image mounting service. On
slow systems (e.g. CI) it might happen that the serial-getty is started
before ISO image mount target. This results in tests being not
launched...

This commit adds explicit run ordering between serial-getty and
multi-user target, which shall guarantee that tests will be launched
after CHIP ISO image is mounted and all Tizen services are ready.

* Do not run runner script in the interactive mode

* Add libncurses5 (required by GDB) to Tizen docker image
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.

4 participants