ceedling 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/GIT_COMMIT_SHA +1 -1
- data/README.md +47 -50
- data/Rakefile +3 -2
- data/bin/app_cfg.rb +21 -0
- data/bin/cli_handler.rb +7 -1
- data/bin/cli_helper.rb +5 -0
- data/docs/Changelog.md +10 -0
- data/docs/overrides/main.html +11 -8
- data/lib/ceedling/config/configurator.rb +5 -2
- data/lib/ceedling/config/configurator_setup.rb +26 -15
- data/lib/ceedling/file_wrapper.rb +56 -26
- data/lib/ceedling/rake_app/test_task_name.rb +29 -0
- data/lib/ceedling/rakefile.rb +1 -0
- data/lib/ceedling/rakefiles/tests/rules_tests.rake +3 -20
- data/lib/ceedling/rakefiles/tests/rules_tests_generate.rake +4 -30
- data/lib/ceedling/setupinator.rb +4 -0
- data/lib/ceedling/test_invoker/test_build_executor.rb +18 -1
- data/lib/version.rb +1 -1
- data/plugins/bullseye/bullseye.rake +6 -9
- data/plugins/gcov/gcov.rake +6 -9
- data/plugins/sanitize/sanitize.rake +6 -6
- data/plugins/valgrind/valgrind.rake +6 -6
- data/site-local/404.html +6 -20
- data/site-local/assets/javascripts/{bundle.d7400e89.min.js → bundle.c21346df.min.js} +3 -3
- data/site-local/assets/javascripts/{bundle.d7400e89.min.js.map → bundle.c21346df.min.js.map} +2 -2
- data/site-local/assets/javascripts/workers/{search.2c215733.min.js → search.a7633da7.min.js} +2 -2
- data/site-local/assets/javascripts/workers/{search.2c215733.min.js.map → search.a7633da7.min.js.map} +1 -1
- data/site-local/assets/stylesheets/main.57a0d79d.min.css +6 -0
- data/site-local/assets/stylesheets/main.57a0d79d.min.css.map +1 -0
- data/site-local/assets/stylesheets/palette.fb2fffe2.min.css +4 -0
- data/site-local/assets/stylesheets/palette.fb2fffe2.min.css.map +1 -0
- data/site-local/configuration/environment-vars.html +6 -20
- data/site-local/configuration/global-collections.html +6 -20
- data/site-local/configuration/index.html +6 -20
- data/site-local/configuration/loading.html +6 -20
- data/site-local/configuration/mixins.html +10 -24
- data/site-local/configuration/parallel-builds.html +6 -20
- data/site-local/configuration/project-file.html +8 -22
- data/site-local/configuration/reference/cexception.html +6 -20
- data/site-local/configuration/reference/cmock.html +6 -20
- data/site-local/configuration/reference/defines.html +16 -30
- data/site-local/configuration/reference/environment.html +10 -24
- data/site-local/configuration/reference/extension.html +6 -20
- data/site-local/configuration/reference/files.html +13 -27
- data/site-local/configuration/reference/flags.html +13 -27
- data/site-local/configuration/reference/index.html +6 -20
- data/site-local/configuration/reference/libraries.html +6 -20
- data/site-local/configuration/reference/mixins.html +6 -20
- data/site-local/configuration/reference/partials.html +6 -20
- data/site-local/configuration/reference/paths.html +11 -25
- data/site-local/configuration/reference/plugins.html +6 -20
- data/site-local/configuration/reference/project.html +16 -30
- data/site-local/configuration/reference/release-build.html +6 -20
- data/site-local/configuration/reference/test-build.html +6 -20
- data/site-local/configuration/reference/test-runner.html +6 -20
- data/site-local/configuration/reference/tools.html +18 -32
- data/site-local/configuration/reference/unity.html +6 -20
- data/site-local/configuration/which-ceedling.html +6 -20
- data/site-local/development/index.html +6 -20
- data/site-local/development/plugins/configuration.html +6 -20
- data/site-local/development/plugins/index.html +6 -20
- data/site-local/development/plugins/plugin-subclass.html +54 -68
- data/site-local/development/plugins/rake-tasks.html +8 -22
- data/site-local/development/releases.html +79 -28
- data/site-local/development/workflow.html +14 -28
- data/site-local/getting-started/builds.html +6 -20
- data/site-local/getting-started/command-line.html +6 -20
- data/site-local/getting-started/example-projects/cipher-quest.html +6 -20
- data/site-local/getting-started/example-projects/index.html +6 -20
- data/site-local/getting-started/example-projects/temp-sensor.html +6 -20
- data/site-local/getting-started/example-projects/wondrous-forest.html +6 -20
- data/site-local/getting-started/index.html +6 -20
- data/site-local/getting-started/installation.html +6 -20
- data/site-local/getting-started/quick-start.html +6 -20
- data/site-local/help.html +6 -20
- data/site-local/index.html +11 -24
- data/site-local/overview/build-system.html +6 -20
- data/site-local/overview/index.html +6 -20
- data/site-local/overview/test-environments.html +6 -20
- data/site-local/overview/tools-and-frameworks.html +6 -20
- data/site-local/plugins/beep.html +6 -20
- data/site-local/plugins/bullseye/index.html +13 -24
- data/site-local/plugins/bullseye/licensing.html +14 -28
- data/site-local/plugins/command-hooks.html +8 -22
- data/site-local/plugins/compile-commands-json-db.html +6 -20
- data/site-local/plugins/cppcheck.html +8 -22
- data/site-local/plugins/dependencies.html +10 -24
- data/site-local/plugins/fff.html +7 -21
- data/site-local/plugins/gcov/examples.html +7 -21
- data/site-local/plugins/gcov/gcovr.html +7 -21
- data/site-local/plugins/gcov/index.html +6 -20
- data/site-local/plugins/gcov/overview.html +9 -20
- data/site-local/plugins/gcov/reportgenerator.html +9 -23
- data/site-local/plugins/gcov/reporting.html +6 -20
- data/site-local/plugins/gcov/setup.html +6 -20
- data/site-local/plugins/gcov/tool-versions.html +6 -20
- data/site-local/plugins/gcov/troubleshooting.html +10 -24
- data/site-local/plugins/index.html +6 -20
- data/site-local/plugins/module-generator.html +21 -35
- data/site-local/plugins/report-build-warnings-log.html +53 -67
- data/site-local/plugins/report-tests-gtestlike-stdout.html +6 -20
- data/site-local/plugins/report-tests-ide-stdout.html +43 -57
- data/site-local/plugins/report-tests-log-factory.html +50 -64
- data/site-local/plugins/report-tests-pretty-stdout.html +7 -21
- data/site-local/plugins/report-tests-raw-output-log.html +6 -20
- data/site-local/plugins/report-tests-teamcity-stdout.html +16 -30
- data/site-local/plugins/sanitize.html +54 -64
- data/site-local/plugins/valgrind.html +46 -56
- data/site-local/project/index.html +6 -20
- data/site-local/project/release-history.html +6 -20
- data/site-local/project/sbom.html +6 -20
- data/site-local/project/upgrade.html +6 -20
- data/site-local/reference/build-directives.html +6 -20
- data/site-local/reference/command-line.html +6 -20
- data/site-local/reference/environment-vars.html +6 -20
- data/site-local/reference/gcov-plugin.html +6 -20
- data/site-local/reference/global-collections.html +6 -20
- data/site-local/reference/index.html +6 -20
- data/site-local/reference/partials-macros.html +6 -20
- data/site-local/reference/project-configuration.html +6 -20
- data/site-local/sitemap.xml.gz +0 -0
- data/site-local/snapshot/examples/cipher_quest/index.html +16 -30
- data/site-local/snapshot/examples/temp_sensor/index.html +8 -22
- data/site-local/snapshot/examples/wondrous_forest/index.html +6 -20
- data/site-local/testing-guide/build-directives.html +14 -28
- data/site-local/testing-guide/conventions.html +13 -27
- data/site-local/testing-guide/frameworks.html +11 -25
- data/site-local/testing-guide/index.html +6 -20
- data/site-local/testing-guide/partials/configuration.html +8 -22
- data/site-local/testing-guide/partials/conventions.html +8 -22
- data/site-local/testing-guide/partials/directives.html +16 -30
- data/site-local/testing-guide/partials/example.html +14 -28
- data/site-local/testing-guide/partials/index.html +6 -20
- data/site-local/testing-guide/partials/overview.html +6 -20
- data/site-local/testing-guide/partials/variables.html +11 -25
- data/site-local/testing-guide/test-cases.html +13 -27
- data/site-local/testing-guide/test-sample.html +12 -26
- data/site-local/testing-guide/test-suite-anatomy.html +6 -20
- data/spec/integration/configurator_pipeline_spec.rb +10 -0
- data/spec/integration/dependencies/dependency_tracker_core_spec.rb +40 -0
- data/spec/integration/rake_task_registry_plugins_spec.rb +95 -0
- data/spec/integration/vendor_copy_transient_io_retry_spec.rb +122 -74
- data/spec/support/integration/configurator_integration_helper.rb +4 -1
- data/spec/units/bin/app_cfg_spec.rb +10 -0
- data/spec/units/bin/cli_handler_spec.rb +2 -1
- data/spec/units/bin/cli_helper_spec.rb +10 -0
- data/spec/units/config/configurator_setup_spec.rb +61 -43
- data/spec/units/config/configurator_spec.rb +10 -1
- data/spec/units/file_wrapper_spec.rb +66 -27
- data/spec/units/rake_app/test_task_name_spec.rb +47 -0
- data/spec/units/test_build_executor_spec.rb +42 -2
- metadata +16 -11
- data/site-local/assets/stylesheets/main.ec1eaa64.min.css +0 -1
- data/site-local/assets/stylesheets/main.ec1eaa64.min.css.map +0 -1
- data/site-local/assets/stylesheets/palette.ab4e12ef.min.css +0 -1
- data/site-local/assets/stylesheets/palette.ab4e12ef.min.css.map +0 -1
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
<link rel="icon" href="../assets/images/favicon.png">
|
|
24
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.
|
|
24
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.0">
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<link rel="stylesheet" href="../assets/stylesheets/main.
|
|
32
|
+
<link rel="stylesheet" href="../assets/stylesheets/main.57a0d79d.min.css">
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
<link rel="stylesheet" href="../assets/stylesheets/palette.
|
|
35
|
+
<link rel="stylesheet" href="../assets/stylesheets/palette.fb2fffe2.min.css">
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
@@ -89,30 +89,16 @@
|
|
|
89
89
|
</div>
|
|
90
90
|
<div data-md-component="announce">
|
|
91
91
|
|
|
92
|
-
<aside class="md-banner">
|
|
93
|
-
<div class="md-banner__inner md-grid md-typeset">
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
</aside>
|
|
101
|
-
|
|
102
92
|
</div>
|
|
103
93
|
|
|
104
94
|
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
|
|
105
95
|
|
|
106
96
|
<aside class="md-banner md-banner--warning">
|
|
107
97
|
<div class="md-banner__inner md-grid md-typeset">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
You are not viewing the latest version.
|
|
98
|
+
You are not viewing the latest version.
|
|
111
99
|
<a href="../..">
|
|
112
100
|
<strong>Click here to go to latest.</strong>
|
|
113
101
|
</a>
|
|
114
|
-
|
|
115
|
-
|
|
116
102
|
</div>
|
|
117
103
|
<script>var el=document.querySelector("[data-md-component=outdated]"),base=new URL(".."),outdated=__md_get("__outdated",sessionStorage,base);!0===outdated&&el&&(el.hidden=!1)</script>
|
|
118
104
|
</aside>
|
|
@@ -4469,16 +4455,16 @@ underlying Java language in which TeamCity is written,
|
|
|
4469
4455
|
</ul>
|
|
4470
4456
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="w"> </span>><span class="w"> </span>ceedling<span class="w"> </span>test:UsartModel
|
|
4471
4457
|
</code></pre></div>
|
|
4472
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>##teamcity[testSuiteStarted name
|
|
4473
|
-
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a>##teamcity[testStarted name
|
|
4474
|
-
<a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a>##teamcity[testFinished name
|
|
4475
|
-
<a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a>##teamcity[testStarted name
|
|
4476
|
-
<a id="__codelineno-3-5" name="__codelineno-3-5" href="#__codelineno-3-5"></a>##teamcity[testFinished name
|
|
4477
|
-
<a id="__codelineno-3-6" name="__codelineno-3-6" href="#__codelineno-3-6"></a>##teamcity[testStarted name
|
|
4478
|
-
<a id="__codelineno-3-7" name="__codelineno-3-7" href="#__codelineno-3-7"></a>##teamcity[testFailed name
|
|
4479
|
-
<a id="__codelineno-3-8" name="__codelineno-3-8" href="#__codelineno-3-8"></a>##teamcity[testFinished name
|
|
4480
|
-
<a id="__codelineno-3-9" name="__codelineno-3-9" href="#__codelineno-3-9"></a>##teamcity[testIgnored name
|
|
4481
|
-
<a id="__codelineno-3-10" name="__codelineno-3-10" href="#__codelineno-3-10"></a>##teamcity[testSuiteFinished name
|
|
4458
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>##teamcity[testSuiteStarted name='TestUsartModel' flowId='15']
|
|
4459
|
+
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a>##teamcity[testStarted name='test.test/TestUsartModel.testGetBaudRateRegisterSettingShouldReturnAppropriateBaudRateRegisterSetting' flowId='15']
|
|
4460
|
+
<a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a>##teamcity[testFinished name='test.test/TestUsartModel.testGetBaudRateRegisterSettingShouldReturnAppropriateBaudRateRegisterSetting' duration='81' flowId='15']
|
|
4461
|
+
<a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a>##teamcity[testStarted name='test.test/TestUsartModel.testShouldReturnErrorMessageUponInvalidTemperatureValue' flowId='15']
|
|
4462
|
+
<a id="__codelineno-3-5" name="__codelineno-3-5" href="#__codelineno-3-5"></a>##teamcity[testFinished name='test.test/TestUsartModel.testShouldReturnErrorMessageUponInvalidTemperatureValue' duration='81' flowId='15']
|
|
4463
|
+
<a id="__codelineno-3-6" name="__codelineno-3-6" href="#__codelineno-3-6"></a>##teamcity[testStarted name='test.test/TestUsartModel.testGetFormattedTemperatureFormatsTemperatureFromCalculatorAppropriately' flowId='15']
|
|
4464
|
+
<a id="__codelineno-3-7" name="__codelineno-3-7" href="#__codelineno-3-7"></a>##teamcity[testFailed name='test.test/TestUsartModel.testGetFormattedTemperatureFormatsTemperatureFromCalculatorAppropriately' message='Function TemperatureFilter_GetTemperatureInCelcius() called more times than expected.' details='File: test/TestUsartModel.c Line: 25' flowId='15']
|
|
4465
|
+
<a id="__codelineno-3-8" name="__codelineno-3-8" href="#__codelineno-3-8"></a>##teamcity[testFinished name='test.test/TestUsartModel.testGetFormattedTemperatureFormatsTemperatureFromCalculatorAppropriately' duration='81' flowId='15']
|
|
4466
|
+
<a id="__codelineno-3-9" name="__codelineno-3-9" href="#__codelineno-3-9"></a>##teamcity[testIgnored name='test.test/TestUsartModel.testShouldReturnWakeupMessage' flowId='15']
|
|
4467
|
+
<a id="__codelineno-3-10" name="__codelineno-3-10" href="#__codelineno-3-10"></a>##teamcity[testSuiteFinished name='TestUsartModel' flowId='15']
|
|
4482
4468
|
</code></pre></div>
|
|
4483
4469
|
<p><br/><br/></p>
|
|
4484
4470
|
|
|
@@ -4548,10 +4534,10 @@ underlying Java language in which TeamCity is written,
|
|
|
4548
4534
|
|
|
4549
4535
|
|
|
4550
4536
|
|
|
4551
|
-
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.
|
|
4537
|
+
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
|
|
4552
4538
|
|
|
4553
4539
|
|
|
4554
|
-
<script src="../assets/javascripts/bundle.
|
|
4540
|
+
<script src="../assets/javascripts/bundle.c21346df.min.js"></script>
|
|
4555
4541
|
|
|
4556
4542
|
|
|
4557
4543
|
</body>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
<link rel="icon" href="../assets/images/favicon.png">
|
|
24
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.
|
|
24
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.0">
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<link rel="stylesheet" href="../assets/stylesheets/main.
|
|
32
|
+
<link rel="stylesheet" href="../assets/stylesheets/main.57a0d79d.min.css">
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
<link rel="stylesheet" href="../assets/stylesheets/palette.
|
|
35
|
+
<link rel="stylesheet" href="../assets/stylesheets/palette.fb2fffe2.min.css">
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
@@ -89,30 +89,16 @@
|
|
|
89
89
|
</div>
|
|
90
90
|
<div data-md-component="announce">
|
|
91
91
|
|
|
92
|
-
<aside class="md-banner">
|
|
93
|
-
<div class="md-banner__inner md-grid md-typeset">
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
</aside>
|
|
101
|
-
|
|
102
92
|
</div>
|
|
103
93
|
|
|
104
94
|
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
|
|
105
95
|
|
|
106
96
|
<aside class="md-banner md-banner--warning">
|
|
107
97
|
<div class="md-banner__inner md-grid md-typeset">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
You are not viewing the latest version.
|
|
98
|
+
You are not viewing the latest version.
|
|
111
99
|
<a href="../..">
|
|
112
100
|
<strong>Click here to go to latest.</strong>
|
|
113
101
|
</a>
|
|
114
|
-
|
|
115
|
-
|
|
116
102
|
</div>
|
|
117
103
|
<script>var el=document.querySelector("[data-md-component=outdated]"),base=new URL(".."),outdated=__md_get("__outdated",sessionStorage,base);!0===outdated&&el&&(el.hidden=!1)</script>
|
|
118
104
|
</aside>
|
|
@@ -5095,13 +5081,17 @@ Without its own entries for an operation, a <code>sanitize:</code> build uses <c
|
|
|
5095
5081
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a>$<span class="w"> </span>ceedling<span class="w"> </span>sanitize:all
|
|
5096
5082
|
</code></pre></div>
|
|
5097
5083
|
<h3 id="run-sanitizers-for-a-single-test-file">Run sanitizers for a single test file</h3>
|
|
5098
|
-
<p>Pass the test filename
|
|
5084
|
+
<p>Pass the test filename:</p>
|
|
5099
5085
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a>$<span class="w"> </span>ceedling<span class="w"> </span>sanitize:test_my_module.c
|
|
5100
5086
|
</code></pre></div>
|
|
5101
5087
|
<p>You can also pass just the source filename. Ceedling locates the corresponding
|
|
5102
5088
|
test file:</p>
|
|
5103
5089
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a>$<span class="w"> </span>ceedling<span class="w"> </span>sanitize:my_module.c
|
|
5104
5090
|
</code></pre></div>
|
|
5091
|
+
<p>As with <a href="../getting-started/command-line.html#ceedling-test"><code>test:</code> tasks</a>, add
|
|
5092
|
+
as much of the file’s path as needed to tell same-named test files apart:</p>
|
|
5093
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-12-1" name="__codelineno-12-1" href="#__codelineno-12-1"></a>$<span class="w"> </span>ceedling<span class="w"> </span>sanitize:unit/test_my_module.c
|
|
5094
|
+
</code></pre></div>
|
|
5105
5095
|
<h2 id="how-findings-are-reported">How findings are reported</h2>
|
|
5106
5096
|
<p>A sanitizer’s finding is reported where you would look for a test failure.</p>
|
|
5107
5097
|
<ul>
|
|
@@ -5111,12 +5101,12 @@ test file:</p>
|
|
|
5111
5101
|
its location, and the test’s log. It replaces Ceedling’s generic crash notice
|
|
5112
5102
|
and its backtrace advice:</li>
|
|
5113
5103
|
</ul>
|
|
5114
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
5115
|
-
<a id="__codelineno-
|
|
5116
|
-
<a id="__codelineno-
|
|
5104
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-13-1" name="__codelineno-13-1" href="#__codelineno-13-1"></a>☠️ ERROR: Test executable `test_buffer.out` was stopped by a sanitizer finding.
|
|
5105
|
+
<a id="__codelineno-13-2" name="__codelineno-13-2" href="#__codelineno-13-2"></a>> AddressSanitizer heap-buffer-overflow at test/test_buffer.c:21
|
|
5106
|
+
<a id="__codelineno-13-3" name="__codelineno-13-3" href="#__codelineno-13-3"></a>> Boom log: build/artifacts/sanitize/sanitize/test_buffer.log
|
|
5117
5107
|
</code></pre></div>
|
|
5118
5108
|
<p>The test’s failure message carries the same on one line:</p>
|
|
5119
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
5109
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-14-1" name="__codelineno-14-1" href="#__codelineno-14-1"></a>AddressSanitizer heap-buffer-overflow at test/test_buffer.c:21 (Boom log: build/artifacts/sanitize/sanitize/test_buffer.log)
|
|
5120
5110
|
</code></pre></div>
|
|
5121
5111
|
<ul>
|
|
5122
5112
|
<li>
|
|
@@ -5131,54 +5121,54 @@ test file:</p>
|
|
|
5131
5121
|
<p>Each finding is also logged as the test runs, except one a crash notice
|
|
5132
5122
|
names. With <a href="#fail_build"><code>:fail_build:</code></a> enabled, the build failure summary
|
|
5133
5123
|
counts the findings and names the reports written:</p>
|
|
5134
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
5124
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-15-1" name="__codelineno-15-1" href="#__codelineno-15-1"></a> • [SANITIZE] Sanitizers found 2 problems in 2 tests. See the reports in build/artifacts/sanitize/sanitize: sanitize.log, sanitize.json.
|
|
5135
5125
|
</code></pre></div>
|
|
5136
5126
|
<h3 id="example-console-output">Example console output</h3>
|
|
5137
5127
|
<p>These excerpts come from real runs. Build progress lines are left out.</p>
|
|
5138
5128
|
<p>A halted test, with <code>:reports</code> set to <code>[:text, :json, :sarif]</code>:</p>
|
|
5139
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
5140
|
-
<a id="__codelineno-
|
|
5141
|
-
<a id="__codelineno-
|
|
5142
|
-
<a id="__codelineno-
|
|
5143
|
-
<a id="__codelineno-
|
|
5144
|
-
<a id="__codelineno-
|
|
5145
|
-
<a id="__codelineno-
|
|
5146
|
-
<a id="__codelineno-
|
|
5147
|
-
<a id="__codelineno-15-9" name="__codelineno-15-9" href="#__codelineno-15-9"></a>
|
|
5148
|
-
<a id="__codelineno-15-10" name="__codelineno-15-10" href="#__codelineno-15-10"></a>SANITIZE: ❌ OVERALL TEST SUMMARY
|
|
5149
|
-
<a id="__codelineno-15-11" name="__codelineno-15-11" href="#__codelineno-15-11"></a>TESTED: 2
|
|
5150
|
-
<a id="__codelineno-15-12" name="__codelineno-15-12" href="#__codelineno-15-12"></a>PASSED: 1
|
|
5151
|
-
<a id="__codelineno-15-13" name="__codelineno-15-13" href="#__codelineno-15-13"></a>FAILED: 1
|
|
5152
|
-
<a id="__codelineno-15-14" name="__codelineno-15-14" href="#__codelineno-15-14"></a>IGNORED: 0
|
|
5153
|
-
<a id="__codelineno-15-15" name="__codelineno-15-15" href="#__codelineno-15-15"></a>
|
|
5154
|
-
<a id="__codelineno-15-16" name="__codelineno-15-16" href="#__codelineno-15-16"></a>❌ BUILD FAILURE SUMMARY
|
|
5155
|
-
<a id="__codelineno-15-17" name="__codelineno-15-17" href="#__codelineno-15-17"></a> • [SANITIZE] Unit test failures
|
|
5156
|
-
<a id="__codelineno-15-18" name="__codelineno-15-18" href="#__codelineno-15-18"></a> • [SANITIZE] Sanitizers found 1 problem in 1 test. See the reports in build/artifacts/sanitize/sanitize: sanitize.log, sanitize.json, sanitize.sarif.
|
|
5157
|
-
</code></pre></div>
|
|
5158
|
-
<p>A leak. Every test passes, and the leak alone fails the build. The test’s
|
|
5159
|
-
own output section shows the sanitizer’s report:</p>
|
|
5160
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-16-1" name="__codelineno-16-1" href="#__codelineno-16-1"></a>🪲 ERROR: test_nosanitize_leak: LeakSanitizer memory-leak at test/test_nosanitize_leak.c:32 ➡️ see build/artifacts/sanitize/sanitize/test_nosanitize_leak.log
|
|
5161
|
-
<a id="__codelineno-16-2" name="__codelineno-16-2" href="#__codelineno-16-2"></a>
|
|
5162
|
-
<a id="__codelineno-16-3" name="__codelineno-16-3" href="#__codelineno-16-3"></a>SANITIZE: TEST OUTPUT
|
|
5163
|
-
<a id="__codelineno-16-4" name="__codelineno-16-4" href="#__codelineno-16-4"></a>[test/test_nosanitize_leak.c]
|
|
5164
|
-
<a id="__codelineno-16-5" name="__codelineno-16-5" href="#__codelineno-16-5"></a> - "==456==ERROR: LeakSanitizer: detected memory leaks"
|
|
5165
|
-
<a id="__codelineno-16-6" name="__codelineno-16-6" href="#__codelineno-16-6"></a> - "Direct leak of 32 byte(s) in 1 object(s) allocated from:"
|
|
5166
|
-
<a id="__codelineno-16-7" name="__codelineno-16-7" href="#__codelineno-16-7"></a> - " #1 0x55f0b16d72e9 in test_loses_its_allocation test/test_nosanitize_leak.c:32"
|
|
5167
|
-
<a id="__codelineno-16-8" name="__codelineno-16-8" href="#__codelineno-16-8"></a> - "SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s)."
|
|
5129
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-16-1" name="__codelineno-16-1" href="#__codelineno-16-1"></a>☠️ ERROR: Test executable `test_nosanitize_heap_buffer_overflow.out` was stopped by a sanitizer finding.
|
|
5130
|
+
<a id="__codelineno-16-2" name="__codelineno-16-2" href="#__codelineno-16-2"></a>> AddressSanitizer heap-buffer-overflow at test/test_nosanitize_heap_buffer_overflow.c:29
|
|
5131
|
+
<a id="__codelineno-16-3" name="__codelineno-16-3" href="#__codelineno-16-3"></a>> Boom log: build/artifacts/sanitize/sanitize/test_nosanitize_heap_buffer_overflow.log
|
|
5132
|
+
<a id="__codelineno-16-4" name="__codelineno-16-4" href="#__codelineno-16-4"></a>
|
|
5133
|
+
<a id="__codelineno-16-5" name="__codelineno-16-5" href="#__codelineno-16-5"></a>SANITIZE: FAILED TEST SUMMARY
|
|
5134
|
+
<a id="__codelineno-16-6" name="__codelineno-16-6" href="#__codelineno-16-6"></a>[test/test_nosanitize_heap_buffer_overflow.c]
|
|
5135
|
+
<a id="__codelineno-16-7" name="__codelineno-16-7" href="#__codelineno-16-7"></a> Test: test_writes_past_its_buffer
|
|
5136
|
+
<a id="__codelineno-16-8" name="__codelineno-16-8" href="#__codelineno-16-8"></a> At line (27): "AddressSanitizer heap-buffer-overflow at test/test_nosanitize_heap_buffer_overflow.c:29 (Boom log: build/artifacts/sanitize/sanitize/test_nosanitize_heap_buffer_overflow.log)"
|
|
5168
5137
|
<a id="__codelineno-16-9" name="__codelineno-16-9" href="#__codelineno-16-9"></a>
|
|
5169
|
-
<a id="__codelineno-16-10" name="__codelineno-16-10" href="#__codelineno-16-10"></a>SANITIZE:
|
|
5138
|
+
<a id="__codelineno-16-10" name="__codelineno-16-10" href="#__codelineno-16-10"></a>SANITIZE: ❌ OVERALL TEST SUMMARY
|
|
5170
5139
|
<a id="__codelineno-16-11" name="__codelineno-16-11" href="#__codelineno-16-11"></a>TESTED: 2
|
|
5171
|
-
<a id="__codelineno-16-12" name="__codelineno-16-12" href="#__codelineno-16-12"></a>PASSED:
|
|
5172
|
-
<a id="__codelineno-16-13" name="__codelineno-16-13" href="#__codelineno-16-13"></a>FAILED:
|
|
5140
|
+
<a id="__codelineno-16-12" name="__codelineno-16-12" href="#__codelineno-16-12"></a>PASSED: 1
|
|
5141
|
+
<a id="__codelineno-16-13" name="__codelineno-16-13" href="#__codelineno-16-13"></a>FAILED: 1
|
|
5173
5142
|
<a id="__codelineno-16-14" name="__codelineno-16-14" href="#__codelineno-16-14"></a>IGNORED: 0
|
|
5174
5143
|
<a id="__codelineno-16-15" name="__codelineno-16-15" href="#__codelineno-16-15"></a>
|
|
5175
5144
|
<a id="__codelineno-16-16" name="__codelineno-16-16" href="#__codelineno-16-16"></a>❌ BUILD FAILURE SUMMARY
|
|
5176
|
-
<a id="__codelineno-16-17" name="__codelineno-16-17" href="#__codelineno-16-17"></a> • [SANITIZE]
|
|
5145
|
+
<a id="__codelineno-16-17" name="__codelineno-16-17" href="#__codelineno-16-17"></a> • [SANITIZE] Unit test failures
|
|
5146
|
+
<a id="__codelineno-16-18" name="__codelineno-16-18" href="#__codelineno-16-18"></a> • [SANITIZE] Sanitizers found 1 problem in 1 test. See the reports in build/artifacts/sanitize/sanitize: sanitize.log, sanitize.json, sanitize.sarif.
|
|
5147
|
+
</code></pre></div>
|
|
5148
|
+
<p>A leak. Every test passes, and the leak alone fails the build. The test’s
|
|
5149
|
+
own output section shows the sanitizer’s report:</p>
|
|
5150
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-17-1" name="__codelineno-17-1" href="#__codelineno-17-1"></a>🪲 ERROR: test_nosanitize_leak: LeakSanitizer memory-leak at test/test_nosanitize_leak.c:32 ➡️ see build/artifacts/sanitize/sanitize/test_nosanitize_leak.log
|
|
5151
|
+
<a id="__codelineno-17-2" name="__codelineno-17-2" href="#__codelineno-17-2"></a>
|
|
5152
|
+
<a id="__codelineno-17-3" name="__codelineno-17-3" href="#__codelineno-17-3"></a>SANITIZE: TEST OUTPUT
|
|
5153
|
+
<a id="__codelineno-17-4" name="__codelineno-17-4" href="#__codelineno-17-4"></a>[test/test_nosanitize_leak.c]
|
|
5154
|
+
<a id="__codelineno-17-5" name="__codelineno-17-5" href="#__codelineno-17-5"></a> - "==456==ERROR: LeakSanitizer: detected memory leaks"
|
|
5155
|
+
<a id="__codelineno-17-6" name="__codelineno-17-6" href="#__codelineno-17-6"></a> - "Direct leak of 32 byte(s) in 1 object(s) allocated from:"
|
|
5156
|
+
<a id="__codelineno-17-7" name="__codelineno-17-7" href="#__codelineno-17-7"></a> - " #1 0x55f0b16d72e9 in test_loses_its_allocation test/test_nosanitize_leak.c:32"
|
|
5157
|
+
<a id="__codelineno-17-8" name="__codelineno-17-8" href="#__codelineno-17-8"></a> - "SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s)."
|
|
5158
|
+
<a id="__codelineno-17-9" name="__codelineno-17-9" href="#__codelineno-17-9"></a>
|
|
5159
|
+
<a id="__codelineno-17-10" name="__codelineno-17-10" href="#__codelineno-17-10"></a>SANITIZE: ✅ OVERALL TEST SUMMARY
|
|
5160
|
+
<a id="__codelineno-17-11" name="__codelineno-17-11" href="#__codelineno-17-11"></a>TESTED: 2
|
|
5161
|
+
<a id="__codelineno-17-12" name="__codelineno-17-12" href="#__codelineno-17-12"></a>PASSED: 2
|
|
5162
|
+
<a id="__codelineno-17-13" name="__codelineno-17-13" href="#__codelineno-17-13"></a>FAILED: 0
|
|
5163
|
+
<a id="__codelineno-17-14" name="__codelineno-17-14" href="#__codelineno-17-14"></a>IGNORED: 0
|
|
5164
|
+
<a id="__codelineno-17-15" name="__codelineno-17-15" href="#__codelineno-17-15"></a>
|
|
5165
|
+
<a id="__codelineno-17-16" name="__codelineno-17-16" href="#__codelineno-17-16"></a>❌ BUILD FAILURE SUMMARY
|
|
5166
|
+
<a id="__codelineno-17-17" name="__codelineno-17-17" href="#__codelineno-17-17"></a> • [SANITIZE] Sanitizers found 1 problem in 1 test. See the reports in build/artifacts/sanitize/sanitize: sanitize.log.
|
|
5177
5167
|
</code></pre></div>
|
|
5178
5168
|
<p>A clean build adds nothing to the test summary, even when JSON or SARIF
|
|
5179
5169
|
reports are written.</p>
|
|
5180
5170
|
<p>On macOS, a leak sanitizer or <code>:detect_leaks</code> logs this warning at startup:</p>
|
|
5181
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
5171
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1" href="#__codelineno-18-1"></a>⚠️ WARNING: Leak detection is not supported on macOS and has been disabled.
|
|
5182
5172
|
</code></pre></div>
|
|
5183
5173
|
<h3 id="backtraces">Backtraces</h3>
|
|
5184
5174
|
<p>With <a href="../configuration/reference/project.html#use_backtrace"><code>:use_backtrace</code></a>
|
|
@@ -5190,12 +5180,12 @@ The leak sanitizer cannot run under a debugger, and a sanitizer’s own report
|
|
|
5190
5180
|
already includes the stack.</p>
|
|
5191
5181
|
<h2 id="artifacts">Artifacts</h2>
|
|
5192
5182
|
<p>Each test with findings has a log of its sanitizer reports:</p>
|
|
5193
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
5183
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-19-1" name="__codelineno-19-1" href="#__codelineno-19-1"></a>build/artifacts/sanitize/sanitize/<test_name>.log
|
|
5194
5184
|
</code></pre></div>
|
|
5195
5185
|
<p>The configured reports are written beside the logs:</p>
|
|
5196
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
5197
|
-
<a id="__codelineno-
|
|
5198
|
-
<a id="__codelineno-
|
|
5186
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-20-1" name="__codelineno-20-1" href="#__codelineno-20-1"></a>build/artifacts/sanitize/sanitize/sanitize.log
|
|
5187
|
+
<a id="__codelineno-20-2" name="__codelineno-20-2" href="#__codelineno-20-2"></a>build/artifacts/sanitize/sanitize/sanitize.json
|
|
5188
|
+
<a id="__codelineno-20-3" name="__codelineno-20-3" href="#__codelineno-20-3"></a>build/artifacts/sanitize/sanitize/sanitize.sarif
|
|
5199
5189
|
</code></pre></div>
|
|
5200
5190
|
<p>With <code>:test_builds</code> enabled, an ordinary <code>test:</code> build writes its logs and
|
|
5201
5191
|
reports to <code>build/artifacts/sanitize/test/</code>.</p>
|
|
@@ -5322,10 +5312,10 @@ kept apart in their own builds.</p>
|
|
|
5322
5312
|
|
|
5323
5313
|
|
|
5324
5314
|
|
|
5325
|
-
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.
|
|
5315
|
+
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
|
|
5326
5316
|
|
|
5327
5317
|
|
|
5328
|
-
<script src="../assets/javascripts/bundle.
|
|
5318
|
+
<script src="../assets/javascripts/bundle.c21346df.min.js"></script>
|
|
5329
5319
|
|
|
5330
5320
|
|
|
5331
5321
|
</body>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
<link rel="icon" href="../assets/images/favicon.png">
|
|
24
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.
|
|
24
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.0">
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<link rel="stylesheet" href="../assets/stylesheets/main.
|
|
32
|
+
<link rel="stylesheet" href="../assets/stylesheets/main.57a0d79d.min.css">
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
<link rel="stylesheet" href="../assets/stylesheets/palette.
|
|
35
|
+
<link rel="stylesheet" href="../assets/stylesheets/palette.fb2fffe2.min.css">
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
@@ -89,30 +89,16 @@
|
|
|
89
89
|
</div>
|
|
90
90
|
<div data-md-component="announce">
|
|
91
91
|
|
|
92
|
-
<aside class="md-banner">
|
|
93
|
-
<div class="md-banner__inner md-grid md-typeset">
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
</aside>
|
|
101
|
-
|
|
102
92
|
</div>
|
|
103
93
|
|
|
104
94
|
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
|
|
105
95
|
|
|
106
96
|
<aside class="md-banner md-banner--warning">
|
|
107
97
|
<div class="md-banner__inner md-grid md-typeset">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
You are not viewing the latest version.
|
|
98
|
+
You are not viewing the latest version.
|
|
111
99
|
<a href="../..">
|
|
112
100
|
<strong>Click here to go to latest.</strong>
|
|
113
101
|
</a>
|
|
114
|
-
|
|
115
|
-
|
|
116
102
|
</div>
|
|
117
103
|
<script>var el=document.querySelector("[data-md-component=outdated]"),base=new URL(".."),outdated=__md_get("__outdated",sessionStorage,base);!0===outdated&&el&&(el.hidden=!1)</script>
|
|
118
104
|
</aside>
|
|
@@ -4803,8 +4789,8 @@ defaults, redefine the argument list in your project configuration:</p>
|
|
|
4803
4789
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="nt">:valgrind</span><span class="p">:</span>
|
|
4804
4790
|
<a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="w"> </span><span class="nt">:arguments</span><span class="p">:</span>
|
|
4805
4791
|
<a id="__codelineno-2-3" name="__codelineno-2-3" href="#__codelineno-2-3"></a><span class="w"> </span><span class="c1"># A subset of the default arguments</span>
|
|
4806
|
-
<a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s"
|
|
4807
|
-
<a id="__codelineno-2-5" name="__codelineno-2-5" href="#__codelineno-2-5"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s"
|
|
4792
|
+
<a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">"--leak-check=full"</span>
|
|
4793
|
+
<a id="__codelineno-2-5" name="__codelineno-2-5" href="#__codelineno-2-5"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">"--show-leak-kinds=all"</span>
|
|
4808
4794
|
</code></pre></div>
|
|
4809
4795
|
<h3 id="fail_build"><code>:fail_build:</code></h3>
|
|
4810
4796
|
<p>When <code>true</code> (the default), any memory errors are logged immediately after
|
|
@@ -4856,23 +4842,27 @@ text log. Useful for CI systems that consume Valgrind output directly.</p>
|
|
|
4856
4842
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>$<span class="w"> </span>ceedling<span class="w"> </span>valgrind:all
|
|
4857
4843
|
</code></pre></div>
|
|
4858
4844
|
<h3 id="run-valgrind-for-a-single-test-file">Run Valgrind for a single test file</h3>
|
|
4859
|
-
<p>Build and run Valgrind for one test file (pass the filename
|
|
4845
|
+
<p>Build and run Valgrind for one test file (pass the filename):</p>
|
|
4860
4846
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a>$<span class="w"> </span>ceedling<span class="w"> </span>valgrind:test_my_module.c
|
|
4861
4847
|
</code></pre></div>
|
|
4862
4848
|
<p>You can also pass just the source filename; Ceedling will locate the
|
|
4863
4849
|
corresponding test file automatically:</p>
|
|
4864
4850
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a>$<span class="w"> </span>ceedling<span class="w"> </span>valgrind:my_module.c
|
|
4865
4851
|
</code></pre></div>
|
|
4852
|
+
<p>As with <a href="../getting-started/command-line.html#ceedling-test"><code>test:</code> tasks</a>, add
|
|
4853
|
+
as much of the file’s path as needed to tell same-named test files apart:</p>
|
|
4854
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a>$<span class="w"> </span>ceedling<span class="w"> </span>valgrind:unit/test_my_module.c
|
|
4855
|
+
</code></pre></div>
|
|
4866
4856
|
<h2 id="artifacts">Artifacts</h2>
|
|
4867
4857
|
<p>Each test executable produces a Valgrind log file at:</p>
|
|
4868
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
4858
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a>build/artifacts/valgrind/<test_name>.log
|
|
4869
4859
|
</code></pre></div>
|
|
4870
4860
|
<p>With <a href="#xml_report"><code>:xml_report:</code></a> enabled, a machine-readable report is written
|
|
4871
4861
|
beside it:</p>
|
|
4872
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
4862
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a>build/artifacts/valgrind/<test_name>.xml
|
|
4873
4863
|
</code></pre></div>
|
|
4874
4864
|
<p>For example, running <code>ceedling valgrind:test_my_module.c</code> produces:</p>
|
|
4875
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
4865
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-12-1" name="__codelineno-12-1" href="#__codelineno-12-1"></a>build/artifacts/valgrind/test_my_module.log
|
|
4876
4866
|
</code></pre></div>
|
|
4877
4867
|
<p>These log files contain the full Valgrind Memcheck output, including any
|
|
4878
4868
|
detected memory errors, leak summaries, and (with <code>--track-origins=yes</code>)
|
|
@@ -4881,49 +4871,49 @@ the origin of uninitialized values.</p>
|
|
|
4881
4871
|
<h2 id="console-output">Console output</h2>
|
|
4882
4872
|
<p>These excerpts come from real runs. Build progress lines are left out.</p>
|
|
4883
4873
|
<p>A clean run adds one notice after the test summary:</p>
|
|
4884
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
4885
|
-
<a id="__codelineno-
|
|
4886
|
-
<a id="__codelineno-
|
|
4887
|
-
<a id="__codelineno-
|
|
4888
|
-
<a id="__codelineno-
|
|
4889
|
-
<a id="__codelineno-
|
|
4890
|
-
<a id="__codelineno-
|
|
4874
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-13-1" name="__codelineno-13-1" href="#__codelineno-13-1"></a>VALGRIND: ✅ OVERALL TEST SUMMARY
|
|
4875
|
+
<a id="__codelineno-13-2" name="__codelineno-13-2" href="#__codelineno-13-2"></a>TESTED: 2
|
|
4876
|
+
<a id="__codelineno-13-3" name="__codelineno-13-3" href="#__codelineno-13-3"></a>PASSED: 1
|
|
4877
|
+
<a id="__codelineno-13-4" name="__codelineno-13-4" href="#__codelineno-13-4"></a>FAILED: 0
|
|
4878
|
+
<a id="__codelineno-13-5" name="__codelineno-13-5" href="#__codelineno-13-5"></a>IGNORED: 1
|
|
4879
|
+
<a id="__codelineno-13-6" name="__codelineno-13-6" href="#__codelineno-13-6"></a>
|
|
4880
|
+
<a id="__codelineno-13-7" name="__codelineno-13-7" href="#__codelineno-13-7"></a>ℹ️ NOTICE: Wrote 1 Valgrind report to build/artifacts/valgrind/
|
|
4891
4881
|
</code></pre></div>
|
|
4892
4882
|
<p>A test that a memory error ends gets a notice naming the first error and its
|
|
4893
4883
|
report. It replaces Ceedling’s generic crash notice:</p>
|
|
4894
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
4895
|
-
<a id="__codelineno-
|
|
4896
|
-
<a id="__codelineno-
|
|
4897
|
-
<a id="__codelineno-
|
|
4898
|
-
<a id="__codelineno-
|
|
4899
|
-
<a id="__codelineno-
|
|
4900
|
-
<a id="__codelineno-
|
|
4901
|
-
<a id="__codelineno-
|
|
4902
|
-
<a id="__codelineno-
|
|
4903
|
-
<a id="__codelineno-
|
|
4904
|
-
<a id="__codelineno-
|
|
4905
|
-
<a id="__codelineno-
|
|
4906
|
-
<a id="__codelineno-
|
|
4907
|
-
<a id="__codelineno-
|
|
4908
|
-
<a id="__codelineno-
|
|
4909
|
-
<a id="__codelineno-
|
|
4910
|
-
<a id="__codelineno-
|
|
4911
|
-
<a id="__codelineno-
|
|
4912
|
-
<a id="__codelineno-
|
|
4913
|
-
<a id="__codelineno-
|
|
4884
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-14-1" name="__codelineno-14-1" href="#__codelineno-14-1"></a>☠️ ERROR: Test executable `test_nosanitize_crash_sigsegv.out` terminated with Valgrind memory errors.
|
|
4885
|
+
<a id="__codelineno-14-2" name="__codelineno-14-2" href="#__codelineno-14-2"></a>> Invalid read of size 4 at test_nosanitize_crash_sigsegv.c:32
|
|
4886
|
+
<a id="__codelineno-14-3" name="__codelineno-14-3" href="#__codelineno-14-3"></a>> Boom log: build/artifacts/valgrind/test_nosanitize_crash_sigsegv.log
|
|
4887
|
+
<a id="__codelineno-14-4" name="__codelineno-14-4" href="#__codelineno-14-4"></a>
|
|
4888
|
+
<a id="__codelineno-14-5" name="__codelineno-14-5" href="#__codelineno-14-5"></a>VALGRIND: FAILED TEST SUMMARY
|
|
4889
|
+
<a id="__codelineno-14-6" name="__codelineno-14-6" href="#__codelineno-14-6"></a>[test/test_nosanitize_crash_sigsegv.c]
|
|
4890
|
+
<a id="__codelineno-14-7" name="__codelineno-14-7" href="#__codelineno-14-7"></a> Test: test_add_numbers_will_fail
|
|
4891
|
+
<a id="__codelineno-14-8" name="__codelineno-14-8" href="#__codelineno-14-8"></a> At line (28): "Test case crashed >> Segmentation fault"
|
|
4892
|
+
<a id="__codelineno-14-9" name="__codelineno-14-9" href="#__codelineno-14-9"></a>
|
|
4893
|
+
<a id="__codelineno-14-10" name="__codelineno-14-10" href="#__codelineno-14-10"></a>VALGRIND: ❌ OVERALL TEST SUMMARY
|
|
4894
|
+
<a id="__codelineno-14-11" name="__codelineno-14-11" href="#__codelineno-14-11"></a>TESTED: 2
|
|
4895
|
+
<a id="__codelineno-14-12" name="__codelineno-14-12" href="#__codelineno-14-12"></a>PASSED: 1
|
|
4896
|
+
<a id="__codelineno-14-13" name="__codelineno-14-13" href="#__codelineno-14-13"></a>FAILED: 1
|
|
4897
|
+
<a id="__codelineno-14-14" name="__codelineno-14-14" href="#__codelineno-14-14"></a>IGNORED: 0
|
|
4898
|
+
<a id="__codelineno-14-15" name="__codelineno-14-15" href="#__codelineno-14-15"></a>
|
|
4899
|
+
<a id="__codelineno-14-16" name="__codelineno-14-16" href="#__codelineno-14-16"></a>ℹ️ NOTICE: Wrote 1 Valgrind report to build/artifacts/valgrind/
|
|
4900
|
+
<a id="__codelineno-14-17" name="__codelineno-14-17" href="#__codelineno-14-17"></a>
|
|
4901
|
+
<a id="__codelineno-14-18" name="__codelineno-14-18" href="#__codelineno-14-18"></a>❌ BUILD FAILURE SUMMARY
|
|
4902
|
+
<a id="__codelineno-14-19" name="__codelineno-14-19" href="#__codelineno-14-19"></a> • [VALGRIND] Unit test failures
|
|
4903
|
+
<a id="__codelineno-14-20" name="__codelineno-14-20" href="#__codelineno-14-20"></a> • [VALGRIND] Valgrind detected 2 memory errors across 1 test
|
|
4914
4904
|
</code></pre></div>
|
|
4915
4905
|
<p>With <a href="#fail_build"><code>:fail_build:</code></a> set to <code>false</code>, the same run omits the last
|
|
4916
4906
|
line. Only the test failure fails the build.</p>
|
|
4917
4907
|
<p>A test that completes despite memory errors logs one line as it runs:</p>
|
|
4918
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
4908
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-15-1" name="__codelineno-15-1" href="#__codelineno-15-1"></a>🪲 ERROR: Valgrind detected 2 memory errors in test_example ➡️ see build/artifacts/valgrind/test_example.log
|
|
4919
4909
|
</code></pre></div>
|
|
4920
4910
|
<p>A test whose report is missing logs a warning, since its memory error status
|
|
4921
4911
|
is unknown:</p>
|
|
4922
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
4912
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-16-1" name="__codelineno-16-1" href="#__codelineno-16-1"></a>⚠️ WARNING: Valgrind wrote no report for test_example at build/artifacts/valgrind/test_example.log. Memory error status is unknown.
|
|
4923
4913
|
</code></pre></div>
|
|
4924
4914
|
<h2 id="interpreting-results">Interpreting results</h2>
|
|
4925
4915
|
<p>To review the log for a specific test:</p>
|
|
4926
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-
|
|
4916
|
+
<div class="highlight"><pre><span></span><code><a id="__codelineno-17-1" name="__codelineno-17-1" href="#__codelineno-17-1"></a>cat<span class="w"> </span>build/artifacts/valgrind/test_my_module.log
|
|
4927
4917
|
</code></pre></div>
|
|
4928
4918
|
<p>Common Valgrind findings include:</p>
|
|
4929
4919
|
<table>
|
|
@@ -5021,10 +5011,10 @@ is unknown:</p>
|
|
|
5021
5011
|
|
|
5022
5012
|
|
|
5023
5013
|
|
|
5024
|
-
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.
|
|
5014
|
+
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
|
|
5025
5015
|
|
|
5026
5016
|
|
|
5027
|
-
<script src="../assets/javascripts/bundle.
|
|
5017
|
+
<script src="../assets/javascripts/bundle.c21346df.min.js"></script>
|
|
5028
5018
|
|
|
5029
5019
|
|
|
5030
5020
|
</body>
|