Re: Compile with —enable-coverage

Woot4moo <[email protected]>
Newsgroups gmane.comp.security.detection.bro
Message-ID <CALiK30_Gwkzh5sOvvZqJFWzVduSfyMHXuqf47y7R0dyvw1x-3g@mail.gmail.com>
Appreciate the help on this. I think I need to slightly modify the script
to only evaluate my custom .bro / .zeek files. Which seem to be properly
reporting out some lines as being executed.

Before I go down this path, is there some parameter I should pass instead
to only scan my script directory? For example:

/home
    -bro
    -my_scripts
       - - .tmp/script-coverage

On Tue, May 14, 2019 at 8:21 PM Woot4moo <[email protected]> wrote:

> Thanks for those details. I will execute these steps in the morning and
> follow up with additional questions.
>
> On Tue, May 14, 2019 at 8:07 PM Jon Siwek <[email protected]> wrote:
>
>> On Tue, May 14, 2019 at 1:41 PM Woot4moo <[email protected]> wrote:
>>
>> > https://github.com/zeek/zeek/blob/master/testing/coverage/README
>> >
>> > My understanding is that this is a way to check Zeek scripts (not the
>> C++ source) to check coverage. Is my understanding correct?
>>
>> That's C++ coverage, not Zeek script coverage.
>>
>> Getting Zeek script coverage is a two step process:
>>
>> 1) Run bro with the BRO_PROFILER_FILE environment variable set to a
>> file path, adding 'X' characters to the file name cause them to be
>> randomized (in case you are running bro multiple times and need to
>> aggregate coverage across runs).  Here's how we set this in our unit
>> test suite:
>>
>>
>> https://github.com/zeek/zeek/blob/6ad7099f7e4828cff893c13fe32855f947487258/testing/btest/btest.cfg#L24
>>
>> Those files simply track how many times a given statement was executed.
>>
>> 2) Run a script over the results in step (1) to aggregate and
>> calculate coverage.
>>
>> Here is the script we run for our test suite coverage calculation:
>>
>>
>> https://github.com/zeek/zeek/blob/6ad7099f7e4828cff893c13fe32855f947487258/testing/scripts/coverage-calc
>>
>> And how it is invoked:
>>
>>
>> https://github.com/zeek/zeek/blob/6ad7099f7e4828cff893c13fe32855f947487258/testing/btest/Makefile#L18-L19
>>
>> - Jon
>>
>

_______________________________________________
Zeek mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/zeek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.