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

test/secure: don't use the shell_job option

It's required to execute the test in Jenkins.
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Acked-by: 's avatarRuslan Kuprieiev <rkuprieiev@cloudlinux.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 61c1936e
#!/bin/bash
echo $$
echo $$ > $1.int
mv $1.int $1
if [ "$1" == "--chgrp" ]; then
if [ "$2" == "--chgrp" ]; then
grps=( $(groups) )
newgrp ${grps[1]}
newgrp ${grps[2]}
fi
while :; do
......
......@@ -6,20 +6,23 @@ function run_as {
echo "== Run ${LOOP} as $1"
echo ${PIDFILE}
rm -f ${PIDFILE}
su $1 -c "${LOOP} $2 < /dev/null 2> /dev/null > ${PIDFILE} &"
su $1 -c "setsid ${LOOP} ${PIDFILE} $2 < /dev/null &> /dev/null &"
for i in `seq 100`; do
test -f ${PIDFILE} && break
done
PID=`cat ${PIDFILE}`
echo ${PID}
}
function dump_as {
echo "== Dump ${PID} as $@"
su $@ -c "${CRIU} dump --tree ${PID} --images-dir ${IMGS} --shell-job"
su $@ -c "${CRIU} dump --tree ${PID} --images-dir ${IMGS}"
return $?
}
function rstr_as {
echo "== Restore ${IMGS} as $@"
su $@ -c "${CRIU} restore --images-dir ${IMGS} --shell-job --restore-detached"
su $@ -c "${CRIU} restore --images-dir ${IMGS} --restore-detached"
return $?
}
......
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