Skip to content

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Apr 9, 2025

Dump the output of invoked commands in the functional tests, so that they are shown when the testcase fails, to ease debugging. (The output is not shown in case the testcase succeeds.)

Inspired due to a valgrind failure on armhf on Debian buildd.

count=$(echo ${output} | grep -o "W-002" | wc -l)
echo "Status: $status, Count: $count (expected 1)"
echo $output
echo ${output}
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this and the remaining echo calls in this function just be dropped? It looks like it's just printing the same output four times in a row.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, dropped superfluous statements

count=$(echo ${output} | grep -o "W-002" | wc -l)
echo "Status: $status, Count: $count (expected 0)"
echo $output
echo ${output}
Copy link
Member

Choose a reason for hiding this comment

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

As above, this one now seems redundant to the one above.

Copy link
Member

Choose a reason for hiding this comment

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

(In this case, the subsequent ones in the function all follow a run, so for this test, it's just this line that I think needs dropping).

Dump the output of invoked commands in the functional tests, so that
they are shown when the testcase fails, to ease debugging. (The output
is not shown in case the testcase succeeds.)

Inspired due to a valgrind failure on armhf on Debian buildd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants