Skip to content

CFE-3041: Made testall fail regular acceptance tests which log errors (3.27.x) - #6454

Merged
nickanderson merged 22 commits into
cfengine:3.27.xfrom
aleksandrychev:CFE-3041_3.27.x
Oct 31, 2026
Merged

nickanderson merged 22 commits into
cfengine:3.27.xfrom
aleksandrychev:CFE-3041_3.27.x

Conversation

@aleksandrychev

@aleksandrychev aleksandrychev commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #6334 and #6405 to 3.27.x.

Also includes two prerequisite commits from master so the rest applies cleanly:

  • 1e15566: Added errorexit acceptance tests to GH Actions
  • 15c5170: testall egrep & fgrep warnings

together:

olehermanse and others added 22 commits October 30, 2026 19:22
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
(cherry picked from commit 1e15566)
Ticket: CFE-4526

(cherry picked from commit 15c5170)
Ticket: CFE-3041

(cherry picked from commit 45ee4a0)
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
(cherry picked from commit 0a62570)
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
(cherry picked from commit 0f7d959)
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
(cherry picked from commit 453630a)
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
(cherry picked from commit 1bafc0c)
Tests that print Pass message but have logs errors will fail with `FAIL (Error printed)` message.
Tests which are expected to log errors should use `.error.cf` or `.error.pass.cf` suffix. see: `tests/acceptance/README`

Ticket: CFE-3041
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit 23ba797)
These tests read files created by their own init bundle, but pre-evaluation calls the read functions before the files exist, logging "Could not examine file" errors which now fail regular tests.

Ticket: CFE-3041
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit 97d4249)
Errors printed by the command were reported on lines starting with "error:", so testall mistook them for errors of the test itself.

Ticket: CFE-3041

Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit 5398b14)
These tests read files and directories created by their own policy, but pre-evaluation calls the functions before they exist, logging errors which now fail regular tests.

Ticket: CFE-3041
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit bbf547b)
The agent loads def.json from the directory of the input policy file, so tests in 00_basics/ tried to read this directory as their augments file and logged "Could not open JSON file" errors.

Ticket: CFE-3041
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit 8af7a04)
The test used the 'immediate' body from plucked.sub.cf before it was
loaded during pre-evaluation, so the promise is now skipped until the
test framework is loaded.

Ticket: CFE-3041
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit cb51dff)
The test referred to a promise module which never existed and did not run its init and cleanup bundles.

Ticket: CFE-3041
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit f5197a4)
wrong-bundle-type.cf printed the sub-agent output in its DEBUG report, so the sub-agent errors were mistaken for errors of the test, and ifelse.cf used invalid class expressions as false conditions.

Ticket: CFE-3041
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit dd93368)
These tests intentionally exercise error paths, the reason is documented in the header of each test.

Ticket: CFE-3041
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit 350760c)
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
(cherry picked from commit 22cab40)
Ticket: CFE-3041
Signed-off-by: Nick Anderson <nick@cmdln.org>
(cherry picked from commit 14691f5)
Ticket: CFE-3041
Signed-off-by: Nick Anderson <nick@cmdln.org>
(cherry picked from commit 5c6c043)
Ticket: CFE-3041
(cherry picked from commit 3e5e690)
The errorpass branch only checked for logged errors and the Pass
message, so a test marked test_soft_fail or test_skip_unsupported was
reported as FAIL (e.g. process_select_fncalls.error.pass.cf on Windows,
which soft fails due to ENT-10217 and logs no errors there). Errorpass
tests now go through the regular outcome handling and only differ in
requiring at least one logged error on Pass.

(cherry picked from commit a73a0c1)
Ticket: CFE-3041
Signed-off-by: Nick Anderson <nick@cmdln.org>
(cherry picked from commit 4cb9088)
@aleksandrychev

Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkisn please

@cf-bottom

Copy link
Copy Markdown

I'm not sure I understand, @aleksandrychev.

@aleksandrychev

Copy link
Copy Markdown
Contributor Author

I'm not sure I understand, @aleksandrychev.

@cf-bottom I meant jenkins

@cf-bottom

Copy link
Copy Markdown

@olehermanse

Copy link
Copy Markdown
Member

@aleksandrychev please look into why macos is failing.

@aleksandrychev

Copy link
Copy Markdown
Contributor Author

@aleksandrychev please look into why macos is failing.

@olehermanse not related to this PR. Here is the fix #6455, backported from master

p.s. can be merged, selenium is known issue

image

@nickanderson
nickanderson merged commit 380b841 into cfengine:3.27.x Oct 31, 2026
40 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants