运行CRIU 1.8的单元测试时出错

时间:2016-05-12 18:30:50

标签: linux unit-testing flock aio

我正在尝试在CRIU 1.8上运行单元测试。为了准备盒子,我安装了:

libprotobuf-lite8 libprotobuf8 的zlib1g-dev的 libprotobuf-dev的 libprotobuf-C0 libprotobuf-C0-dev的 libprotoc8 protobuf的-C编译器 protobuf的编译 libaio的-dev的 的libcap-dev的

之后,以root身份运行make test并得到以下输出:

...
make[3]: Leaving directory `/home/ubuntu/criu-1.8/test/zdtm/live/static'
make[2]: Leaving directory `/home/ubuntu/criu-1.8/test/zdtm/live'
make[1]: Leaving directory `/home/ubuntu/criu-1.8/test/zdtm'
make[1]: Entering directory `/home/ubuntu/criu-1.8/test'
make zdtm
make[2]: Entering directory `/home/ubuntu/criu-1.8/test'
./zdtm.sh -l > zdtm-tst-list
================================= CRIU CHECK =================================
prctl: PR_SET_MM_MAP is not supported, which is required for restoring user namespaces
Error (cr-check.c:634): Kernel doesn't support PTRACE_O_SUSPEND_SECCOMP
Error (cr-check.c:683): Dumping seccomp filters not supported: Input/output error
Error (timerfd.c:55): timerfd: No timerfd support for c/r: Inappropriate ioctl for device
Error (cr-check.c:780): AIO remap doesn't work properly
Error (cr-check.c:796): fdinfo doesn't contain the lock field
============================= WARNING =============================
Not all features needed for CRIU are merged to upstream kernel yet,
so for now we maintain our own branch which can be cloned from:
git://git.kernel.org/pub/scm/linux/kernel/git/gorcunov/linux-cr.git
===================================================================

make -f Makefile.zdtm zdtm_nons
make[3]: Entering directory `/home/ubuntu/criu-1.8/test'
gcc  -O2 -Wall -Werror -DCONFIG_X86_64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE -D_GNU_SOURCE    zdtm_ct.c   -o zdtm_ct
flock zdtm_mount_cgroups ./zdtm_mount_cgroups
flock: ./zdtm_mount_cgroups: Text file busy
make[3]: *** [mount_cgroups] Error 69
make[3]: Leaving directory `/home/ubuntu/criu-1.8/test'
make[2]: *** [zdtm] Error 2
make[2]: Leaving directory `/home/ubuntu/criu-1.8/test'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/ubuntu/criu-1.8/test'
make: *** [test] Error 2

我认为我的问题是那里的CRIU CHECK区域内的问题,但我不确定我在这里看到的是什么。任何人都可以指出我正确的方向。如果谷歌有帮助,那么我太无知了,无法识别它。谢谢!

另外,我没有在SO上声称将其标记为CRIU(显然这是一个新标签),但它显然与CRIU有关。如果您同意并拥有权力,请在此标记?

1 个答案:

答案 0 :(得分:0)

您需要一个新的Linux内核。

CRIU CHECK框中的内容是它所需要的东西,但系统上的库(例如libc)或内核都不支持。在下面的框中,它们描述了您必须获得具有必要补丁的内核的位置:

============================= WARNING =============================
Not all features needed for CRIU are merged to upstream kernel yet,
so for now we maintain our own branch which can be cloned from:
git://git.kernel.org/pub/scm/linux/kernel/git/gorcunov/linux-cr.git
===================================================================

按照CRIU安装页面上的说明配置内核:https://criu.org/Installation。而且,使用像内核新手那样的页面"有关自己构建内核的一般建议:http://kernelnewbies.org/KernelBuild

构建内核相当简单,但有时让它正常工作有点棘手。确保在GRUB中留下一个后备内核,并考虑使用某种" live"可引导的Linux ISO可以回到你的系统,以防它完全向南。