Task #6330
openTask #2975: convert unittests to new FAIL/PASS API
Convert unittests to new FAIL/PASS API - tests/stream-tcp-list.c
Description
There are some remaining unittests that were not fully converted to the FAIL/PASS API in the tests/stream-tcp-list.c .
Follow the instructions from the parent task to know how to convert them.
Updated by Juliana Fajardini Reichow about 1 year ago
- Copied from Task #6316: Convert unittests to new FAIL/PASS API - app-layer-detect-proto.c added
Updated by Shivani Bhardwaj 12 months ago
- Status changed from New to Rejected
- Label deleted (
Beginner, C, Good First Issue, Outreachy)
There are no unit tests in this file.
Updated by Juliana Fajardini Reichow 12 months ago
Shivani Bhardwaj wrote in #note-3:
There are no unit tests in this file.
I apologize for the confusion this has caused. But... I'm confused.
I see unittests registered (https://github.com/OISF/suricata/blob/master/src/tests/stream-tcp-list.c#L710).
And I see that among those, some are still using return statements (cf https://github.com/OISF/suricata/blob/master/src/tests/stream-tcp-list.c#L575), instead of PASS or FAIL macros. Shouldn't those be converted, too?
Updated by Shivani Bhardwaj 12 months ago
- Status changed from Rejected to Assigned
Updated by Shivani Bhardwaj 12 months ago
Juliana Fajardini Reichow wrote in #note-4:
Shivani Bhardwaj wrote in #note-3:
There are no unit tests in this file.
I apologize for the confusion this has caused. But... I'm confused.
I see unittests registered (https://github.com/OISF/suricata/blob/master/src/tests/stream-tcp-list.c#L710).
Apologies from me, actually. I did not see the "tests" prefix at all.
Liza, please look for the file under tests dir and continue to work on this. Sorry for the confusion created.
And I see that among those, some are still using return statements (cf https://github.com/OISF/suricata/blob/master/src/tests/stream-tcp-list.c#L575), instead of PASS or FAIL macros. Shouldn't those be converted, too?
Updated by Juliana Fajardini Reichow 12 months ago
To be fair, I think the tests in this one mostly follow a structure a bit different, but I do think at least the `return 1` calls in the tests should be converted...
Updated by Liza Opar 12 months ago
I want to run the tests in the src/test/stream-tcp-fike.c file before conversion in order to understand what im working with.
I ran cd src ,cd tests to get /src/tests#
However when i run./src/tests -u -U StreamTcpReassembleTest i get the response "permission denied"
so i tried ./src/tests/stream-tcp-list.c feedback is"nothing can be done for stream-tcp-list.c"
I tried 'make' it didnt work.
Did research and tried:
1- ./scripts/bundle.sh
2- ./autogen.sh
3- ./configure --disable-shared --enable-debug --enable-unittests
4- make doesnt run successfully.
Updated by Juliana Fajardini Reichow 12 months ago
Liza Opar wrote in #note-8:
I want to run the tests in the src/test/stream-tcp-fike.c file before conversion in order to understand what im working with.
I ran cd src ,cd tests to get /src/tests#
However when i run./src/tests -u -U StreamTcpReassembleTest i get the response "permission denied"
so i tried ./src/tests/stream-tcp-list.c feedback is"nothing can be done for stream-tcp-list.c"I tried 'make' it didnt work.
Did research and tried:
1- ./scripts/bundle.sh
2- ./autogen.sh
3- ./configure --disable-shared --enable-debug --enable-unittests
4- make doesnt run successfully.
Hi,
- What do you mean when you say that make doesn't run successfully?
- To run our unit tests, once Suricata is compiled with the right configure flags, you can run
`src/suricata -u` to run all unittests or
`src/suricata -u -U TestName` (or ModuleName) to run a specific test or set of tests.
Does the error for Permission denied say anything else? When sharing info on errors or build failures, it is always best to copy and paste the full output, as that helps others have a better picture of what's going on. ;)
Updated by Juliana Fajardini Reichow 12 months ago
Liza Opar wrote in #note-10:
No it doesnt. It just says permission denied.
Well when i run make i expect output but the message i get is "nothing can be done" I assume thats unsuccessful and im still missing something.
Ill be sure to provide complete error output.
I see. Are you running `make` from the Suricata directory?
All the commands you've listed - autogen, configure, make, and running the tests, should be run from the suricata directory.
Updated by Juliana Fajardini Reichow 11 months ago
- Related to Task #6489: test/stream/tcp-list: fix unittests added
Updated by Juliana Fajardini Reichow 11 months ago
- Label Beginner, Good First Issue, Outreachy added
Updated by Juliana Fajardini Reichow 11 months ago
- Status changed from Assigned to In Review
PR for review: https://github.com/OISF/suricata/pull/9694
Updated by Juliana Fajardini Reichow 9 months ago
- Assignee changed from Liza Opar to Community Ticket
Hi there, according to our guidelines for stale tickets, I'm unassigning this ticket.
Thanks for your interest in our project, and feel free to reach out in case you have time and want to contribute to Suricata again, or if you're still working on this task! :) :)
Refer to:
https://forum.suricata.io/t/important-outreachy-contribution-phase-wrap-up-prs-claimed-tickets-and-more
https://docs.suricata.io/en/latest/devguide/contributing/contribution-process.html#stale-tickets-policy
Updated by Juliana Fajardini Reichow 9 months ago
- Status changed from In Review to In Progress
Updated by Victor Julien 4 months ago
- Target version changed from 8.0.0-beta1 to TBD
Updated by Philippe Antoine about 1 month ago
- Status changed from In Progress to New