--- /dev/null
+Test that Suricata will write 2 lz4 compress pcap files.
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - pcap-log:
+ enabled: yes
+ filename: log.pcap
+ compression: lz4
+ mode: normal
+ limit: 4mb
+ ts-format: usec
+
+# Enable enging logging to JSON so we can verify it.
+logging:
+ outputs:
+ - console:
+ enabled: yes
+ - file:
+ enabled: yes
+ level: perf
+ filename: eve.json
+ type: json
--- /dev/null
+requires:
+ features:
+ - liblz4
+ min-version: 8
+
+pcap: ../bug-2482-01/proxyCONNECT_443.pcap
+
+args:
+ - --runmode=single
+
+checks:
+ - shell:
+ args: ls -l log.pcap.15233891*.lz4 | wc -l | xargs
+ expect: 2
--- /dev/null
+Test that Suricata will write 2 lz4 compress pcap files in multi mode.
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - pcap-log:
+ enabled: yes
+ filename: log.pcap.%n-%t
+ compression: lz4
+ mode: multi
+ limit: 4mb
+ ts-format: usec
+
+# Enable enging logging to JSON so we can verify it.
+logging:
+ outputs:
+ - console:
+ enabled: yes
+ - file:
+ enabled: yes
+ level: perf
+ filename: eve.json
+ type: json
--- /dev/null
+requires:
+ features:
+ - liblz4
+ min-version: 8
+
+pcap: ../bug-2482-01/proxyCONNECT_443.pcap
+
+args:
+ - --runmode=single
+
+checks:
+ - shell:
+ args: ls -l log.pcap.1-15233891*.lz4 | wc -l | xargs
+ expect: 2
--- /dev/null
+Test that Suricata will write 1 lz4 compressed pcap files in multi mode, as ring setting (max-files) is 1.
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - pcap-log:
+ enabled: yes
+ filename: log.pcap.%n-%t
+ compression: lz4
+ mode: multi
+ limit: 4mb
+ ts-format: usec
+ max-files: 1
+ lz4-checksum: yes
+ lz4-level: 16
+
+# Enable enging logging to JSON so we can verify it.
+logging:
+ outputs:
+ - console:
+ enabled: yes
+ - file:
+ enabled: yes
+ level: perf
+ filename: eve.json
+ type: json
--- /dev/null
+requires:
+ features:
+ - liblz4
+ min-version: 8
+
+pcap: ../bug-2482-01/proxyCONNECT_443.pcap
+
+args:
+ - --runmode=single
+
+checks:
+ - shell:
+ args: ls -l log.pcap.1-15233891*.lz4 | wc -l | xargs
+ expect: 1
--- /dev/null
+Test that Suricata will write 1 lz4 compressed pcap files in multi mode, as ring setting (max-files) is 1.
+
+Enable pcap logging profiling.
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - pcap-log:
+ enabled: yes
+ filename: log.pcap.%n-%t
+ compression: lz4
+ mode: multi
+ limit: 4mb
+ ts-format: usec
+ max-files: 1
+ lz4-checksum: yes
+ lz4-level: 16
+
+# Enable enging logging to JSON so we can verify it.
+logging:
+ outputs:
+ - console:
+ enabled: yes
+ - file:
+ enabled: yes
+ level: perf
+ filename: eve.json
+ type: json
+
+profiling:
+ pcap-log:
+ enabled: yes
+ filename: pcap-stats.log
--- /dev/null
+requires:
+ features:
+ - liblz4
+ min-version: 8
+
+pcap: ../bug-2482-01/proxyCONNECT_443.pcap
+
+args:
+ - --runmode=single
+
+checks:
+ - shell:
+ args: ls -l log.pcap.1-15233891*.lz4 | wc -l | xargs
+ expect: 1
+ - shell:
+ args: cat pcap-stats.log | grep -E 'open[[:space:]]+2' | wc -l | xargs
+ expect: 1
--- /dev/null
+Test that Suricata will write 1 compress pcap file for tunnel packets.
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - pcap-log:
+ enabled: yes
+ filename: log.pcap
+ compression: lz4
+ mode: normal
+ limit: 4mb
+ ts-format: usec
+
+# Enable enging logging to JSON so we can verify it.
+logging:
+ outputs:
+ - console:
+ enabled: yes
+ - file:
+ enabled: yes
+ level: perf
+ filename: eve.json
+ type: json
--- /dev/null
+requires:
+ features:
+ - liblz4
+ min-version: 8
+
+pcap: ../vxlan-decoder-01/input.pcap
+
+args:
+ - --runmode=single
+
+checks:
+ - shell:
+ args: ls -l log.pcap.1525778007.671337.lz4 | wc -l | xargs
+ expect: 1