stress-tests.c revision 1bbaf1a7cfde76bd81cab964c2eb9c91c6d8feba
1N/A Copyright (C) Jakub Hrozek <jhrozek@redhat.com> 2009 1N/A This program is free software; you can redistribute it and/or modify 1N/A it under the terms of the GNU General Public License as published by 1N/A the Free Software Foundation; either version 3 of the License, or 1N/A (at your option) any later version. 1N/A This program is distributed in the hope that it will be useful, 1N/A but WITHOUT ANY WARRANTY; without even the implied warranty of 1N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1N/A GNU General Public License for more details. 1N/A You should have received a copy of the GNU General Public License 1N/A/* How many tests failed */ 1N/A * Look up one user. If the user is not found using getpwnam, the success 1N/A * or failure depends on enoent_fail being set. 1N/A "getpwnam failed (name: %s): errno = %d, error = %s\n",
1N/A * Look up one group. If the user is not found using getgrnam, the success 1N/A * or failure depends on enoent_fail being set. 1N/A "getgrnam failed (name %s): errno = %d, error = %s\n",
1N/A * Beware, has side-effects: changes global variable failure_count 1N/A "A child exited with error code %d\n",
if ((n++ %
CHUNK) == 0) {
"Lookup in groups instead of users" },
"The username prefix",
NULL },
"Start value to append to prefix",
NULL },
"End value to append to prefix",
NULL },
"Fail on not getting the requested NSS data (default: No)",
/* Reap the children in a handler asynchronously so we can * somehow protect against too many processes */ /* Fire up the child processes */ /* Try again in hope that some child has exited */ /* Process the rest of the children here in main */ "A child exited with error code %d\n",
"Total tests run: %d\nPassed: %d\nFailed: %d\n",