Outreachy contributions discussions

This section is for discussing questions, issues and clarifications that arise when making contributions.

3 Likes

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

1 Like

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 :slight_smile:

(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 ^^)

2 Likes

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. :wink:

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?

1 Like

Yes, It does. Thank you so much.

1 Like

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. :sweat_smile:
Thank you!

3 Likes

@jufajardini

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?! :thinking:
or should I go on with asking for claiming a specific ticket?

1 Like

@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?

3 Likes

Great!
Just making sure I get these stuff right, first time dealing w/ Redmine. :grinning_face_with_smiling_eyes: :
Thank you!

1 Like

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? :thinking:

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.

1 Like