tests include:
- non-existent user
- NULL user (empty user string)
--- /dev/null
+# Test Description
+
+Test to make sure Suricata handles well non-existent user as an input
+in the user field.
+
+## Related Issue
+
+https://redmine.openinfosecfoundation.org/issues/6278
--- /dev/null
+%YAML 1.1
+---
+
+run-as:
+ user: totally-not-existing-user
--- /dev/null
+requires:
+ min-version: 6
+
+pcap: false
+exit-code: 1
+args:
+ - --engine-analysis
+
+checks:
+ - shell:
+ args: grep -c 'unable to get the user ID, check if user exist!!' stderr
+ expect: 1
--- /dev/null
+# Test Description
+
+Test to make sure Suricata handles well null input in the user field.
+
+## Related Issue
+
+https://redmine.openinfosecfoundation.org/issues/6278
--- /dev/null
+%YAML 1.1
+---
+
+run-as:
+ user: # null user
+ group:
--- /dev/null
+requires:
+ min-version: 6
+
+pcap: false
+exit-code: 1
+args:
+ - --engine-analysis
+
+checks:
+ - shell:
+ args: grep -c 'no user name was provided - ensure it is specified either in the configuration file (run-as.user) or in command-line arguments (--user)' stderr
+ expect: 1
+ min-version: 7
+ - shell:
+ args: grep -c 'unable to get the user ID, check if user exist!!' stderr
+ expect: 1
+ version: 6