Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

part of PR 340 adding test_bind_dev,test_mknod_dev and test_create_devices #362

Conversation

tommady
Copy link
Collaborator

@tommady tommady commented Oct 4, 2021

as requested by separating #340 into small PRs

this one is the fourth part which is adding three test cases:

  • test_bind_dev
  • test_mknod_dev
  • test_create_devices

please help review 🙇🏻

@tommady
Copy link
Collaborator Author

tommady commented Oct 4, 2021

sorry, the test failures are some kind of I don't understand...

cargo test --all --all-features --no-fail-fast
/build-script-build` (exit status: 101)
  --- stdout
    MKDIR    staticobjs
    CC       bpf.o
    CC       btf.o

  --- stderr
  Package libelf was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libelf.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libelf' found
  btf.c:18:10: fatal error: gelf.h: No such file or directory
     18 | #include <gelf.h>
        |          ^~~~~~~~
  compilation terminated.
  make: *** [Makefile:113: /home/tommady/rust/youki_tommady/target/x86_64-unknown-linux-gnu/debug/build/libbpf-sys-238adb98268543af/out/obj/staticobjs/btf.o] Error 1
info: when --target option is used, coverage for proc-macro and build script will not be displayed because cargo does not pass RUSTFLAGS to them
   Compiling seccomp v0.1.0 (/home/runner/work/youki/youki/seccomp)
   Compiling cgroups v0.1.0 (/home/runner/work/youki/youki/cgroups)
   Compiling youki v0.0.1 (/home/runner/work/youki/youki)
warning: field is never read: `user_namespace`
  --> src/rootless.rs:20:5
   |
20 |     pub(crate) user_namespace: Option<LinuxNamespace>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `youki` (lib) generated 1 warning
warning: `youki` (lib test) generated 1 warning (1 duplicate)
    Finished test [unoptimized + debuginfo] target(s) in 22.04s
     Running unittests (target/llvm-cov-target/x86_64-unknown-linux-gnu/debug/deps/youki-a853ea8c9159406b)

need to check more deeper, or is that a known issue? that I can wait for the fix 🙇🏻‍♂️

@Furisto
Copy link
Collaborator

Furisto commented Oct 4, 2021

Looks like a temporary issue with the package server. I restarted the workflow.

@tommady tommady marked this pull request as draft October 5, 2021 01:42
@tommady tommady force-pushed the 279-increate-the-code-coverage-of-src-rootfs-part-5 branch from cca556b to ad93fe0 Compare October 5, 2021 02:04
@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2021

Codecov Report

Merging #362 (416a131) into main (c4264a1) will increase coverage by 2.23%.
The diff coverage is 98.69%.

@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
+ Coverage   70.99%   73.22%   +2.23%     
==========================================
  Files          48       48              
  Lines        7540     7721     +181     
==========================================
+ Hits         5353     5654     +301     
+ Misses       2187     2067     -120     

@tommady tommady force-pushed the 279-increate-the-code-coverage-of-src-rootfs-part-5 branch from d0e4a4f to b8210de Compare October 5, 2021 02:38
@tommady tommady marked this pull request as ready for review October 5, 2021 02:43
src/rootfs.rs Outdated Show resolved Hide resolved
src/rootfs.rs Outdated Show resolved Hide resolved
Copy link
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect

@utam0k utam0k merged commit 68d2c0b into youki-dev:main Oct 5, 2021
@tommady tommady deleted the 279-increate-the-code-coverage-of-src-rootfs-part-5 branch October 6, 2021 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants