Skip to content

PR : Add KVP_PROFILE macros for signed integer APIs (int8, int16, int32, int64) #238

Merged
kanjoe24 merged 5 commits intodevelopfrom
feature/gh236-add-kvp-profile-macros
Mar 25, 2026
Merged

PR : Add KVP_PROFILE macros for signed integer APIs (int8, int16, int32, int64) #238
kanjoe24 merged 5 commits intodevelopfrom
feature/gh236-add-kvp-profile-macros

Conversation

@kanjoe24
Copy link
Copy Markdown
Contributor

Add KVP_PROFILE macros for signed integer APIs (int8, int16, int32, int64)

Copilot AI and others added 3 commits March 25, 2026 13:58
…nt64)

Added UT_KVP_PROFILE_GET_INT8/INT16/INT32/INT64 getter macros and
UT_ASSERT_KVP_EQUAL_PROFILE_INT8/INT16/INT32/INT64 assert macros in
ut_kvp_profile.h for the new signed integer APIs from ut-control.

Also added:
- Weak implementations for ut_kvp_getInt8/16/32/64Field
- Test data for signed integers in YAML and JSON test assets
- Test functions exercising the new macros in both YAML and JSON suites

Co-authored-by: kanjoe24 <165808281+kanjoe24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rdkcentral/ut-core/sessions/75aa1437-0247-48e0-963d-421645dd54a0
@kanjoe24 kanjoe24 requested a review from a team as a code owner March 25, 2026 15:09
Copilot AI review requested due to automatic review settings March 25, 2026 15:10
@kanjoe24 kanjoe24 linked an issue Mar 25, 2026 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the KVP “profile” convenience macros and accompanying tests/assets to support signed integer retrieval/assertion (int8/int16/int32/int64).

Changes:

  • Added UT_KVP_PROFILE_GET_INT{8,16,32,64} and UT_ASSERT_KVP_EQUAL_PROFILE_INT{8,16,32,64} macros.
  • Added new unit tests validating signed integer access for both YAML and JSON profiles.
  • Updated test YAML/JSON assets with signed integer fields; added .variant to .gitignore.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
include/ut_kvp_profile.h Adds profile getter + assert macros for signed integer APIs.
tests/src/c_source/ut_test_kvp_profile.c Adds test cases and registers them for YAML/JSON suites.
tests/src/assets/test_kvp.yaml Adds signed integer test values; fixes list indentation/formatting.
tests/src/assets/test_kvp.json Adds signed integer test values.
tests/src_weak/ut_test_weak_kvp.c Adds weak stub implementations for the new signed integer getters.
.gitignore Ignores .variant generated by the build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 25, 2026 15:59
@kanjoe24 kanjoe24 review requested due to automatic review settings March 25, 2026 15:59
@kanjoe24
Copy link
Copy Markdown
Contributor Author

test logs:

./run.sh 

UT CORE Version: 5.0.0-6-g82a4388
Listing Filename:[/tmp/ut-log_2026-03-25_160323.log-Listing.xml]
Results Filename:[/tmp/ut-log_2026-03-25_160323.log]
Setting Log Path [./logs]
Listing Filename:[./logs/ut-log_2026-03-25_160323.log-Listing.xml]
Results Filename:[./logs/ut-log_2026-03-25_160323.log]
Using Profile[./assets/test_kvp.yaml]
Using Profile[assets/config-test.yaml]
Using Profile[assets/5d.yaml]

2026-03-25-16:03:23, LOG   , ut_cunit.c,   147 : ---- start of test run ----

 ut-core: Wrapper framework for testing frameworks

***************** CUNIT CONSOLE - MAIN MENU ******************************
(R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit
Enter command: r

2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert open / close
2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile open()'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   238 : test_ut_kvp_profile_open - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   240 : test_ut_kvp_profile_open - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile open()'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile getInstance()'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   285 : Check ut_kvp_profile_getInstance() - Positive
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   289 : Tested for profile : assets/test_kvp.yaml
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   296 : Tested for profile : assets/config-test.yaml
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   304 : Tested for profile : assets/5d.yaml
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile getInstance()'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile close()'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   245 : test_ut_kvp_profile_close - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   249 : test_ut_kvp_profile_close - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile close()'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert testing yaml 
2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint8'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    43 : test_ut_kvp_profile_uint8 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    51 : test_ut_kvp_profile_uint8 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint8'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint16'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    58 : test_ut_kvp_profile_uint16 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    66 : test_ut_kvp_profile_uint16 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint16'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint32'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    73 : test_ut_kvp_profile_uint32 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    81 : test_ut_kvp_profile_uint32 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint32'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint64'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    88 : test_ut_kvp_profile_uint64
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    96 : test_ut_kvp_profile_uint64 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint64'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int8'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   173 : test_ut_kvp_profile_int8 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   182 : test_ut_kvp_profile_int8 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int8'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int16'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   190 : test_ut_kvp_profile_int16 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   199 : test_ut_kvp_profile_int16 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int16'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int32'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   207 : test_ut_kvp_profile_int32 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   216 : test_ut_kvp_profile_int32 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int32'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int64'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   224 : test_ut_kvp_profile_int64 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   233 : test_ut_kvp_profile_int64 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int64'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile string'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   103 : test_ut_kvp_profile_string
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   110 : test_ut_kvp_profile_string - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile string'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile bool'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   142 : test_ut_kvp_profile_bool
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   150 : test_ut_kvp_profile_bool - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile bool'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile list count'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   158 : test_ut_kvp_profile_list_count
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   165 : test_ut_kvp_profile_list_count - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile list count'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile right string long'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   117 : test_ut_kvp_profile_string
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   123 : test_ut_kvp_profile_string - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile right string long'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile left string long'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   130 : test_ut_kvp_profile_string
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   136 : test_ut_kvp_profile_string - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile left string long'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert testing json 
2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint8'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    43 : test_ut_kvp_profile_uint8 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    51 : test_ut_kvp_profile_uint8 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint8'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint16'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    58 : test_ut_kvp_profile_uint16 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    66 : test_ut_kvp_profile_uint16 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint16'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint32'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    73 : test_ut_kvp_profile_uint32 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    81 : test_ut_kvp_profile_uint32 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint32'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint64'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    88 : test_ut_kvp_profile_uint64
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,    96 : test_ut_kvp_profile_uint64 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint64'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int8'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   173 : test_ut_kvp_profile_int8 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   182 : test_ut_kvp_profile_int8 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int8'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int16'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   190 : test_ut_kvp_profile_int16 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   199 : test_ut_kvp_profile_int16 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int16'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int32'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   207 : test_ut_kvp_profile_int32 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   216 : test_ut_kvp_profile_int32 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int32'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int64'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   224 : test_ut_kvp_profile_int64 - start
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   233 : test_ut_kvp_profile_int64 - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int64'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile string'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   103 : test_ut_kvp_profile_string
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   110 : test_ut_kvp_profile_string - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile string'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile bool'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   142 : test_ut_kvp_profile_bool
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   150 : test_ut_kvp_profile_bool - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile bool'
2026-03-25-16:03:24, LOG   , ut_console.c,   633 : 

2026-03-25-16:03:24, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile list count'
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   158 : test_ut_kvp_profile_list_count
2026-03-25-16:03:24, STEP  , ut_test_kvp_profile.c,   165 : test_ut_kvp_profile_list_count - end
2026-03-25-16:03:24, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile list count'

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      3      3    n/a      0        0
               tests     27     27     27      0        0
             asserts    110    110    110      0      n/a

Elapsed time =    0.009 seconds


***************** CUNIT CONSOLE - MAIN MENU ******************************
(R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit
Enter command: q

2026-03-25-16:03:25, LOG   , ut_cunit.c,   177 : Logfile:[./logs/ut-log_2026-03-25_160323.log]
2026-03-25-16:03:25, LOG   , ut_cunit.c,   185 : ---- end of test run ----
jpn323@janus ~/workspace/ut-core-dec-2025/tests/build/bin (feature/gh236-add-kvp-profile-macros)$ 

@github-project-automation github-project-automation bot moved this from Todo to Approved For Merge in UT-Core Roadmap Mar 25, 2026
@kanjoe24 kanjoe24 merged commit 2bbc886 into develop Mar 25, 2026
7 checks passed
@github-project-automation github-project-automation bot moved this from Approved For Merge to Resolved in UT-Core Roadmap Mar 25, 2026
@kanjoe24 kanjoe24 deleted the feature/gh236-add-kvp-profile-macros branch March 25, 2026 16:34
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Resolved

Development

Successfully merging this pull request may close these issues.

Task:Add KVP_PROFILE macros for apis added to retrieve signed values

4 participants