test-sched-prio.c revision 1d31abf7920460f3c9bb9744a255e0e518dce00d
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2012 Holger Hans Peter Freyther
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <sched.h>
#include "macro.h"
#include "manager.h"
#include "test-helper.h"
int r;
/* prepare the test */
r = manager_new(MANAGER_USER, true, &m);
if (MANAGER_SKIP_TEST(r)) {
return EXIT_TEST_SKIP;
}
assert_se(r >= 0);
/* load idle ok */
/*
* load idle bad. This should print a warning but we have no way to look at it.
*/
/*
* load rr ok.
* Test that the default priority is moving from 0 to 1.
*/
/*
* load rr bad.
* Test that the value of 0 and 100 is ignored.
*/
/*
* load rr change.
* Test that anything between 1 and 99 can be set.
*/
manager_free(m);
return EXIT_SUCCESS;
}