]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/test: update test for file prune changes
authorJason Ish <jason.ish@oisf.net>
Tue, 8 Oct 2019 16:23:08 +0000 (10:23 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 8 Oct 2019 18:30:49 +0000 (20:30 +0200)
As the file prune is now moved to the flow worker, the file
prune is run later, meaning the first file has not yet
been pruned from the file container list.

Adjust test to look for a second file, and check the
flags on that file.

For commit addressing bug 2490.

src/detect-engine-state.c

index 000936f7fd7cc922c988720368107512435b7c4f..2f2c2b4c414f97afcfbe66428e7c6e9c02a02bdb 100644 (file)
@@ -1107,6 +1107,8 @@ static int DeStateSigTest08(void)
     FAIL_IF_NULL(files);
     file = files->head;
     FAIL_IF_NULL(file);
+    file = file->next;
+    FAIL_IF_NULL(file);
     FAIL_IF_NOT(file->flags & FILE_STORE);
 
     AppLayerParserThreadCtxFree(alp_tctx);