mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 07:45:17 +00:00
zdtm: Add vDSO test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
@@ -17,6 +17,7 @@ $ZP/static/write_read01
|
|||||||
$ZP/static/write_read02
|
$ZP/static/write_read02
|
||||||
$ZP/static/wait00
|
$ZP/static/wait00
|
||||||
$ZP/static/pthread00
|
$ZP/static/pthread00
|
||||||
|
$ZP/static/vdso00
|
||||||
$ZP/static/file_shared
|
$ZP/static/file_shared
|
||||||
$ZP/streaming/pipe_loop00
|
$ZP/streaming/pipe_loop00
|
||||||
$ZP/streaming/pipe_shared00
|
$ZP/streaming/pipe_shared00
|
||||||
|
@@ -25,6 +25,7 @@ TST_NOFILE = \
|
|||||||
ptrace_sig \
|
ptrace_sig \
|
||||||
pipe00 \
|
pipe00 \
|
||||||
pthread00 \
|
pthread00 \
|
||||||
|
vdso00 \
|
||||||
# jobctl00 \
|
# jobctl00 \
|
||||||
|
|
||||||
TST_FILE = \
|
TST_FILE = \
|
||||||
|
34
test/zdtm/live/static/vdso00.c
Normal file
34
test/zdtm/live/static/vdso00.c
Normal 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;
|
||||||
|
}
|
Reference in New Issue
Block a user