【问题标题】:Error while running unit tests for CRIU 1.8为 CRIU 1.8 运行单元测试时出错
【发布时间】:2016-05-12 18:30:49
【问题描述】:

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

libprotobuf-lite8 libprotobuf8 zlib1g-dev libprotobuf-dev libprotobuf-c0 libprotobuf-c0-dev libprotoc8 protobuf-c 编译器 protobuf 编译器 libaio-dev libcap-开发

之后,我以 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 有关。如果你同意并有权力,请在上面打个标签?

【问题讨论】:

    标签: linux unit-testing flock aio


    【解决方案1】:

    您需要一个新的 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 中保留一个备用内核,并考虑让某种“实时”可引导的 Linux ISO 可访问以重新进入您的系统,以防系统完全崩溃。

    【讨论】:

    • 我有一种感觉。我们团队中有一个人为我们的项目构建了一个自定义内核,所以我会把这个交给他。发布后,我在 Ubuntu 14.04 上进行了测试,得到了相同的结果。所以我不太相信这是我们所做的事情,更多的是总体上缺少一些东西。幸运的是,我是在虚拟机中这样做的,所以如果我破坏了某些东西,它不会有什么后果......
    • 太棒了!如果您觉得我的回答有用,请采纳。
    • 所以...事实证明,对于我们的具体情况,安装页面没有帮助。显然我们已经完成了所有这些事情。我们看到了需要做的事情,并正在考虑在做(合同上,我不能更具体)和升级到最新版本的 CRIU 之间。无论如何,您提供的信息非常有帮助,因此我将其标记为已回答。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-21
    • 2013-01-01
    • 1970-01-01
    • 2013-11-03
    • 1970-01-01
    • 1970-01-01
    • 2020-10-12
    相关资源
    最近更新 更多