Skip to content

Commit

Permalink
redfishpower: remove excessive debug output
Browse files Browse the repository at this point in the history
Problem: In test mode, debug for the resolve-hosts option is always
output.  This can get annoying.

Only output debug indicating that resolve-hosts is set.  Don't output
if it is not set.

Adjust test for new expected output.

Fixes chaos#207
  • Loading branch information
chu11 committed Sep 17, 2024
1 parent 1303c85 commit 2022d26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/redfishpower/redfishpower.c
Original file line number Diff line number Diff line change
Expand Up @@ -2002,8 +2002,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "command line option: auth = %s\n", userpwd);
if (message_timeout != MESSAGE_TIMEOUT_DEFAULT)
fprintf(stderr, "command line option: message timeout = %ld\n", message_timeout);
fprintf(stderr, "command line option: resolve-hosts = %s\n",
resolve_hosts ? "set" : "not set");
if (resolve_hosts)
fprintf(stderr, "command line option: resolve-hosts set\n");
}

shell(mh);
Expand Down
2 changes: 1 addition & 1 deletion t/t0034-redfishpower.t
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ test_expect_success 'message timeout option setting appears to work' '
'
test_expect_success 'resolve-hosts option setting appears to work' '
echo "quit" | $redfishdir/redfishpower -h t[0-15] --test-mode --resolve-hosts 2> resolve_hosts.err
grep "resolve-hosts = set" resolve_hosts.err
grep "resolve-hosts set" resolve_hosts.err
'

#
Expand Down

0 comments on commit 2022d26

Please sign in to comment.