Skip to content

deprecate stderr usage in our units tests #4112

Open
@jmayclin

Description

Problem:

Ctest does not play well with stderr. Even when enabling --output-on-failure I still don't see the output of our fprintf statements, like the one below

if (expected_size != actual_size) {
fprintf(stderr, "\nS2N_TLS12_STATE_SIZE_IN_BYTES (%i) should be set to %u\n\n",
S2N_TLS12_STATE_SIZE_IN_BYTES, expected_size);
}

If I change stderr to stdout I do see the output.

Solution:

use printf instead.

Requirements / Acceptance Criteria:

error message should show up in ctest when --output-on-failure is enabled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions