Commit Graph

93 Commits (b252b0d84c95d884bdcba27a794f31f8085e65ad)

Author SHA1 Message Date
Eric Leblond 4324805478 coccinelle: add siginit test
Add a test that check an inversion during keyword setup where
we add a sigmatch to a signature and then do error handling on it.
This was causing a double free of some elements and ultimately a
segfault.

Proposed-by: Victor Julien <victor@inliniac.net>
8 years ago
Victor Julien 333f2cb310 drmemory: broader suppressions for hyperscan 9 years ago
Eric Leblond bfa90a64d5 prscript: fix error handling
Last result was used as global result.
9 years ago
Victor Julien 8dc63f625f qa: update drmemory suppressions for hyperscan spm matching 9 years ago
Eric Leblond 50b33ad508 prscript: update logic of sync with master test
Code now get master sha on github and check if it is in current
branch with a git command. It also sync first that the current
local branch is in sync with github corresponding branch.

Signed-off-by: Eric Leblond <eric@regit.org>
9 years ago
Victor Julien 31ed7042b5 hyperscan: add DrMemory suppressions 9 years ago
Victor Julien 0138bf5605 qa: add leak sanitzer suppression 9 years ago
Victor Julien 1c3a0434ca wirefuzz: exit with error code on more issues 9 years ago
Victor Julien 9d49b828a6 wirefuzz: logdir handling improvement 9 years ago
Victor Julien 8626eccf58 wirefuzz: remove obsolete stream mem check 9 years ago
Victor Julien 048e538828 wirefuzz: add -N option to count complete passes 9 years ago
Victor Julien 7299388d05 wirefuzz: improve logfile cleanup 9 years ago
Victor Julien 3d0542405d wirefuzz: enforce -n option per run 9 years ago
Victor Julien 0d77c4d560 wirefuzz: add -S option for exclusive rule load 9 years ago
Victor Julien adbf8bec74 drmemory: suppress magic leak 9 years ago
Andreas Herz b6de1b6567 coccinelle: fix typo for strchrnul 9 years ago
Eric Leblond b85901a6b4 prscript: add rm command
This command removes the container and the image allowing to
free the disk space allocated during the creation.
9 years ago
Eric Leblond 35c1b681ee prscript: docker do not need sudo
Usage is not to run docker command as root but to have the user
in the docker group to be able to run docker commands.
9 years ago
Eric Leblond bcfb3fd5d5 docker: add ASAN to pcaps build 9 years ago
Victor Julien bc2b53f10b parsing: s/strtok/strtok_r/g
Remove all strtok uses and replace them by strtok_r.

Do the same for Windows builds. Cygwin builds fine with strtok_r.

Add strtok to banned function list.
10 years ago
Eric Leblond da98b0b84f coccinelle: update struct flags test 10 years ago
Eric Leblond f7a25f2b24 prscript: rework option logic
Handle cleanly the case where user start docker handling command
without having the dependency installed. The help message does
now say:

```
  -d, --docker          use docker based testing
  -C, --create          create docker container (disabled)
  -s, --start           start docker container (disabled)
  -S, --stop            stop docker container (disabled)

You need to install Python docker module to enable docker container handling
options.
```

And running a disabled options says:

```
$ qa/prscript.py -s
You need to install python docker to use docker handling features.
```
10 years ago
Eric Leblond 0b64b992c9 prscript: fix error message in non local test
Indicate to user that non local test needs a github user.
10 years ago
Eric Leblond 8a0ebc4ade prscript: improve command line
You can now directly access to docker related command:

 qa/prscript.py -C # create container
 qa/prscript.py -s # start container
 qa/prscript.py -S # stop container

The build option does not change:

 qa/prscript.pu -l -d MY_BRANCH # build test of branch MY_BRANCH
10 years ago
Eric Leblond fe45f2a342 prscript: add notification system
If Python pynotify is installed, prscript can now send notification
via the -n flag.
10 years ago
Eric Leblond ef627816cc prscript: improve wordings 10 years ago
Eric Leblond a3c921f0a6 prscript: suppress useless message
No build run faster than 2 seconds.
10 years ago
Eric Leblond fbe5db500c prscript: iterate on builds when checking status
This patch is changing the logic when using docker mode. We are
iterating over each builds so we know when one build is over in
the 5 seconds following the event instead of getting the result
when the builds that are checked before are others.

On OISF's build system, the two builds comes out in order so there
is no problem.
10 years ago
Eric Leblond f12e6fdcda prscript: read buildbot config from source
This patch change the logic of the Docker buildbot system. The
buildbot configuration is now the one available in qa/docker
directory.

This way, developers can test features in docker buildbot that
could require some specific flags to be set. They just need to
edit the buildbot.cfg for instance to enable a new feature.

In the same way, the tested pcap files are the one which are in
the qa/docker/pcaps/ directory. So to test some private ones it is
enough to put them in that directory.

To take into consideration a buildbot.cfg modification or a new
pcap, it is enough to stop and restart the container:

 sudo qa/prscript.py -l -d -S master
 sudo qa/prscript.py -l -d -s master

This patch also fixes the container update issue. A local modification
to the buildbot will be kept. It is also fixing the issue when working
on old code that could possibly not support the same build flag as
the one of buildbot. Here the configuration will remains in sync.
10 years ago
Eric Leblond be473fa712 prscript: add a comment on the SELinux issue 10 years ago
Eric Leblond 1180fc1ac7 prscript: add docker handling support
You can now create the docker image necessary to run a
suricata builbot in docker. To do that you need to have
docker and python-docker installed on the system.

Then you can go to the qa directory.

You need to run once the creattion procedure:
 sudo ./prscript.py  -C -d master  -l
This will create a container named 'suri-buildbot'.

You can start it with:
 sudo ./prscript.py  -s -d master  -l

And stop it with:
 sudo ./prscript.py  -S -d master  -l

To start a test, you can do:
 ./prscript.py -d my_branch -l
10 years ago
Eric Leblond dd6f9a6298 prscript: refactor for docker
With the current work in progress on docker we need to update the
script to handle this case.

This patch adds two options:
 - -d to run in docker mode. In that case the build is started in
 the local dockerized buildbot instance
 - -l to not test the tested branch synchronization with github.

The -l option allows user to run a complete test without publishing
the code on github and without Internet access.
10 years ago
Jason Ish 754ea3d849 prscript - fallback to json is simplejson not available. 10 years ago
Victor Julien 4c73631f95 Suppress ARM valgrind warning
Not Suricata related, so suppress.
10 years ago
Eric Leblond 4b9eecc7f6 prscript: update URL
Buildbot server has been moved to another box.
10 years ago
Eric Leblond d7982fae8c coccinelle: fix problem with coccinelle 1.0rc21
coccinelle 1.0rc21 has a problem with regular expression handling.
This result in a Fatal Error when test system detects an coding
error.

This patch fixes the problem by using a simple blob inside
semantic patch instead of using a regular expression to define
the function.

It also fixes add an optimization on matching suppressing a
useless <.. ..> construction.

Fixes have been suggested by Julia Lawall.
10 years ago
Victor Julien 7ee2aa9c90 Add initial travis-ci integration. 10 years ago
Victor Julien a9282ed7f7 valgrind/magic: add suppression for known issue
Add suppression for Ubuntu 14.04 64bit.
10 years ago
Victor Julien c8d2a1e417 drmemory: remove bug 978 suppression
Bug is fixed, so suppression is no longer needed.

Bug #978.
11 years ago
Victor Julien 385c04164b Updated banned function cocci check
Added: strndup and strchrnul

Both are not supported on OS X 10.6. It's rather old, but it's the
only Mac QA box I have, so for now it'll have to do.
11 years ago
Victor Julien 80456f3e7d Bug 1083 and 1084: add valgrind suppressions
Add suppressions as these are minor issues and likely not bugs in
Suricata.
11 years ago
Victor Julien 84f14438c3 Bug 980: fix HTTP memory cleanup at shutdown
Buffers in per thread HTTP header, client body and server body storage
would be freed based on the usage indicator instead of the size
indicator.

As the usage indicator (e.g. hsbd_buffers_list_len) could be reset
while leaving the memory untouched for later reuse, the free function
would not iterate over all memory blocks.

Removed DrMemory suppressions as well.

Bug #980.
11 years ago
Eric Leblond 55108167e5 prscript: add --norebase option
If --norebase option is provided, the prscript will start a build
that can be used to check if an out-of-sync branch pass the test.
11 years ago
Eric Leblond 7cc87bc02a coccinelle: protecting regexp operator is not needed
It seems there was an evolution of coccinelle and the protection
of regexp is not necessary anymore. And doing it causing the
expression not to match.
11 years ago
Eric Leblond 1fbaebad63 coccinelle: add test on realloc
If we use SCRealloc like:
 x = SCRealloc(x, ...)
then in case of failure we are loosing the original pointer value
and the memory is lost and can not be free.

This test just check for this construction and output an error if
it finds it.
11 years ago
Victor Julien 01c440bf28 Add DrMemory suppression for Bug #980. Suppress useless (likely) buggy leak message too 11 years ago
Victor Julien 1509c9a2e6 Remove DrMemory suppressions for Bug #979, it is fixed. 11 years ago
Eric Leblond 5a7ad5b382 qa: prscript now output pastable line for PR. 11 years ago
Eric Leblond a597237aed coccinelle: fix malloc test
We can have more than an identifier to be assigned the result of
a malloc function.
11 years ago
Eric Leblond 6378db89f6 coccinelle: add option to continue on errors
When a script has been updated or introduced, it is interesting to
detect all errors at once. With this patch it is now possible to
do so by using:
   NOT_TERMINAL=1 CONCURRENCY_LEVEL=12  qa/coccinelle/run_check.sh
11 years ago