Commit 5eda66dd authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

zdtm: Add vDSO test

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 139a2ee2
......@@ -17,6 +17,7 @@ $ZP/static/write_read01
$ZP/static/write_read02
$ZP/static/wait00
$ZP/static/pthread00
$ZP/static/vdso00
$ZP/static/file_shared
$ZP/streaming/pipe_loop00
$ZP/streaming/pipe_shared00
......
......@@ -25,6 +25,7 @@ TST_NOFILE = \
ptrace_sig \
pipe00 \
pthread00 \
vdso00 \
# jobctl00 \
TST_FILE = \
......
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include "zdtmtst.h"
const char *test_doc = "Check if we can use vDSO after restore\n";
const char *test_author = "Cyrill Gorcunov <gorcunov@openvz.org";
int main(int argc, char *argv[])
{
struct timeval tv;
struct timezone tz;
test_init(argc, argv);
test_msg("%s pid %d\n", argv[0], getpid());
gettimeofday(&tv, &tz);
test_msg("%d time: %10li\n", getpid(), tv.tv_sec);
test_daemon();
test_waitsig();
/* this call will fail if vDSO is corrupted */
gettimeofday(&tv, &tz);
test_msg("%d time: %10li\n", getpid(), tv.tv_sec);
pass();
return 0;
}
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