Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [Unreleased]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Release notes omit pending additions 🐞 Bug ≡ Correctness

The new ## [Unreleased] heading precedes an existing Unreleased section, while the stable-release
workflow extracts only the first such section. When that workflow publishes a release, it stops at
the intervening ## [3.0.1] heading and excludes the existing AI capability and permission-model
entries.
Agent Prompt
## Issue description
The new Unreleased heading causes the stable-release workflow to omit pending entries from its release notes.
## Fix Focus Areas
- CHANGELOG.md[3-11]
- CHANGELOG.md[47-57]
## Recommended Fix
Move the new Fixed entry into the existing Unreleased section and remove the newly added duplicate heading, so the workflow extracts both the existing Added entries and this fix.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


### Fixed
- `test_app_lifecycle` now checks the apps. It guarded every check with `#ifdef EAPPS_BUILD_<CATEGORY>`,
but `tests/CMakeLists.txt` never passed those defines, so it ran 0 assertions and always passed.
The enabled categories are now compiled in and `esettings` and `ebot` are linked. The test fails
when no check runs, and when the number of categories it checked differs from the number of
`EAPPS_BUILD_<CATEGORY>` options that are ON.

## [3.0.1] - 2026-05-16

### Production Release — Unified EmbeddedOS-org v3.0.1
Expand Down
41 changes: 34 additions & 7 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,55 @@ endif()
add_test(NAME test_ewifi_shellsafe COMMAND test_ewifi_shellsafe)

# App lifecycle tests — needs all app libraries
# test_app_lifecycle.c checks each category only under #ifdef EAPPS_BUILD_<CATEGORY>,
# so every enabled category must also be passed as a compile definition. Without
# them the test compiled to an empty main() and passed with 0 assertions.
# esettings is a system app (always built, top-level CMakeLists.txt), so it is
# linked whenever the productivity checks that reference it are compiled.
# LIFECYCLE_EXPECTED counts the enabled categories straight from the options, not
# from LIFECYCLE_DEFS, so the test fails if a category's define is ever dropped.
set(LIFECYCLE_LIBS eapps_common eapps_ui)
set(LIFECYCLE_DEFS)
set(LIFECYCLE_EXPECTED 0)
foreach(category PRODUCTIVITY MEDIA GAMES CONNECTIVITY SECURITY WEB)
if(EAPPS_BUILD_${category})
math(EXPR LIFECYCLE_EXPECTED "${LIFECYCLE_EXPECTED} + 1")
endif()
endforeach()
if(EAPPS_BUILD_PRODUCTIVITY)
list(APPEND LIFECYCLE_LIBS ecal enote econverter ebuffer efiles ecleaner eclock etools etimer epdf ezip eviewer esession)
list(APPEND LIFECYCLE_LIBS ecal enote econverter ebuffer efiles ecleaner eclock etools etimer epdf ezip eviewer esession esettings)
list(APPEND LIFECYCLE_DEFS EAPPS_BUILD_PRODUCTIVITY)
endif()
if(EAPPS_BUILD_MEDIA)
list(APPEND LIFECYCLE_LIBS emusic evideo egallery eplay epaint)
list(APPEND LIFECYCLE_DEFS EAPPS_BUILD_MEDIA)
endif()
if(EAPPS_BUILD_GAMES)
list(APPEND LIFECYCLE_LIBS snake tetris minesweeper dice erunner esurfer echess ebirds eslice eblocks ecrush)
list(APPEND LIFECYCLE_DEFS EAPPS_BUILD_GAMES)
endif()
if(EAPPS_BUILD_CONNECTIVITY)
list(APPEND LIFECYCLE_LIBS eftp eserial essh evnc etunnel echat eremote ewifi)
list(APPEND LIFECYCLE_DEFS EAPPS_BUILD_CONNECTIVITY)
endif()
if(EAPPS_BUILD_SECURITY)
list(APPEND LIFECYCLE_LIBS evpn eguard evirustower)
list(APPEND LIFECYCLE_LIBS evpn eguard evirustower ebot)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

3. Windows gcc builds cannot link the test 🐞 Bug ≡ Correctness

Adding ebot to LIFECYCLE_LIBS makes the security-enabled lifecycle executable pull in ebot.c,
which calls Winsock functions without a CMake link dependency on ws2_32. On Windows GCC builds,
the source's MSVC-specific link pragma does not supply that library, leaving the test executable
with unresolved socket symbols.
Agent Prompt
## Issue description
The new ebot dependency introduces unresolved Winsock references in Windows GCC lifecycle-test builds.
## Fix Focus Areas
- tests/CMakeLists.txt[78-80]
- apps/ebot/CMakeLists.txt[7-13]
## Recommended Fix
Add a Windows-conditional `ws2_32` link dependency to the ebot target so executables consuming the static library, including the lifecycle test, receive it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Lifecycle test cannot link

When EAPPS_BUILD_SECURITY is ON and no lvgl target is available, tests/CMakeLists.txt appends ebot to LIFECYCLE_LIBS while apps/ebot/CMakeLists.txt skips creating that target, so the lifecycle test fails to link and the build fails.

Only append ebot to LIFECYCLE_LIBS when its target is created.

Prompt for AI agents
In `tests/CMakeLists.txt` at line 79:

**Lifecycle test cannot link**

When `EAPPS_BUILD_SECURITY` is ON and no `lvgl` target is available, `tests/CMakeLists.txt` appends `ebot` to `LIFECYCLE_LIBS` while `apps/ebot/CMakeLists.txt` skips creating that target, so the lifecycle test fails to link and the build fails.

Only append `ebot` to `LIFECYCLE_LIBS` when its target is created.

From AGENTS.md L39:

Preserve platform portability and existing public catalog fields.

list(APPEND LIFECYCLE_DEFS EAPPS_BUILD_SECURITY)
endif()
if(EAPPS_BUILD_WEB)
list(APPEND LIFECYCLE_LIBS eweb)
list(APPEND LIFECYCLE_DEFS EAPPS_BUILD_WEB)
endif()
add_executable(test_app_lifecycle test_app_lifecycle.c)
target_link_libraries(test_app_lifecycle PRIVATE ${LIFECYCLE_LIBS})
if(NOT MSVC)
target_link_libraries(test_app_lifecycle PRIVATE m)
# With every category switched off there is nothing to check, so no test.
if(LIFECYCLE_EXPECTED GREATER 0)
add_executable(test_app_lifecycle test_app_lifecycle.c)
target_link_libraries(test_app_lifecycle PRIVATE ${LIFECYCLE_LIBS})
target_compile_definitions(test_app_lifecycle PRIVATE ${LIFECYCLE_DEFS}
EAPPS_LIFECYCLE_EXPECTED_CATEGORIES=${LIFECYCLE_EXPECTED})
Comment on lines +90 to +91

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Missing app names crash the lifecycle test 🐞 Bug ☼ Reliability

The newly compiled category checks use CHECK_APP, which records a NULL id or name but then
calls strlen on that pointer without stopping. If an app has the missing metadata this test is
meant to detect, execution can terminate before TEST_EXIT summarizes the assertion failure or
checks the remaining apps.
Agent Prompt
## Issue description
Activating the lifecycle checks exposes a NULL dereference when an app has a missing id or name.
## Fix Focus Areas
- tests/test_app_lifecycle.c[86-102]
- tests/CMakeLists.txt[90-91]
## Recommended Fix
Make `CHECK_APP` skip each length assertion when its corresponding pointer is NULL, while retaining the NULL assertion failure and continuing to check other apps.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

if(NOT MSVC)
target_link_libraries(test_app_lifecycle PRIVATE m)
endif()
add_test(NAME test_app_lifecycle COMMAND test_app_lifecycle)
else()
message(STATUS "test_app_lifecycle skipped: every EAPPS_BUILD_<CATEGORY> option is OFF")
endif()
add_test(NAME test_app_lifecycle COMMAND test_app_lifecycle)
22 changes: 22 additions & 0 deletions tests/test_app_lifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
#include "eapps_test.h"
#include "../core/common/include/eapps/types.h"

#ifndef EAPPS_LIFECYCLE_EXPECTED_CATEGORIES
#error "EAPPS_LIFECYCLE_EXPECTED_CATEGORIES must be set by tests/CMakeLists.txt"
#endif

/* ================================================================
* Extern declarations for all app infos and lifecycles.
* Grouped by build category, matching the pattern in suite.c.
Expand Down Expand Up @@ -172,24 +176,42 @@ static void test_web_apps(void) {
#endif

int main(void) {
int categories_checked = 0;

#ifdef EAPPS_BUILD_PRODUCTIVITY
test_productivity_apps();
categories_checked++;
#endif
#ifdef EAPPS_BUILD_MEDIA
test_media_apps();
categories_checked++;
#endif
#ifdef EAPPS_BUILD_GAMES
test_games_apps();
categories_checked++;
#endif
#ifdef EAPPS_BUILD_CONNECTIVITY
test_connectivity_apps();
categories_checked++;
#endif
#ifdef EAPPS_BUILD_SECURITY
test_security_apps();
categories_checked++;
#endif
#ifdef EAPPS_BUILD_WEB
test_web_apps();
categories_checked++;
#endif

/* No checks at all means the EAPPS_BUILD_* category defines did not reach
* this file (see tests/CMakeLists.txt). Fail instead of passing empty. */
ASSERT_TRUE(t_passes + t_failures > 0, "at least one app check ran");

/* tests/CMakeLists.txt counts the categories enabled by the CMake options,
* separately from the defines it passes, so a category whose define goes
* missing fails here instead of silently dropping its checks. */
ASSERT_EQ(categories_checked, EAPPS_LIFECYCLE_EXPECTED_CATEGORIES,
"app categories checked match the categories enabled in CMake");

TEST_EXIT();
}
Loading