smoke: fix shutdown test for service mode#475
Conversation
📝 WalkthroughWalkthroughAdds a new Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @smoke/_init.sh:
- Around line 229-230: The journalctl check is unreliable because it reads the
last 2 system-wide entries; change the check that currently uses "journalctl -n
2 | grep -q 'Deactivated successfully'" to query the grout service unit (use the
service/unit name) and increase the number of lines searched (e.g., -n 50) so
the grep reliably finds "Deactivated successfully"; keep the existing fail
invocation (fail "shutdown was not successful") but update the journalctl
invocation reference in the script to include --unit=<grout-unit-name> (or -u
<grout-unit-name>) and a larger -n value.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
smoke/_init.shsmoke/shutdown_test.sh
🧰 Additional context used
📓 Path-based instructions (1)
**/*.sh
⚙️ CodeRabbit configuration file
**/*.sh: - Don't bother about unquoted shell variables.
Files:
smoke/_init.shsmoke/shutdown_test.sh
🧬 Code graph analysis (1)
smoke/shutdown_test.sh (1)
smoke/_init.sh (1)
shutdown_grout(223-234)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: build-and-tests (gcc-13, none, debugoptimized, ubuntu-24.04, -Dfrr=enabled, false)
- GitHub Check: build-and-tests (clang-15, none, debugoptimized, ubuntu-22.04, false)
- GitHub Check: build-and-tests (gcc-14, address, debug, ubuntu-24.04, -Dfrr=enabled, true)
- GitHub Check: build-and-tests (clang-18, none, debugoptimized, ubuntu-24.04, false)
- GitHub Check: build-and-tests (clang-16, none, debugoptimized, ubuntu-24.04, false)
- GitHub Check: rpm
- GitHub Check: deb
🔇 Additional comments (2)
smoke/shutdown_test.sh (1)
34-34: LGTM!Clean delegation to the centralized
shutdown_groutfunction.smoke/_init.sh (1)
219-221: LGTM!Correct approach to retrieve the main PID of a systemd-managed grout instance.
5c44cc9 to
16f48ee
Compare
When Grout was working as a systemd service (rather than starting again for each test), shutdown_test did not work as expected. Signed-off-by: Roman Safronov <rsafrono@redhat.com>
16f48ee to
324cdfe
Compare
rjarry
left a comment
There was a problem hiding this comment.
I am coming back to this PR. Sorry for the delay.
I don't think you should be running smoke tests with grout running as a systemd service. Why don't you let the script start grout?
|
shutdown_test does not really make sense in service mode, closing |
When Grout was working as a systemd service (rather than starting again for each test), shutdown_test did not work as expected.
Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.