[CRIU] zdtm cwd test acts strangly

Ruslan Kuprieiev kupruser at gmail.com
Mon Dec 8 03:04:57 PST 2014


On 12/08/2014 12:43 PM, Andrew Vagin wrote:
> On Fri, Dec 05, 2014 at 07:35:54PM +0200, Ruslan Kuprieiev wrote:
>> Hi!
>>
>> I'm trying to run zdtm tests from tty(on master, without my vt patches)
>> and I'm observing strange behavior that I can't explain.
>>
>> If I run make test from pty, all tests are succeeding.
>>
>> If I run make test from tty, cwd* tests fail. For example cwd00:
>> ➜  static git:(master) ✗ cat cwd00.out.inprogress
>> 19:03:15.164: 30429: PASS
>> 19:03:15.164: 30429: ERR: cwd00.c:56: can't change directory to
>> /root/git/criu/test/zdtm/live/static: Permission denied
>>   (errno = 13 (Permission denied))
>> Dump/restore criu logs show that everything went fine.
>
> The most part of tests are executed under an unprivileged user.
>
>                  export ZDTM_UID=18943
>                  export ZDTM_GID=58467
>
>
> By default such users can't to enter into the "root" directory
> [avagin at localhost git]$ ls -dl /root/
> dr-xr-x---. 28 root root 4096 Dec  7 11:29 /root/
>

Oh! Thanks! I wasn't even suspecting that we run zdtm as a non-root =).
I always use /root/git on my VM and with pty it always works fine.
Indeed, running it from path with proper perms works great on both
tty and pty. But I still don't get why with /root... test fails on
tty, but succeeds on pty. Do you have any idea?

>>
>> If I run ./zdtm.sh cwd00 from tty I get the same error.
>>
>> But, If I run cwd00 test from tty manually by make cwd00.pid +
>> + criu dump/restore + make cwd00.out, I get:
>> ➜  static git:(master) ✗ cat cwd00.out
>> 19:21:02.249: 31368: PASS
>>
>> I've checked static dir and saw:
>> ➜  static git:(master) ✗ lsattr /root/git/criu/test/zdtm/live/
>> -------------e-- /root/git/criu/test/zdtm/live/streaming
>> -------------e-- /root/git/criu/test/zdtm/live/transition
>> ----------I--e-- /root/git/criu/test/zdtm/live/static
>> -------------e-- /root/git/criu/test/zdtm/live/Makefile
>> "I" flag says that static dir is being indexed, but it is indexed every
>> time I do tests.
>>
>> I've tested this strange behavior on 2 real machines and one virtual,
>> on fedora 20 and archlinux. The only common thing is ext4 filesystem.
>> But when i'm trying to use, for example, xfs, "I" flags disappears,
>> but problems remain the same.
>>
>> Does anyone have any idea what is going on?
>>
>> Thanks.
>> _______________________________________________
>> CRIU mailing list
>> CRIU at openvz.org
>> https://lists.openvz.org/mailman/listinfo/criu



More information about the CRIU mailing list