2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

zdtm: Add vDSO test

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
Cyrill Gorcunov
2012-01-17 02:41:57 +04:00
parent 139a2ee27b
commit 5eda66dd6d
3 changed files with 36 additions and 0 deletions

View File

@@ -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

View File

@@ -25,6 +25,7 @@ TST_NOFILE = \
ptrace_sig \
pipe00 \
pthread00 \
vdso00 \
# jobctl00 \
TST_FILE = \

View File

@@ -0,0 +1,34 @@
#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;
}