Skip to content

Fix : gh #256 : Use -O0 not -o0 to set optimisation level for TARGET=linux - #258

Merged
Ulrond merged 4 commits into
developfrom
feature/gh256-fix-lowercase-o-optimisation-flag
Aug 5, 2026
Merged

Fix : gh #256 : Use -O0 not -o0 to set optimisation level for TARGET=linux#258
Ulrond merged 4 commits into
developfrom
feature/gh256-fix-lowercase-o-optimisation-flag

Conversation

@Ulrond

@Ulrond Ulrond commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #256

Applies the patch supplied by @looopTools in the issue, with authorship preserved via git am.

-o0 is not an optimisation flag — lowercase -o is "write output to this file", so -o0 asks for a file named 0. The TARGET=linux branch of the Makefile used it in two places; both are now -O0.

COMPILER := $(if $(filter CPP,$(VARIANT)),g++ -ggdb -O0 -Wall, gcc -ggdb -O0 -Wall)
UT_CONTROL_COMPILER := gcc -ggdb -O0 -Wall

TARGET=arm is untouched — it takes $(CC)/$(CXX) from the SDK and never carried the flag.

Note for reviewers: where the stray 0 file actually comes from

Every compile/link rule in ut-core appends its own -o $@ after $(COMPILER) (Makefile lines 152, 167, 172, 191, 198), and GCC lets the last -o win — gcc -ggdb -o0 -Wall -c t.c -o t.o exits 0 and produces t.o, no file named 0. So ut-core's own objects were named correctly; what was silently lost is the intended -O0 (benign in practice, as -O0 is gcc's default).

The object-naming symptom in the issue shows up downstream: UT_CONTROL_COMPILER is handed to the ut-control sub-make as CC="gcc -ggdb -o0 -Wall", and any command there that supplies no -o of its own writes a file called 0. The sibling typo in ut-control itself is rdkcentral/ut-control#130.

Verification

  • make printenv TARGET=linux now reports COMPILER [ gcc -ggdb -O0 -Wall].
  • grep -rn '\-o0' --include=Makefile --include=*.mk --include=*.sh . returns no hits.
  • Clean make TARGET=linux VARIANT=CPP under tests/: full success, ut-test links.
  • Clean make TARGET=linux under tests/: all objects compile and ut-test links. The run then stops on the pre-existing check_macros gate (30/33 macros documented in ut_cunit.h), which is source-content based and unaffected by compiler flags.
  • No file named 0 anywhere in the tree after either clean build.

Second commit: a regression guard in the tests suite

The typo itself is two characters, but it survived because no functional test could ever have caught it — gcc accepted -o0, the later -o $@ won, and -O0 is gcc's default, so every build stayed green and every binary stayed correct. Only a static check on the build files can see it.

tests/check_makefile_flags.py is wired into the suite as check_makefile_flags, alongside the existing check_macros gate, and runs before the framework build so a flag typo costs seconds rather than a full compile.

Two checks:

Check What it does
scan Walks every Makefile/*.mk/*.sh for a lowercase -o glued to an optimisation level — -o0, -os, -og, -ofast. Comments are stripped before matching, so prose describing the typo does not trip it. Third-party trees (framework/, build/, cpp_libs/) are skipped.
expect Asks make printenv what COMPILER and UT_CONTROL_COMPILER actually expand to and asserts -ggdb -O0 -Wall are present. This catches the flags being dropped or overridden, not just mistyped.

Expectations apply to TARGET=linux only — arm takes its compiler from the SDK.

Verified by reintroducing -o0 on top of the fix:

Mistyped optimisation flags:
Makefile:99: COMPILER := $(if $(filter CPP,$(VARIANT)),g++ -ggdb -o0 -Wall, gcc -ggdb -o0 -Wall) ❌
Makefile:100: UT_CONTROL_COMPILER := gcc -ggdb -o0 -Wall ❌
Lowercase -o names an output file. Optimisation is -O.

Expected flags missing:
COMPILER: missing -O0 ❌ - is [gcc -ggdb -o0 -Wall]
UT_CONTROL_COMPILER: missing -O0 ❌ - is [gcc -ggdb -o0 -Wall]

Mistyped optimisation flags :: 2
Expected flag sets met :: 0 / 2

Both checks fire, make exits 1. On the fixed tree: 25 build files scanned, 0 findings, 2/2 expectations met — confirmed for TARGET=linux, VARIANT=CPP, and TARGET=arm (scan only).

 -o0 was replaced with -O0 to correctly set optimisation level.
 This issue only happens with build target LINUX

Fixes #256
Copilot AI review requested due to automatic review settings July 27, 2026 16:33
@Ulrond
Ulrond requested a review from a team as a code owner July 27, 2026 16:33
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Ulrond Ulrond added bug Something isn't working community-contribution Contribution from community labels Jul 27, 2026
@Ulrond Ulrond self-assigned this Jul 27, 2026
@Ulrond
Ulrond requested review from bhanucbp and kanjoe24 July 27, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes a build-flag typo in the TARGET=linux Makefile branch where -o0 (output file) was incorrectly used instead of -O0 (optimization level 0), which could cause downstream builds (notably the ut-control sub-make invocation) to emit an unintended output file named 0.

Changes:

  • Replace -o0 with -O0 in the Linux COMPILER definition.
  • Replace -o0 with -O0 in the Linux UT_CONTROL_COMPILER definition (used when invoking the ut-control sub-make).

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

Adds check_makefile_flags to the tests suite, alongside the existing
check_macros static gate.

Two checks:
  scan    walks the build files for a lowercase -o glued to an
          optimisation level (-o0, -os, -og). gcc accepts these
          silently and a later -o $@ on the same command line wins,
          so nothing ever fails - which is why #256 went unnoticed.
  expect  asks make printenv what COMPILER and UT_CONTROL_COMPILER
          actually expand to and asserts -ggdb -O0 -Wall are present,
          catching the flags being dropped as well as mistyped.

Runs before the framework build so a flag typo is reported in
seconds rather than after a full compile. Expectations apply to
TARGET=linux only; arm takes its compiler from the SDK.

Verified by reintroducing -o0: both checks fail, exit 1.

Refs #256
@Ulrond
Ulrond force-pushed the feature/gh256-fix-lowercase-o-optimisation-flag branch from 23e5268 to 8646879 Compare July 27, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread tests/Makefile Outdated
Copilot AI review requested due to automatic review settings July 27, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread tests/Makefile Outdated
@kanjoe24

Copy link
Copy Markdown
Contributor

Release scripts are all ok:

 ./release-test-script-ut-core.sh -t feature/gh256-fix-lowercase-o-optimisation-flag -a /home/jpn323/arm-toolchain/environment-setup-armv7at2hf-neon-oe-linux-gnueabi
UT_CORE_BRANCH_NAME = feature/gh256-fix-lowercase-o-optimisation-flag
UT_CONTROL_BRANCH_NAME = 
UT_CONTROL_BRANCH_NAME is empty
==================== RESULTS FOR C VARIANT ====================
==========================================================
RESULTS for ubuntu 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
hal_test does not exist. PASS 
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for VM-SYNC 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/linux/openssl/lib/libssl.a exists. PASS 
framework/ut-control/host-tools/CMake-3.30.0/build/bin/cmake exists. PASS 
hal_test does not exist. PASS 
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for dunfell_arm 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
hal_test does not exist. PASS 
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for dunfell_linux 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
CURL static lib does not exist. PASS
Openssl static lib does not exist. PASS 
CMake host binary exists. PASS 
hal_test does not exist. PASS 
UT_CORE_TEST_BIN does not exist. FAIL 
==========================================================
==========================================================
RESULTS for kirkstone_arm 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
hal_test does not exist. PASS 
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for kirkstone_linux 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
hal_test does not exist. PASS 
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for cross 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
hal_test does not exist. PASS 
tests/build/bin/ut-test exists. PASS
==========================================================
==================== RESULTS FOR CPP VARIANT ====================
==========================================================
RESULTS for ubuntu 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
build/linux/cpp_libs/lib/libgtest.a exists. PASS
build/linux/cpp_libs/lib/libgtest_main.a exists. PASS
build/bin/hal_test exists. PASS
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for VM-SYNC 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/linux/openssl/lib/libssl.a exists. PASS 
framework/ut-control/host-tools/CMake-3.30.0/build/bin/cmake exists. PASS 
build/linux/cpp_libs/lib/libgtest.a exists. PASS
build/linux/cpp_libs/lib/libgtest_main.a exists. PASS
build/bin/hal_test exists. PASS
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for dunfell_arm 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
build/arm/cpp_libs/lib/libgtest.a exists. PASS
build/arm/cpp_libs/lib/libgtest_main.a exists. PASS
build/bin/hal_test exists. PASS
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for dunfell_linux 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
CURL static lib does not exist. PASS
Openssl static lib does not exist. PASS 
CMake host binary exists. PASS 
build/linux/cpp_libs/lib/libgtest.a exists. PASS
build/linux/cpp_libs/lib/libgtest_main.a exists. PASS
build/bin/hal_test exists. PASS
UT_CORE_TEST_BIN does not exist. FAIL 
==========================================================
==========================================================
RESULTS for kirkstone_arm 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
build/arm/cpp_libs/lib/libgtest.a exists. PASS
build/arm/cpp_libs/lib/libgtest_main.a exists. PASS
build/bin/hal_test exists. PASS
UT_CORE_TEST_BIN does not exist. FAIL 
==========================================================
==========================================================
RESULTS for kirkstone_linux 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
build/linux/cpp_libs/lib/libgtest.a exists. PASS
build/linux/cpp_libs/lib/libgtest_main.a exists. PASS
build/bin/hal_test exists. PASS
tests/build/bin/ut-test exists. PASS
==========================================================
==========================================================
RESULTS for cross 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
        . PASS
framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
build/arm/cpp_libs/lib/libgtest.a exists. PASS
build/arm/cpp_libs/lib/libgtest_main.a exists. PASS
build/bin/hal_test exists. PASS
tests/build/bin/ut-test exists. PASS
==========================================================
jpn323@janus ~/workspace/ut-core/scripts (feature/gh256-fix-lowercase-o-optimisation-flag)$ 
jpn323@janus ~/workspace/ut-core/scripts (feature/gh256-fix-lowercase-o-optimisation-flag)$ 
jpn323@janus ~/workspace/ut-core/scripts (feature/gh256-fix-lowercase-o-optimisation-flag)$ ./release-test-script-platform.sh -t feature/gh256-fix-lowercase-o-optimisation-flag -a /home/jpn323/arm-toolchain/environment-setup-armv7at2hf-neon-oe-linux-gnueabi
UT_CORE_BRANCH_NAME = feature/gh256-fix-lowercase-o-optimisation-flag
UT_CONTROL_BRANCH_NAME = 
UT_CONTROL_BRANCH_NAME is empty
==========================================================
RESULTS for ubuntu 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
            . PASS
/home/jpn323/workspace/ut-core/scripts/rdk-halif-hdmi_cec-ubuntu
ut/bin/hal_test_RCECHal exists. PASS
ut/ut-core/framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
==========================================================
==========================================================
RESULTS for VM-SYNC 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
            . PASS
/home/jpn323/workspace/ut-core/scripts/rdk-halif-hdmi_cec-VM-SYNC_linux
ut/bin/hal_test_RCECHal exists. PASS
ut/ut-core/framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
ut/ut-core/framework/ut-control/build/linux/openssl/lib/libssl.a exists. PASS 
ut/ut-core/framework/ut-control/host-tools/CMake-3.30.0/build/bin/cmake exists. PASS 
==========================================================
==========================================================
RESULTS for dunfell_arm 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
            . PASS
/home/jpn323/workspace/ut-core/scripts/rdk-halif-hdmi_cec-dunfell_arm
ut/bin/hal_test_RCECHal exists. PASS
ut/ut-core/framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
ut/ut-core/framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
==========================================================
==========================================================
RESULTS for dunfell_linux 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
            . PASS
/home/jpn323/workspace/ut-core/scripts/rdk-halif-hdmi_cec-dunfell_linux
ut/bin/hal_test_RCECHal exists. PASS
CURL static lib does not exist. PASS
Openssl static lib does not exist. PASS 
CMake host binary exists. PASS 
==========================================================
==========================================================
RESULTS for kirkstone_arm 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
            . PASS
/home/jpn323/workspace/ut-core/scripts/rdk-halif-hdmi_cec-kirkstone_arm
ut/bin/hal_test_RCECHal exists. PASS
ut/ut-core/framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
ut/ut-core/framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
==========================================================
==========================================================
RESULTS for kirkstone_linux 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
            . PASS
/home/jpn323/workspace/ut-core/scripts/rdk-halif-hdmi_cec-kirkstone_linux
ut/bin/hal_test_RCECHal exists. PASS
ut/ut-core/framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
==========================================================
==========================================================
RESULTS for cross 
On the branch feature/gh256-fix-lowercase-o-optimisation-flag
            . PASS
/home/jpn323/workspace/ut-core/scripts/rdk-halif-hdmi_cec-cross
ut/bin/hal_test_RCECHal exists. PASS
ut/ut-core/framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
ut/ut-core/framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
==========================================================
jpn323@janus ~/workspace/ut-core/scripts (feature/gh256-fix-lowercase-o-optimisation-flag)$ 

@kanjoe24

Copy link
Copy Markdown
Contributor

Also tests look fine:

./run.sh 

UT CORE Version: 5.1.0-4-g8646879
Listing Filename:[/tmp/ut-log_2026-07-29_142029.log-Listing.xml]
Results Filename:[/tmp/ut-log_2026-07-29_142029.log]
Setting Log Path [./logs]
Listing Filename:[./logs/ut-log_2026-07-29_142029.log-Listing.xml]
Results Filename:[./logs/ut-log_2026-07-29_142029.log]
Using Profile[./assets/test_kvp.yaml]
Using Profile[assets/config-test.yaml]
Using Profile[assets/5d.yaml]

2026-07-29-14:20:29, 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-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert open / close
2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile open()'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   238 : test_ut_kvp_profile_open - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   240 : test_ut_kvp_profile_open - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile open()'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

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

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile close()'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   245 : test_ut_kvp_profile_close - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   249 : test_ut_kvp_profile_close - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile close()'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert testing yaml 
2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint8'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    43 : test_ut_kvp_profile_uint8 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    51 : test_ut_kvp_profile_uint8 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint8'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint16'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    58 : test_ut_kvp_profile_uint16 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    66 : test_ut_kvp_profile_uint16 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint16'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint32'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    73 : test_ut_kvp_profile_uint32 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    81 : test_ut_kvp_profile_uint32 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint32'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint64'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    88 : test_ut_kvp_profile_uint64
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    96 : test_ut_kvp_profile_uint64 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint64'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int8'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   173 : test_ut_kvp_profile_int8 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   182 : test_ut_kvp_profile_int8 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int8'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int16'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   190 : test_ut_kvp_profile_int16 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   199 : test_ut_kvp_profile_int16 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int16'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int32'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   207 : test_ut_kvp_profile_int32 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   216 : test_ut_kvp_profile_int32 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int32'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int64'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   224 : test_ut_kvp_profile_int64 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   233 : test_ut_kvp_profile_int64 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int64'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile string'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   103 : test_ut_kvp_profile_string
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   110 : test_ut_kvp_profile_string - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile string'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile bool'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   142 : test_ut_kvp_profile_bool
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   150 : test_ut_kvp_profile_bool - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile bool'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile list count'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   158 : test_ut_kvp_profile_list_count
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   165 : test_ut_kvp_profile_list_count - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile list count'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile right string long'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   117 : test_ut_kvp_profile_string
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   123 : test_ut_kvp_profile_string - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile right string long'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile left string long'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   130 : test_ut_kvp_profile_string
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   136 : test_ut_kvp_profile_string - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile left string long'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert testing json 
2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint8'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    43 : test_ut_kvp_profile_uint8 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    51 : test_ut_kvp_profile_uint8 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint8'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint16'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    58 : test_ut_kvp_profile_uint16 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    66 : test_ut_kvp_profile_uint16 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint16'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint32'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    73 : test_ut_kvp_profile_uint32 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    81 : test_ut_kvp_profile_uint32 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint32'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile uint64'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    88 : test_ut_kvp_profile_uint64
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,    96 : test_ut_kvp_profile_uint64 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile uint64'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int8'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   173 : test_ut_kvp_profile_int8 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   182 : test_ut_kvp_profile_int8 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int8'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int16'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   190 : test_ut_kvp_profile_int16 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   199 : test_ut_kvp_profile_int16 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int16'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int32'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   207 : test_ut_kvp_profile_int32 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   216 : test_ut_kvp_profile_int32 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int32'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile int64'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   224 : test_ut_kvp_profile_int64 - start
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   233 : test_ut_kvp_profile_int64 - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile int64'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile string'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   103 : test_ut_kvp_profile_string
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   110 : test_ut_kvp_profile_string - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile string'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile bool'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   142 : test_ut_kvp_profile_bool
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   150 : test_ut_kvp_profile_bool - end
2026-07-29-14:20:30, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile bool'
2026-07-29-14:20:30, LOG   , ut_console.c,   633 : 

2026-07-29-14:20:30, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile list count'
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   158 : test_ut_kvp_profile_list_count
2026-07-29-14:20:30, STEP  , ut_test_kvp_profile.c,   165 : test_ut_kvp_profile_list_count - end
2026-07-29-14:20:30, 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.007 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-07-29-14:20:33, LOG   , ut_cunit.c,   177 : Logfile:[./logs/ut-log_2026-07-29_142029.log]
2026-07-29-14:20:33, LOG   , ut_cunit.c,   185 : ---- end of test run ----
jpn323@janus ~/workspace/ut-core/tests/build/bin (feature/gh256-fix-lowercase-o-optimisation-flag)$ 

@kanjoe24

Copy link
Copy Markdown
Contributor

Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

I have read the CLA Document and I hereby sign the CLA

1 out of 2 committers have signed the CLA.✅ UlrondlooopToolsYou can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@looopTools , please follow this, for checks to pass.

kanjoe24
kanjoe24 previously approved these changes Jul 29, 2026

@kanjoe24 kanjoe24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved.

@looopTools

Copy link
Copy Markdown
Contributor

I have read the CLA Document and I hereby sign the CLA

@looopTools

Copy link
Copy Markdown
Contributor

@kanjoe24 sorry I had not noticed the missing CLA signing. I have done so now.

Ulrond added 2 commits August 4, 2026 17:36
The .PHONY declaration added alongside the compiler-flag check duplicated
the one already present earlier in the file, and neither listed every
recipe-only target. With 'framework', 'run', 'rebuild' and 'cleanall'
missing, a stray file or directory of the same name made GNU make treat
the target as up to date and skip the recipe entirely.

Collapse both declarations into one covering all ten targets.
Copilot AI review requested due to automatic review settings August 4, 2026 16:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Suppressed comments (2)

tests/check_makefile_flags.py:185

  • If the provided root path does not exist or is not a directory, os.walk() will scan 0 files and the check will exit successfully. This can mask misconfiguration when the script is invoked from CI or from a different working directory.
    root = os.path.abspath(args.root)

    scanned, findings = scan_tree(root)

tests/check_makefile_flags.py:79

  • scan_file() returns None on read errors, and scan_tree() just skips that file. That means the guard can incorrectly pass if a build file becomes unreadable (e.g., permissions or transient FS issues). For a regression guard, it should fail closed on read errors.

This issue also appears on line 183 of the same file.

    except OSError as error:
        print(f"{RED}Error: cannot read '{path}': {error}{RESET}")
        return None

@Ulrond
Ulrond requested a review from kanjoe24 August 4, 2026 16:43
@Ulrond

Ulrond commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@kanjoe24 sorry for the churn — re-review needed. Your approval was auto-dismissed by the ruleset (dismiss_stale_reviews_on_push: true) when I pushed the follow-up.

Since your approval there are two changes:

  1. develop merged in (picks up feat(gmock): GoogleMock wrap + mock/gtest autogeneration for C++ interfaces #255, no conflicts).
  2. b5f4ee4 — consolidates the two .PHONY declarations in tests/Makefile into one covering all ten recipe-only targets, addressing both outstanding Copilot comments. framework, run, rebuild and cleanall were missing; verified against the pre-fix makefile that a stray tests/framework file made make framework report "up to date" and skip the recipe.

The -O0 fix itself is untouched. All checks green, Copilot re-reviewed with no new comments, all threads resolved.

@kanjoe24 kanjoe24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved.

@github-project-automation github-project-automation Bot moved this from Todo to Approved For Merge in UT-Core Roadmap Aug 5, 2026
@Ulrond
Ulrond merged commit 5284503 into develop Aug 5, 2026
8 checks passed
@Ulrond
Ulrond deleted the feature/gh256-fix-lowercase-o-optimisation-flag branch August 5, 2026 14:48
@github-project-automation github-project-automation Bot moved this from Approved For Merge to Resolved in UT-Core Roadmap Aug 5, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working community-contribution Contribution from community

Projects

Status: Resolved

Development

Successfully merging this pull request may close these issues.

Make file wrongly attempts to set optimisation using lowercase o

4 participants