From ce3639bb2661c5540b210ddfd33ec18445d6c3cd Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Thu, 30 Apr 2026 21:41:12 +0200 Subject: [PATCH 1/2] Renamed plucked.cf.sub to plucked.sub.cf This is a CFEngine policy file and should have a .cf file extension. These definitions are necessary for cfengine lint to find when it's looking for all the bodies and bundles defined in all .cf policy files. Signed-off-by: Ole Herman Schumacher Elgesem --- tests/acceptance/08_commands/01_modules/001.cf | 2 +- tests/acceptance/08_commands/01_modules/002.cf | 2 +- tests/acceptance/08_commands/01_modules/003.cf | 2 +- tests/acceptance/08_commands/01_modules/004.cf | 2 +- tests/acceptance/08_commands/01_modules/set-context.cf | 2 +- .../08_commands/01_modules/set-persistent-class.cf | 2 +- tests/acceptance/08_commands/01_modules/set-tags.cf | 2 +- .../vars-from-module-have-source-and-derived_from-tags.cf | 2 +- .../vars-without-explicit-tags-do-not-segfault.cf | 2 +- .../acceptance/10_files/02_maintain/changes_depth_search.cf | 2 +- .../10_files/02_maintain/changes_depth_search.cf.sub | 2 +- .../10_files/02_maintain/changes_depth_search_last_file.cf | 2 +- .../02_maintain/changes_depth_search_last_file.cf.sub | 2 +- .../10_files/02_maintain/check_file_changes_log.cf.sub | 2 +- .../acceptance/10_files/templating/missing_template_file.cf | 2 +- .../acceptance/10_files/templating/mustache_section.cf.sub | 2 +- .../10_files/templating/timed/expired_edit_line_locks.cf | 4 ++-- .../templating/timed/expired_edit_line_locks.cf.sub | 2 +- .../17_users/unsafe/disable_sudo_tty_requirement.cf.sub | 2 +- .../23_failsafe/preexisting_failsafe_preserved.cf | 2 +- .../29_simulate_mode/simulate_safe_functions.cf.sub | 2 +- tests/acceptance/Makefile.am | 6 +++--- tests/acceptance/default.cf.sub | 4 ++-- tests/acceptance/{plucked.cf.sub => plucked.sub.cf} | 0 24 files changed, 27 insertions(+), 27 deletions(-) rename tests/acceptance/{plucked.cf.sub => plucked.sub.cf} (100%) diff --git a/tests/acceptance/08_commands/01_modules/001.cf b/tests/acceptance/08_commands/01_modules/001.cf index 3680b4e43a..83f2886a75 100644 --- a/tests/acceptance/08_commands/01_modules/001.cf +++ b/tests/acceptance/08_commands/01_modules/001.cf @@ -6,7 +6,7 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/08_commands/01_modules/002.cf b/tests/acceptance/08_commands/01_modules/002.cf index 772f943580..0ddfa2f745 100644 --- a/tests/acceptance/08_commands/01_modules/002.cf +++ b/tests/acceptance/08_commands/01_modules/002.cf @@ -6,7 +6,7 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/08_commands/01_modules/003.cf b/tests/acceptance/08_commands/01_modules/003.cf index 1b1b782ab7..aaf727710c 100644 --- a/tests/acceptance/08_commands/01_modules/003.cf +++ b/tests/acceptance/08_commands/01_modules/003.cf @@ -6,7 +6,7 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/08_commands/01_modules/004.cf b/tests/acceptance/08_commands/01_modules/004.cf index 26582d5652..02878ebf20 100644 --- a/tests/acceptance/08_commands/01_modules/004.cf +++ b/tests/acceptance/08_commands/01_modules/004.cf @@ -6,7 +6,7 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/08_commands/01_modules/set-context.cf b/tests/acceptance/08_commands/01_modules/set-context.cf index ac60385c3a..a8ce40a305 100644 --- a/tests/acceptance/08_commands/01_modules/set-context.cf +++ b/tests/acceptance/08_commands/01_modules/set-context.cf @@ -7,7 +7,7 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/08_commands/01_modules/set-persistent-class.cf b/tests/acceptance/08_commands/01_modules/set-persistent-class.cf index 07de575b34..c28f389894 100644 --- a/tests/acceptance/08_commands/01_modules/set-persistent-class.cf +++ b/tests/acceptance/08_commands/01_modules/set-persistent-class.cf @@ -7,7 +7,7 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/08_commands/01_modules/set-tags.cf b/tests/acceptance/08_commands/01_modules/set-tags.cf index 530c1c84d4..7bd1a78301 100644 --- a/tests/acceptance/08_commands/01_modules/set-tags.cf +++ b/tests/acceptance/08_commands/01_modules/set-tags.cf @@ -6,7 +6,7 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/08_commands/01_modules/vars-from-module-have-source-and-derived_from-tags.cf b/tests/acceptance/08_commands/01_modules/vars-from-module-have-source-and-derived_from-tags.cf index 79746b5d24..8613165425 100644 --- a/tests/acceptance/08_commands/01_modules/vars-from-module-have-source-and-derived_from-tags.cf +++ b/tests/acceptance/08_commands/01_modules/vars-from-module-have-source-and-derived_from-tags.cf @@ -1,6 +1,6 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/08_commands/01_modules/vars-without-explicit-tags-do-not-segfault.cf b/tests/acceptance/08_commands/01_modules/vars-without-explicit-tags-do-not-segfault.cf index ec07555744..45443f2785 100644 --- a/tests/acceptance/08_commands/01_modules/vars-without-explicit-tags-do-not-segfault.cf +++ b/tests/acceptance/08_commands/01_modules/vars-without-explicit-tags-do-not-segfault.cf @@ -1,6 +1,6 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/10_files/02_maintain/changes_depth_search.cf b/tests/acceptance/10_files/02_maintain/changes_depth_search.cf index 61de4fcd03..8844d9ef45 100644 --- a/tests/acceptance/10_files/02_maintain/changes_depth_search.cf +++ b/tests/acceptance/10_files/02_maintain/changes_depth_search.cf @@ -4,7 +4,7 @@ body common control { inputs => { "../../dcs.cf.sub", - "../../plucked.cf.sub", + "../../plucked.sub.cf", "check_file_changes_log.cf.sub", }; bundlesequence => { default("$(this.promise_filename)") }; diff --git a/tests/acceptance/10_files/02_maintain/changes_depth_search.cf.sub b/tests/acceptance/10_files/02_maintain/changes_depth_search.cf.sub index ee5faef623..819958b798 100644 --- a/tests/acceptance/10_files/02_maintain/changes_depth_search.cf.sub +++ b/tests/acceptance/10_files/02_maintain/changes_depth_search.cf.sub @@ -1,7 +1,7 @@ body common control { inputs => { "../../dcs.cf.sub", - "../../plucked.cf.sub", + "../../plucked.sub.cf", }; bundlesequence => { "init", "test" }; } diff --git a/tests/acceptance/10_files/02_maintain/changes_depth_search_last_file.cf b/tests/acceptance/10_files/02_maintain/changes_depth_search_last_file.cf index 02b7b474ba..cd63676d96 100644 --- a/tests/acceptance/10_files/02_maintain/changes_depth_search_last_file.cf +++ b/tests/acceptance/10_files/02_maintain/changes_depth_search_last_file.cf @@ -4,7 +4,7 @@ body common control { inputs => { "../../dcs.cf.sub", - "../../plucked.cf.sub", + "../../plucked.sub.cf", "check_file_changes_log.cf.sub", }; bundlesequence => { default("$(this.promise_filename)") }; diff --git a/tests/acceptance/10_files/02_maintain/changes_depth_search_last_file.cf.sub b/tests/acceptance/10_files/02_maintain/changes_depth_search_last_file.cf.sub index 7f1d749039..c5dfdaf34c 100644 --- a/tests/acceptance/10_files/02_maintain/changes_depth_search_last_file.cf.sub +++ b/tests/acceptance/10_files/02_maintain/changes_depth_search_last_file.cf.sub @@ -1,7 +1,7 @@ body common control { inputs => { "../../dcs.cf.sub", - "../../plucked.cf.sub", + "../../plucked.sub.cf", }; bundlesequence => { "init", "test" }; } diff --git a/tests/acceptance/10_files/02_maintain/check_file_changes_log.cf.sub b/tests/acceptance/10_files/02_maintain/check_file_changes_log.cf.sub index 6a5ef14fda..666de78e64 100644 --- a/tests/acceptance/10_files/02_maintain/check_file_changes_log.cf.sub +++ b/tests/acceptance/10_files/02_maintain/check_file_changes_log.cf.sub @@ -17,7 +17,7 @@ body file control { - inputs => { "../../plucked.cf.sub" }; + inputs => { "../../plucked.sub.cf" }; } bundle agent check_file_changes_log(file, pass_class, fail_class, checks) diff --git a/tests/acceptance/10_files/templating/missing_template_file.cf b/tests/acceptance/10_files/templating/missing_template_file.cf index 8e4821ae0c..7a3c596a17 100644 --- a/tests/acceptance/10_files/templating/missing_template_file.cf +++ b/tests/acceptance/10_files/templating/missing_template_file.cf @@ -6,7 +6,7 @@ body common control { - inputs => { "../../default.cf.sub", "../../plucked.cf.sub" }; + inputs => { "../../default.cf.sub", "../../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; version => "1.0"; } diff --git a/tests/acceptance/10_files/templating/mustache_section.cf.sub b/tests/acceptance/10_files/templating/mustache_section.cf.sub index 579b1fd869..2dfb113a1c 100644 --- a/tests/acceptance/10_files/templating/mustache_section.cf.sub +++ b/tests/acceptance/10_files/templating/mustache_section.cf.sub @@ -1,6 +1,6 @@ body common control { - inputs => { "../../plucked.cf.sub" }; + inputs => { "../../plucked.sub.cf" }; bundlesequence => { test }; version => "1.0"; } diff --git a/tests/acceptance/10_files/templating/timed/expired_edit_line_locks.cf b/tests/acceptance/10_files/templating/timed/expired_edit_line_locks.cf index dc603adba7..66aa44ebd0 100644 --- a/tests/acceptance/10_files/templating/timed/expired_edit_line_locks.cf +++ b/tests/acceptance/10_files/templating/timed/expired_edit_line_locks.cf @@ -4,13 +4,13 @@ body common control { - inputs => { "../../../dcs.cf.sub", "../../../plucked.cf.sub" }; + inputs => { "../../../dcs.cf.sub", "../../../plucked.sub.cf" }; bundlesequence => { default($(this.promise_filename)) }; } bundle agent test { - + commands: # Note, no -K, we are testing locks. "$(sys.cf_agent) -v -D AUTO,DEBUG -f $(this.promise_filename).sub" diff --git a/tests/acceptance/10_files/templating/timed/expired_edit_line_locks.cf.sub b/tests/acceptance/10_files/templating/timed/expired_edit_line_locks.cf.sub index 030f8dc7af..05e8f2c353 100644 --- a/tests/acceptance/10_files/templating/timed/expired_edit_line_locks.cf.sub +++ b/tests/acceptance/10_files/templating/timed/expired_edit_line_locks.cf.sub @@ -1,6 +1,6 @@ body common control { - inputs => { "../../../dcs.cf.sub", "../../../plucked.cf.sub" }; + inputs => { "../../../dcs.cf.sub", "../../../plucked.sub.cf" }; bundlesequence => { default($(this.promise_filename)) }; } diff --git a/tests/acceptance/17_users/unsafe/disable_sudo_tty_requirement.cf.sub b/tests/acceptance/17_users/unsafe/disable_sudo_tty_requirement.cf.sub index 03898c1e62..a0aedcd479 100644 --- a/tests/acceptance/17_users/unsafe/disable_sudo_tty_requirement.cf.sub +++ b/tests/acceptance/17_users/unsafe/disable_sudo_tty_requirement.cf.sub @@ -2,7 +2,7 @@ body file control { - inputs => { "../../plucked.cf.sub" }; + inputs => { "../../plucked.sub.cf" }; } bundle agent disable_sudo_tty_requirement diff --git a/tests/acceptance/23_failsafe/preexisting_failsafe_preserved.cf b/tests/acceptance/23_failsafe/preexisting_failsafe_preserved.cf index 3c17546b02..da1041a598 100644 --- a/tests/acceptance/23_failsafe/preexisting_failsafe_preserved.cf +++ b/tests/acceptance/23_failsafe/preexisting_failsafe_preserved.cf @@ -3,7 +3,7 @@ body common control { - inputs => { "../default.cf.sub", "../plucked.cf.sub" }; + inputs => { "../default.cf.sub", "../plucked.sub.cf" }; bundlesequence => { default("$(this.promise_filename)") }; } diff --git a/tests/acceptance/29_simulate_mode/simulate_safe_functions.cf.sub b/tests/acceptance/29_simulate_mode/simulate_safe_functions.cf.sub index ee877de7c5..51f51d06e4 100644 --- a/tests/acceptance/29_simulate_mode/simulate_safe_functions.cf.sub +++ b/tests/acceptance/29_simulate_mode/simulate_safe_functions.cf.sub @@ -1,6 +1,6 @@ body common control { - inputs => { "../plucked.cf.sub" }; + inputs => { "../plucked.sub.cf" }; } bundle agent test diff --git a/tests/acceptance/Makefile.am b/tests/acceptance/Makefile.am index 4e76f8df8e..10af0835e9 100644 --- a/tests/acceptance/Makefile.am +++ b/tests/acceptance/Makefile.am @@ -94,7 +94,7 @@ check-local: + $(TESTS_ENVIRONMENT) MAKE=$(MAKE) $(srcdir)/testall -EXTRA_DIST = default.cf.sub dcs.cf.sub plucked.cf.sub run_with_server.cf.sub \ +EXTRA_DIST = default.cf.sub dcs.cf.sub plucked.sub.cf run_with_server.cf.sub \ testall dummy_etc write_args.sh \ root-MD5=617eb383deffef843ea856b129d0a423.pub \ root-MD5=617eb383deffef843ea856b129d0a423.priv @@ -109,5 +109,5 @@ dist-hook: CLEANFILES = *.gcno *.gcda Makefile.testall pluck: - echo '### This is an auto-generated file, see Makefile.am and `make pluck` ###' > plucked.cf.sub - ../../contrib/cf-locate/cf-locate -f -p '( if_|run_|warn_only|INI_section|kept_successful_command|edit_line|set_user_field|set_variable_values\(|edit_field|set_line_based|location|replace_with|_cp|_dcp|empty|shell|immediate|perms| m\b|recurse|tidy| all|classes_generic|results| start|always|^value|edit_field line|insert_lines|(link|copy)from| file_mustache| (file|dir)_(copy|tidy|sync|make|empty|link|hardlink))' ../../../masterfiles/lib/*.cf >> plucked.cf.sub + echo '### This is an auto-generated file, see Makefile.am and `make pluck` ###' > plucked.sub.cf + ../../contrib/cf-locate/cf-locate -f -p '( if_|run_|warn_only|INI_section|kept_successful_command|edit_line|set_user_field|set_variable_values\(|edit_field|set_line_based|location|replace_with|_cp|_dcp|empty|shell|immediate|perms| m\b|recurse|tidy| all|classes_generic|results| start|always|^value|edit_field line|insert_lines|(link|copy)from| file_mustache| (file|dir)_(copy|tidy|sync|make|empty|link|hardlink))' ../../../masterfiles/lib/*.cf >> plucked.sub.cf diff --git a/tests/acceptance/default.cf.sub b/tests/acceptance/default.cf.sub index 1c81340350..c463046f9c 100644 --- a/tests/acceptance/default.cf.sub +++ b/tests/acceptance/default.cf.sub @@ -18,7 +18,7 @@ bundle common D "inputs" slist => { "$(D.owndir)$(const.dirsep)dcs.cf.sub", - "$(D.owndir)$(const.dirsep)plucked.cf.sub", + "$(D.owndir)$(const.dirsep)plucked.sub.cf", }; # If testing the masterfiles policy framework then load the stdlib by @@ -35,6 +35,6 @@ bundle common D body file control { - # plucked.cf.sub comes from the stdlib with `make pluck` + # plucked.sub.cf comes from the stdlib with `make pluck` inputs => { @(D.inputs) }; } diff --git a/tests/acceptance/plucked.cf.sub b/tests/acceptance/plucked.sub.cf similarity index 100% rename from tests/acceptance/plucked.cf.sub rename to tests/acceptance/plucked.sub.cf From d5669eebd20d96aae52694ce37f476e6deb73be0 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Thu, 30 Apr 2026 22:39:52 +0200 Subject: [PATCH 2/2] testall: Adjusted to skip .sub.cf files Signed-off-by: Ole Herman Schumacher Elgesem --- tests/acceptance/testall | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/testall b/tests/acceptance/testall index adc73a6c9d..5d00d2c7e8 100755 --- a/tests/acceptance/testall +++ b/tests/acceptance/testall @@ -1059,13 +1059,13 @@ then ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$test" elif [ -d $test ] then - ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$(find "$test" -name workdir -prune -o -name '*.cf' -print | sort)" + ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$(find "$test" -name workdir -prune -o -name '*.cf' -and -not -name '*.sub.cf' -print | sort)" else echo "Unable to open test file/directory: $test" fi done else - ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$(find . \( -name selftest -o -name workdir \) -prune -o -name '*.cf' -print | sort)" + ALL_TESTS="$ALL_TESTS${ALL_TESTS:+ }$(find . \( -name selftest -o -name workdir \) -prune -o -name '*.cf' -and -not -name '*.sub.cf' -print | sort)" fi for addtest in $ALL_TESTS