awslabs / aws-c-common

Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling.
Apache License 2.0
262 stars 159 forks source link

Use _Exit() on test failure, to avoid LeakSanitizer spam #1088

Closed graebm closed 9 months ago

graebm commented 9 months ago

Cut down on unrelated spam when a test fails.

_Exit() is in C99. It avoids running cleanup functions on program termination.

This does prevent us from running multiple tests via the aws-c-common-tests executable, but we never ever do that. We always use ctest, which launches each test in its own process. I literally only learned today that you can pass -A to run all tests.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.