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] Account for 0-terminator in WriteConfigValueStr #26510

Merged
merged 3 commits into from
May 13, 2023

Conversation

arkq
Copy link
Contributor

@arkq arkq commented May 11, 2023

Problem

On Tizen test TestConfigurationMgr fails on "Test ConfigurationMgr::SerialNumber" because during reading a serial number from the GetDeviceInstanceInfoProvider() the returned string is not 0-terminated.

Changes

When handling string values in ConfigurationManagerImpl (which internally uses PosixConfig) account for 0-terminator.

Testing

Tested locally (in the future all unit tests will be checked by the CI, but firstly we need to fix all failing tests):

root:~> /opt/usr/apps/TestConfigurationMgr 
'#0:','ConfigurationMgr tests'
'#2:','Setup                                      ','PASSED'
'#3:','Test PlatformMgr::Init                     ','PASSED'
'#3:','Test PlatformMgr::RunUnitTest              ','PASSED'
'#3:','Test ConfigurationMgr::SerialNumber        ','PASSED'
'#3:','Test ConfigurationMgr::UniqueId            ','PASSED'
'#3:','Test ConfigurationMgr::ManufacturingDate   ','PASSED'
'#3:','Test ConfigurationMgr::HardwareVersion     ','PASSED'
'#3:','Test ConfigurationMgr::FirmwareBuildTime   ','PASSED'
'#3:','Test ConfigurationMgr::CountryCode         ','PASSED'
'#3:','Test ConfigurationMgr::GetPrimaryMACAddress','PASSED'
'#3:','Test ConfigurationMgr::GetFailSafeArmed    ','PASSED'
'#3:','Test ConfigurationMgr::GetVendorName       ','PASSED'
'#3:','Test ConfigurationMgr::GetVendorId         ','PASSED'
'#3:','Test ConfigurationMgr::GetProductName      ','PASSED'
'#3:','Test ConfigurationMgr::GetProductId        ','PASSED'
'#4:','Teardown                                   ','PASSED'
'#6:','0','14'
'#7:','0','100053'

@github-actions
Copy link

PR #26510: Size comparison from b3b2dc2 to 916010e

Increases (1 build for cc32xx)
platform target config section b3b2dc2 916010e change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 19674626 19674627 1 0.0
Full report (1 build for cc32xx)
platform target config section b3b2dc2 916010e change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 605002 605002 0 0.0
(read/write) 204164 204164 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197576 197576 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 957619 957619 0 0.0
.debug_aranges 101232 101232 0 0.0
.debug_frame 342080 342080 0 0.0
.debug_info 19674626 19674627 1 0.0
.debug_line 2671903 2671903 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1491139 1491139 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94412 94412 0 0.0
.debug_str 3131828 3131828 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104314 104314 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 483089 483089 0 0.0
.symtab 287232 287232 0 0.0
.text 498564 498564 0 0.0

src/platform/Tizen/PosixConfig.cpp Outdated Show resolved Hide resolved
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
@arkq arkq merged commit 4083b32 into project-chip:master May 13, 2023
@arkq arkq deleted the tizen-fix-str-storage branch May 13, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants