[CRIU] zdtm ns flavour test for rtc fails for arm64

Vijay Kilari vijay.kilari at gmail.com
Tue Dec 29 23:30:44 PST 2015


Hi Andrew,

 With latest criu master branch, rtc test cases are passing.

The following test cases are failing.

1)  netns fails with /bin/diff. However diff is find in /usr/bin/diff.
If I give soft link to /usr/bin/diff, the test case passes.

======================= Run zdtm/live/static/netns in ns =======================
### Test zdtm/live/static/netns FAIL at Deps check (/bin/diff doesn't exist) ###
##################################### FAIL #####################################

2) Similar to above,libzt_standard.so is located in /lib/xtables/

===================== Run zdtm/live/static/netns-nf in ns ======================
 Test zdtm/live/static/netns-nf FAIL at Deps check
(/usr/lib64/xtables/libxt_standard.so doesn't exist)
##################################### FAIL #####################################

3) sigalstack test case fails as below.

ubuntu at ubuntu:~/criu/criu$ sudo test/zdtm.py run -t zdtm/live/static/sigaltstack
=== Run 1/1 ================

==================== Run zdtm/live/static/sigaltstack in h =====================
cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0  -iquote
../../lib/arch/aarch64/include -I../../lib   sigaltstack.c
../../lib/libzdtmtst.a  -pthread -o sigaltstack
Start test
./sigaltstack --pidfile=sigaltstack.pid --outfile=sigaltstack.out
Run criu dump
Run criu restore
Wait for zdtm/live/static/sigaltstack to die for 0.100000
Wait for zdtm/live/static/sigaltstack to die for 0.200000
Wait for zdtm/live/static/sigaltstack to die for 0.400000
tail: cannot open ‘zdtm/live/static/sigaltstack.out’ for reading: No
such file or directory
############ Test zdtm/live/static/sigaltstack FAIL at result check ############
##################################### FAIL #####################################
ubuntu at ubuntu:~/criu/criu$ cat test/zdtm/live/static/sigaltstack.out.inprogress
07:18:06.434:    79:        thread in sas: at 0x418bf0 (size   0x2000 flags 0x1)
07:18:06.434:    79: Waiting in thread SAS
07:18:07.036:    79: Thread may leave SAS
ubuntu at ubuntu:~/criu/criu$

If sigaltstack() for main process is removed, it works.

@@ -130,12 +129,12 @@ int main(int argc, char *argv[])
                pr_perror("Can't create thread");
                exit(-1);
        }
-
+#if 0
        if (sigaltstack(&sas_state[SAS_MAIN_OLD], NULL)) {
                pr_perror("sigaltstack");
                exit(-1);
        }
-
+#endif
        task_waiter_complete(&t, 1);

OR

With the below changes, just removing print (show_ss) call from
signal handler of main process also works.

diff --git a/test/zdtm/live/static/sigaltstack.c
b/test/zdtm/live/static/sigaltstack.c
index d84c35c..afe23fa 100644
--- a/test/zdtm/live/static/sigaltstack.c
+++ b/test/zdtm/live/static/sigaltstack.c
@@ -97,8 +97,7 @@ void leader_sigaction(int signo, siginfo_t *info,
void *context)
 {
        if (sigaltstack(NULL, &sas_state[SAS_MAIN_NEW]))
                pr_perror("leader sigaltstack");
-
-       show_ss("leader in sas", &sas_state[SAS_MAIN_NEW]);
+       //show_ss("leader in sas", &sas_state[SAS_MAIN_NEW]);
 }

 int main(int argc, char *argv[])


Regards
Vijay

On Tue, Dec 29, 2015 at 4:53 PM, Andrew Vagin <avagin at virtuozzo.com> wrote:
> On Tue, Dec 29, 2015 at 12:09:21PM +0530, Vijay Kilari wrote:
>> Hi,
>>
>>  zdtm test for rtc passes with below log for host flavour.
>> However for ns (namespace) flavour it fails (log below).
>> Any idea?
>
> Which version of CRIU do you use?
>
> I fixed this issue by these commits:
> https://github.com/xemul/criu/commit/b6d9bcd10d576ca9e5a60be2b8218c35edcd5931
> https://github.com/xemul/criu/commit/64744030f29f138d879b46de278f6cf9ea629b9e
>
> FYI: zdtm.sh is deprecated. Now we recomend to use zdtm.py.
>
> For example, if you want to execute all test:
> ./test/zdtm.py run -a
>
> or if you want to execute only one test
> ./test/zdtm.py run -t zdtm/live/static/rtc
>
> Now "make test" uses zdtm.py to run tests too:
> https://github.com/xemul/criu/commit/cba08fb788f48e3d8e43abb5d24426691b25a57d
>
> Thanks,
> Andrew.
>
>>
>> ----------------------------------------------------------
>> Test: zdtm/live/static/chroot-file, Result: PASS
>> Execute static/rtc
>> ./rtc --pidfile=rtc.pid --outfile=rtc.out
>> Dump 33673
>> Restore
>> Check results 33673
>> Waiting...
>> Waiting...
>> Waiting...
>> Waiting...
>> Waiting...
>> Waiting...
>> Waiting...
>> 06:16:19.052: 33673: ERR: rtc.c:51: delta = 453242 (errno = 2 (No such
>> file or directory))
>> 06:16:21.704: 33673: PASS
>> Test: zdtm/live/static/rtc, Result: PASS
>>
>> ==============================================================================
>> Execute ns/static/rtc
>> mkdir: cannot create directory ‘/tmp/criu-root.sG3zM4/dev’: File exists
>> mkdir: cannot create directory ‘/tmp/criu-root.sG3zM4/dev/pts’: File exists
>> mknod: ‘/tmp/criu-root.sG3zM4/dev/tty’: File exists
>> mknod: ‘/tmp/criu-root.sG3zM4/dev/null’: File exists
>> mkdir: cannot create directory ‘/tmp/criu-root.sG3zM4/dev/net/’: File exists
>> mknod: missing operand after ‘0xc8’
>> Try 'mknod --help' for more information.
>> mknod: missing operand after ‘0x0’
>> Try 'mknod --help' for more information.
>> mkdir: cannot create directory ‘/tmp/criu-root.sG3zM4/proc’: File exists
>> ./rtc --pidfile=rtc.pid --outfile=rtc.out
>> The test failed (0, 1)
>> Makefile:261: recipe for target 'rtc.pid' failed
>> make: *** [rtc.pid] Error 1
>> ERROR: fail to start /home/ubuntu/criu/criu-1.8/test/zdtm/live/static/rtc
>> Test: zdtm/live/static/rtc, Result: FAIL
>> ==================================== ERROR ====================================
>> Test: zdtm/live/static/rtc, Namespace: 1
>> Output file: /tmp/criu-root.sG3zM4/zdtm/live/static/rtc.out
>> ------------------------------------------------------------------------------
>> 06:23:00.551:     5: ERR: rtc.c:26: open (errno = 2 (No such file or directory))
>> 06:23:00.551:     4: ERR: test.c:195: Test exited unexpectedly with code 1
>> The test returned non-zero code 256
>>   PID   SID COMMAND
>>     1     1 rtc
>>     6     1 ps
>> waitpid() failed: No child processes
>> ------------------------------------- END -------------------------------------
>> ================================= ERROR OVER =================================
>>
>> Regards
>> Vijay
>>
>> _______________________________________________
>> CRIU mailing list
>> CRIU at openvz.org
>> https://lists.openvz.org/mailman/listinfo/criu



More information about the CRIU mailing list