Commit 9e3befe0 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

check: Add test for /proc/pid/stat extension

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent aca2c976
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <fcntl.h>
#include "proc_parse.h"
#include "sockets.h"
#include "crtools.h"
#include "log.h"
......@@ -119,6 +121,20 @@ static int check_fcntl(void)
return 0;
}
static int check_proc_stat(void)
{
struct proc_pid_stat stat;
int ret;
ret = parse_pid_stat(getpid(), &stat);
if (ret) {
pr_msg("procfs: stat extension is not supported\n");
return -1;
}
return 0;
}
int cr_check(void)
{
int ret = 0;
......@@ -130,6 +146,7 @@ int cr_check(void)
ret |= check_kcmp();
ret |= check_prctl();
ret |= check_fcntl();
ret |= check_proc_stat();
if (!ret)
pr_msg("Looks good.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment