Skip to content

Commit

Permalink
test/vdso: check the code path when here is no API to map vDSO
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Vagin <avagin@gmail.com>
  • Loading branch information
avagin committed Feb 16, 2020
1 parent 56258da commit f1714cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions criu/crtools.c
Expand Up @@ -176,6 +176,9 @@ int main(int argc, char *argv[], char *envp[])
if (kerndat_init())
return 1;

if (fault_injected(FI_CANNOT_MAP_VDSO))
kdat.can_map_vdso = 0;

if (opts.deprecated_ok)
pr_debug("DEPRECATED ON\n");

Expand Down
1 change: 1 addition & 0 deletions criu/include/fault-injection.h
Expand Up @@ -17,6 +17,7 @@ enum faults {
FI_NO_BREAKPOINTS = 130,
FI_PARTIAL_PAGES = 131,
FI_HUGE_ANON_SHMEM_ID = 132,
FI_CANNOT_MAP_VDSO = 133,
FI_MAX,
};

Expand Down
5 changes: 5 additions & 0 deletions test/jenkins/criu-fault.sh
Expand Up @@ -12,6 +12,10 @@ prep
./test/zdtm.py run -t zdtm/static/vdso01 --fault 127 || fail
./test/zdtm.py run -t zdtm/static/vdso-proxy --fault 127 --iters 3 || fail

if [ "${COMPAT_TEST}" != "y" ] ; then
./test/zdtm.py run -t zdtm/static/vdso01 --fault 133 -f h || fail
fi

./test/zdtm.py run -t zdtm/static/mntns_ghost --fault 2 --keep-going --report report || fail
./test/zdtm.py run -t zdtm/static/mntns_ghost --fault 4 --keep-going --report report || fail

Expand All @@ -23,3 +27,4 @@ prep
./test/zdtm.py run -t zdtm/static/maps04 --fault 131 --keep-going --report report --pre 2:1 || fail
./test/zdtm.py run -t zdtm/transition/maps008 --fault 131 --keep-going --report report --pre 2:1 || fail
./test/zdtm.py run -t zdtm/static/maps01 --fault 132 -f h || fail

0 comments on commit f1714cc

Please sign in to comment.