test-process-util.c revision 75f86906c52735c98dc0aa7e24b773edb42ee814
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
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 <unistd.h>
#include "process-util.h"
#include "log.h"
#include "util.h"
#include "macro.h"
#include "virt.h"
#include "terminal-util.h"
static void test_get_process_comm(void) {
_cleanup_free_ char *a = NULL, *c = NULL, *d = NULL, *f = NULL, *i = NULL, *cwd = NULL, *root = NULL;
pid_t e;
uid_t u;
gid_t g;
dev_t h;
int r;
log_info("pid1 comm: '%s'", a);
} else
log_warning("/proc/1/comm does not exist.");
log_info("pid1 cmdline: '%s'", c);
log_info("pid1 cmdline truncated: '%s'", d);
assert_se(e == 0);
r = get_process_exe(1, &f);
assert_se(u == 0);
assert_se(g == 0);
if (!detect_container())
}
static void test_pid_is_unwaited(void) {
if (pid == 0) {
} else {
int status;
}
}
static void test_pid_is_alive(void) {
if (pid == 0) {
} else {
int status;
}
}
log_open();
return 0;
}