This section is for discussing questions, issues and clarifications that arise when making contributions.
Hi Juliana. I noticed this while running the unit test. One test keeps failing. I was wondering if this is normal or an issue with my installation? and can I go ahead with my contributions
Hey Modupe!
Could you please share more details about whatâs happening?
- What is the unit test that is failing?
- How are you running Suri?
Then it should be easier to understand what might be the issue!
About going ahead with your contributions: is that about the ticket that you want to claim? If so, sure, please try and let me know if you managed to, or if we have to update your user role in Redmine
(small note: no need to address just me in the questions, as everyone who knows something about it can help with an answer - even other Outreachy applicants, after all, thatâs what a community is ^^)
So I use âsudo suricata -c /etc/suricata/suricata.yaml -i en2 --init-errors-fatalâ to run suri. Test SCLogTestInit02 is failing.
Thank you for the advice. Also, I see the ticket has been assigned to me. Thank you.
Not sure why this would happen with sudo. Suricata cannot open the file to append⌠Could you please share your configure cmd? And the steps you used to install Suri.
Can you make sure the output and the command match? These tests shouldnât run with that command.
Apologies. I used ./src/suricata -u to run the unit test. I followed the instructions here for the installation: Getting Started Contributing to Suricata - Suricata. replaced the ./configure line with ./configure âdisable-shared âenable-debug âenable-unittests and used: Basic Setup - Suricata - Open Information Security Foundation
for the setup.
Thank you. I didnât notice your command. As Victor mentioned, could you please make sure that youâre showing output for the command that you tried?
Pasting the output inside a code block would be nicer than screenshot, easier for us to copy and try things on our end.
Command: ./src/suricata -u
Output: Test DetectEngineTest09 : [775] 17/10/2021 â 10:50:58 - (detect-engine.c:2283) (DetectEngineCtxLoadConf) â [ERRCODE: SC_ERR_SIZE_PARSE(198)] - parsing âBAâ for toclient-groups failed, using 20
[775] 17/10/2021 â 10:50:58 - (detect-engine.c:2300) (DetectEngineCtxLoadConf) â [ERRCODE: SC_ERR_SIZE_PARSE(198)] - parsing âBAâ for toserver-groups failed, using 40
[775] 17/10/2021 â 10:50:58 - (util-classification-config.c:363) (SCClassConfParseFile) â Added â43â classification types from the classification file
[775] 17/10/2021 â 10:50:58 - (util-reference-config.c:337) (SCRConfParseFile) â Added â19â reference types from the reference.config file
[775] 17/10/2021 â 10:50:58 - (detect-engine-build.c:1760) (SigAddressCleanupStage1) â cleaning up signature grouping structure⌠complete
pass
Test SCLogTestInit01 : pass
Test SCLogTestInit02 : Error opening file /var/log/suricata/boo.txt
Argument(s) to SCLogAppendOPIfaceCtx() NULL
FAILED
Test SCLogTestInit03 : Fine grained filters:
(null) - bamboo - -1
(null) - soo - -1
(null) - dummy - -1
Fine grained filters:
(null) - bamboo - -1
(null) - soo - -1
(null) - dummy - -1
(null) - dummy1 - -1
(null) - dummy2 - -1
pass
Test SCLogTestInit04 : FD filters:
bamboo
soo
foo
roo
FD filters:
bamboo
soo
foo
roo
loo
FD filters:
roo
loo
pass
So, I tried to follow the steps that you used.
If I configure suri with
CFLAGS="-O0 -ggdb -fno-omit-frame-pointer" ./configure --disable-shared --enable-debug --enable-unittests
Then build it and run
./src/suricata -u
I also get that test failing. But if I run
sudo ./src/suricata -u
It passes. That is because in my machine that directory/file is owned by root
, so, if I run suri without sudo
, it canât access it, and then the test fails. Does this solve this issue for you?
Yes, It does. Thank you so much.
Thanks for pointing that out!
I had the same issue, I couldnât really understand what was going on, then by going back to the Installation Guide - Basic Setup I realized we should either do
sudo make install-conf
# or
sudo mkdir /var/log/suricata
.
.
.
# to the end of setup
Which makes the SCLogTestInit02
fails if not running the tests with sudo
.
Sometimes rewinding the process is good with hanging stuff like this.
Thank you!
I have a question regarding claiming tickets at redmine, I realize itâs different after my first claim, am I wrong?
I am not sure if I could assign a ticket to myself?!
or should I go on with asking for claiming a specific ticket?
@gith you should ask on every ticket that you want to claim. You can only have one âGood First Issueâ and then move to other âBeginnerâ tickets once youâve made the PR for the good first issue.
Once a mentor approves that you can claim the ticket (this is just to avoid multiple applicants working on same issue), you can self assign.
Does this help?
Great!
Just making sure I get these stuff right, first time dealing w/ Redmine. :
Thank you!
Just to add to what @sbhardwaj has said: weâve decided that right now it is ok if someone wants to claim another ticket from that list of clippy warnings that need to be fixed, even if they have already worked on one of those.
Hello Modupe, you mentioned that you use Mac os.
Can you kindly point out areas where the setup in mac differs from the one provided for linux?
Thanks
I wonder if there is anything we should consider when a commit gets CI failed checks??
I know in most projects itâs not a must for all the checks to pass to merge a commit to upstream, but for Suricata, should we only pay attention when Code Owner/ Maintainers mention a modification? or what exactly?
Hi Sophia. The setup is pretty much the same. The major difference would be with the commands. I am always available to assist if you have any issues with the setup.