Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-14594 test: fix dfs_parallel xml generation (#13312) #13653

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions src/tests/suite/dfs_test.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2019-2022 Intel Corporation.
* (C) Copyright 2019-2024 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -81,16 +81,17 @@ run_specified_tests(const char *tests, int rank, int size,
int
main(int argc, char **argv)
{
test_arg_t *arg;
char tests[64];
char *exclude_str = NULL;
int ntests = 0;
int nr_failed = 0;
int nr_total_failed = 0;
int opt = 0, index = 0;
int rank;
int size;
int rc;
test_arg_t *arg;
char tests[64];
char *exclude_str = NULL;
char *cmocka_message_output = NULL;
int ntests = 0;
int nr_failed = 0;
int nr_total_failed = 0;
int opt = 0, index = 0;
int rank;
int size;
int rc;

d_register_alt_assert(mock_assert);

Expand Down Expand Up @@ -166,6 +167,16 @@ main(int argc, char **argv)
tests[new_idx] = '\0';
}

/** if writing XML, force all ranks other than rank 0 to use stdout to avoid conflicts */
cmocka_message_output = getenv("CMOCKA_MESSAGE_OUTPUT");
if (rank != 0 && cmocka_message_output && strcasecmp(cmocka_message_output, "xml") == 0) {
rc = setenv("CMOCKA_MESSAGE_OUTPUT", "stdout", 1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclean because master has d_setenv but 2.4 does not

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knard-intel is there a plan to port that change on 2.4? if so, we probably need to fix this later?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I know, it is not planned to backport the PRs related to the ticket DAOS-14532

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. I don't think we need to backport DAOS-14532

if (rc) {
print_message("d_setenv() failed with %d\n", rc);
return -1;
}
}

nr_failed = run_specified_tests(tests, rank, size, NULL, 0);

exit:
Expand Down
Loading