-
Notifications
You must be signed in to change notification settings - Fork 90
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
tests: add a test for missing runmode v3 #1454
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Suricata Missing Runmode Issue | ||
|
||
This directory contains test files and documentation for addressing the "Missing runmode" issue 5711 in Suricata. | ||
|
||
## Issue Description | ||
|
||
The issue relates to Suricata not providing adequate feedback when the runmode is missing, leading to confusion for users. | ||
|
||
## Related Issue | ||
|
||
https://redmine.openinfosecfoundation.org/issues/5711 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
%YAML 1.1 | ||
--- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
requires: | ||
min-version: 7.0.3 | ||
pcap: false | ||
|
||
exit-code: 1 | ||
|
||
args: | ||
- -c suricata.yaml | ||
|
||
checks: | ||
|
||
- file: | ||
args: "No capture mode specified as a command-line argument, specify one from the --list-runmodes" stderr | ||
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this works as intended. Please take a better look at the example from https://github.com/OISF/suricata-verify/blob/master/tests/detect-strip_whitespace-01/test.yaml#L9-L12 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback. I've carefully reviewed the suggestion. And I have verified that the error message in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand your reasoning, but have you run this test locally to see if it works as expected? What I meant to say with my other comment is that the check itself doesn't work as is. Since we are missing the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
okay, I understand now and I just ran this test again with this: checks: and here is the result: PASSED: 1 But suprisingingly, I tried using grep a lot of times earlier when trying to incoporate feedback before I decided to PR , it didnt say any test pass or fail. it just indicated 0 for both pass and fail. maybe there was a typo I neglected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is very possible, one thing I still want to improve with SV is to get better error messages when a test fails to run, instead of just showing nothing, as it happens now and has happened to you. Glad to know that things are making sense! :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Thank you. So do I go ahead and incorporate this feedback or I wait out for the PR changes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The format of the test itself needs to be updated, regardless of future decisions on what should the output of that command look like. So I think you are safe to incorporate these changes, but can hold on submitting a new PR for them, for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: While reviewing locally, I've noticed some trailing whitespace at the end of
min-version
andargs:
lines. Could you remove those, please?