[OISF/outreachy] Introducing myself
Shivani Bhardwaj
sbhardwaj at openinfosecfoundation.org
Fri Oct 9 08:47:17 UTC 2020
Hi, Janani!
On Fri, Oct 9, 2020 at 12:47 PM Janani Ramjee <janani6472 at gmail.com> wrote:
>
> Hello,
> It would be very helpful if any website or study material is suggested to know more about the conversion of unittest to new FAIL/PASS API.
We do not have any elaborate documentation about this since it is not
a user feature and we recently introduced devguides. But, to give you
an idea, A lot of tests were written initially just like any other
methods, there were multiple conditionals for failure (return 0) and
one pass condition (return 1) e.g.
https://github.com/OISF/suricata/blob/master/src/detect-mark.c#L259.
While there was nothing wrong with this approach, we found it would be
much cleaner if we used conditional macros that clearly say whether
the test "fails" or "passes" on a certain condition. So, we introduced
a lot of well defined macros (see
https://github.com/OISF/suricata/blob/master/src/util-unittest.h) to
make the tests more legible and clear.
As you can see, there are macros for almost all failing conditionals
e.g., fail if something is null, fail if something exists (>0), etc.
There are also macros PASS and PASS_IF which mean all the conditionals
were met properly and the test has passed.
Your job as a part of this task is to remove the old style of tests
i.e. returning values on failure/passing conditionals and use this
FAIL/PASS API instead. One good example could be
https://github.com/OISF/suricata/commit/3cf8b4629f2cf523c3f82604d93b8fd4a0888109.
If you look closely, all the conditionals are converted to the
FAIL/PASS API in a manner that there is NO memory leak on the success
path (PASS). It is OK to have memleaks on failure paths.
There is some relevant information about these FAIL/PASS conversion
issues on their parent issue as well. Please check that out too.
Let me know if this helps you understand the task.
> Thank you
> Janani
>
>
>
> On Thu, Oct 8, 2020 at 12:14 PM Shivani Bhardwaj <sbhardwaj at openinfosecfoundation.org> wrote:
>>
>> Hi, Janani!
>>
>> On Thu, Oct 8, 2020 at 11:42 AM Janani Ramjee via Outreachy
>> <outreachy at lists.openinfosecfoundation.org> wrote:
>> >
>> > Hello,
>> > While installing Suricata on Ubuntu via git, the git clone statement
>> >
>> > git clone git at github.com:OISF/suricata.git
>> >
>> This requires your SSH keys to be set up on your GitHub account. This
>> is a preferred way of setting the repository. You can find how to do
>> it here: https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh
>>
>> > gives an error saying that the repository isn't public
>> > Error:
>> > Cloning into 'suricata'...
>> > git at github.com: Permission denied (publickey).
>> > fatal: Could not read from remote repository.
>> >
>> > Please make sure you have the correct access rights
>> >
>> > Please guide me on how to correct this.
>> > I followed the steps from the guide given in the outreachy projects page : https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Ubuntu_Installation_from_GIT
>> >
>> > Thanks
>> > Janani
>> >
>> > On Thu, Oct 8, 2020 at 1:18 AM Janani Ramjee <janani6472 at gmail.com> wrote:
>> >>
>> >> Hi Jason,
>> >> It worked after I logged out and logged in again!
>> >> Thank you,
>> >> Janani
>> >>
>> >> On Thu, Oct 8, 2020, 1:11 AM Jason Ish via Outreachy <outreachy at lists.openinfosecfoundation.org> wrote:
>> >>>
>> >>> Hi Janani,
>> >>>
>> >>> Could you please try again. You might need to reload the page. Failing
>> >>> that, logout and back in again and please report back if you still can't
>> >>> assign the issue to yourself.
>> >>>
>> >>> Thanks,
>> >>> Jason
>> >>>
>> >>> On 2020-10-07 1:35 p.m., Janani Ramjee via Outreachy wrote:
>> >>> > Hi Shivani,
>> >>> > When I click on the edit button which is on the right of the Task#
>> >>> > heading, I have a notes pane getting opened and I am not able to locate
>> >>> > the drop down box near the assignee.
>> >>> > I am logged in.
>> >>> > Please help me on the same.
>> >>> > Thank you
>> >>> > Regards
>> >>> > Janani
>> >>> >
>> >>> > On Thu, Oct 8, 2020, 12:50 AM Shivani Bhardwaj
>> >>> > <sbhardwaj at openinfosecfoundation.org
>> >>> > <mailto:sbhardwaj at openinfosecfoundation.org>> wrote:
>> >>> >
>> >>> > Hi, Janani!
>> >>> >
>> >>> > On Thu, Oct 8, 2020 at 12:41 AM Janani Ramjee <janani6472 at gmail.com
>> >>> > <mailto:janani6472 at gmail.com>> wrote:
>> >>> > >
>> >>> > > Hello ma'am,
>> >>> > Please use people's names to address them. :)
>> >>> >
>> >>> > > Can you please guide me on how to assign the ticket to myself on
>> >>> > Redmine?
>> >>> >
>> >>> > Yes, sure.
>> >>> > - Make an account.
>> >>> > - Go to the ticket you're interested in.
>> >>> > - Click on "Edit" (on the right side of the issue number heading).
>> >>> >
>> >>> > Make sure you're logged in else you might not see that.
>> >>> > - On the "Assignee" field, there shall be a drop down now. Look for
>> >>> > your name.
>> >>> > - Click on "Submit" on the bottom after setting the assignee to
>> >>> > yourself.
>> >>> >
>> >>> > Also, please make sure to "Reply All" on the emails in future. Your
>> >>> > query might also help others figure the same things out.
>> >>> >
>> >>> > --
>> >>> > Shivani
>> >>> > Junior Developer, OISF
>> >>> >
>> >>> >
>> >>> > _______________________________________________
>> >>> > Outreachy mailing list
>> >>> > Outreachy at lists.openinfosecfoundation.org
>> >>> > https://lists.openinfosecfoundation.org/listinfo/outreachy
>> >>> >
>> >>> _______________________________________________
>> >>> Outreachy mailing list
>> >>> Outreachy at lists.openinfosecfoundation.org
>> >>> https://lists.openinfosecfoundation.org/listinfo/outreachy
>> >
>> > _______________________________________________
>> > Outreachy mailing list
>> > Outreachy at lists.openinfosecfoundation.org
>> > https://lists.openinfosecfoundation.org/listinfo/outreachy
>>
>>
>>
>> --
>> Shivani
>> Junior Developer, OISF
--
Shivani
Junior Developer, OISF
More information about the Outreachy
mailing list