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

Clean up dummy-ups code, behavior and logs; added NUT_DEBUG_PID option #2118

Merged
merged 21 commits into from
Oct 19, 2023
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
33a97c8
drivers/dummy-ups.c: clarify some debug messages
jimklimov Oct 18, 2023
c994849
drivers/dummy-ups.c: clarify a nested if/elif/... tree
jimklimov Oct 18, 2023
834bfb9
drivers/dummy-ups.c: reconcile method prototype with implem
jimklimov Oct 18, 2023
f5b495f
drivers/dummy-ups.c: clarify that "upsfd" is not really used in file-…
jimklimov Oct 18, 2023
1956b01
drivers/dummy-ups.c: use better-qualified "fn" rather than potentiall…
jimklimov Oct 18, 2023
45da143
drivers/dummy-ups.c: refactor prepare_filepath() into one helper method
jimklimov Oct 18, 2023
4dc9eae
drivers/dummy-ups.c: avoid blank line in debug logs
jimklimov Oct 18, 2023
76e2939
drivers/dummy-ups.c: bump (C) and version due to recent changes
jimklimov Oct 18, 2023
2db24c3
tests/NIT/nit.sh: better filter the processes we look at after sandbo…
jimklimov Oct 18, 2023
664097b
tests/NIT/nit.sh: testcase_sandbox_start_drivers_after_upsd(): bump t…
jimklimov Oct 18, 2023
06eb71f
tests/NIT/nit.sh: testcase_sandbox_start_drivers_after_upsd(): fix ma…
jimklimov Oct 18, 2023
2bca73b
tests/NIT/nit.sh: tag progress/report messages emitted by test cases …
jimklimov Oct 18, 2023
861b50e
tests/NIT/nit.sh: report driver PIDs when debugging
jimklimov Oct 18, 2023
9fbb5a7
tests/NIT/nit.sh: sandbox_start_drivers(): report success or failure
jimklimov Oct 18, 2023
21fe028
common/common.c: optionally support NUT_DEBUG_PID envvar presence to …
jimklimov Oct 18, 2023
ecc5031
tests/NIT/nit.sh: use NUT_DEBUG_PID envvar to help test-log readability
jimklimov Oct 18, 2023
7a30529
tests/NIT/nit.sh: use log_separator() before sandbox_forget_configs()…
jimklimov Oct 18, 2023
ec9172e
tests/NIT/nit.sh: tag more progress messages with respective testcase…
jimklimov Oct 18, 2023
72c985d
tests/NIT/nit.sh: testcase_sandbox_nutscanner_list(): fix reporting
jimklimov Oct 18, 2023
7701368
tests/NIT/nit.sh: avoid printing "Error:..." in successful cases
jimklimov Oct 18, 2023
71710c2
GitIgnore .ci*.txt* if some are left over in the NUT CI farm work area
jimklimov Oct 19, 2023
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
Prev Previous commit
Next Next commit
tests/NIT/nit.sh: testcase_sandbox_start_drivers_after_upsd(): fix ma…
…tching expression and explain why

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov committed Oct 18, 2023
commit 06eb71feb2f836627913308d3821250f79afa287
6 changes: 4 additions & 2 deletions tests/NIT/nit.sh
Original file line number Diff line number Diff line change
@@ -837,10 +837,12 @@ testcase_sandbox_start_drivers_after_upsd() {
# so tightly near a minute until we have sturdy replies.
COUNTDOWN=90
while [ "$COUNTDOWN" -gt 0 ]; do
# For query errors or known wait, keep looping
# For query errors or known wait, keep looping. May get:
# driver.state: updateinfo
# ups.status: WAIT
runcmd upsc dummy@localhost:$NUT_PORT \
&& case "$CMDOUT" in
"ups.status: WAIT") ;;
*"ups.status: WAIT"*) ;;
*) log_info "Got output:" ; echo "$CMDOUT" ; break ;;
esac
sleep 1