Commit fafdfb47 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

faul-inject: Check a case when parasite can't initialize a command socket

Give a fake address for a server socket.
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 6e89dbbf
......@@ -8,6 +8,7 @@ enum faults {
FI_RESTORE_ROOT_ONLY,
FI_DUMP_PAGES,
FI_RESTORE_OPEN_LINK_REMAP,
FI_PARASITE_CONNECT,
/* not fatal */
FI_CHECK_OPEN_HANDLE = 128,
FI_NO_MEMFD = 129,
......
......@@ -468,6 +468,10 @@ static int prepare_tsock(struct parasite_ctl *ctl, pid_t pid,
}
}
/* Check a case when parasite can't initialize a command socket */
if (fault_injected(FI_PARASITE_CONNECT))
args->h_addr_len = gen_parasite_saddr(&args->h_addr, getpid() + 1);
/*
* Set to -1 to prevent any accidental misuse. The
* only valid user of it is accept_tsock().
......
......@@ -12,3 +12,5 @@ prep
./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
./test/zdtm.py run -t zdtm/static/env00 --fault 5 --keep-going --report report || fail
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