That way it actually fits with what the condition checks for.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
if (max < max_unauth) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
- _("The overall maximum number of clients must be "
- "greater than the maximum number of clients waiting "
- "for authentication"));
+ _("The overall maximum number of clients waiting "
+ "for authentication must not be less than the overall "
+ "maximum number of clients"));
return -1;
}
--- /dev/null
+{
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 5,
+ "max_anonymous_clients": 10,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 5,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ }
+ ],
+ "clients": [
+ ]
+ }
+ }
+}
--- /dev/null
+internal error: The overall maximum number of clients must not be less than the number of clients waiting for authentication
EXEC_RESTART_TEST_FAIL("anon-clients", 2);
EXEC_RESTART_TEST("client-auth-pending", 1);
EXEC_RESTART_TEST_FAIL("client-auth-pending-failure", 1);
+ EXEC_RESTART_TEST_FAIL("invalid-max-clients-failure", 1);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}