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

vmm-sys-util #1

Merged
merged 15 commits into from
May 28, 2019
Merged

vmm-sys-util #1

merged 15 commits into from
May 28, 2019

Commits on May 7, 2019

  1. vmm-sys-util: Add basic files

    Add and correct basic support files for the vmm-sys-util crate including:
    - files generated by Cargo
    - license files
    - gitignore
    
    Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
    Jing Liu committed May 7, 2019
    Configuration menu
    Copy the full SHA
    e570ddb View commit details
    Browse the repository at this point in the history
  2. vmm-sys-util: Add modules for system utilities.

    The errno module wraps an interface to the error codes.
    The eventfd module is a wraper around the Linux eventfd. Use result::Result<EventFd, io::Error>
    instead of result::Result<EventFd, errno::Errno> as return type.
    The terminal module is for configuring pseudo-terminals in raw mode.
    The signal module is for registering signal handlers and for signalling threads.
    The ioctl module is factoring out common ioctl wrappers and macros.
    
    This is derived from crosvm code base e4ece32798ba436fbfa88466c571f46dab99e2be
    and firecracker code base 1fdde1997fc763601f8a88399bc426bd5d4097cd.
    
    Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
    
    ---
    Change Log
    
    Add license.
    Append prefix test_ for each test.
    Add verbose commit messages.
    Jing Liu committed May 7, 2019
    Configuration menu
    Copy the full SHA
    1ddc50d View commit details
    Browse the repository at this point in the history
  3. vmm-sys-util: Add flag parameter for signal module

    To use different init flag(e.g. SA_RESTART, SA_SIGINFO) for sigaction, add
    a parameter to register_signal_handler and a function to set this flag.
    
    Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
    Jing Liu committed May 7, 2019
    Configuration menu
    Copy the full SHA
    d6b8535 View commit details
    Browse the repository at this point in the history
  4. vmm-sys-util: Add timerfd module

    Wrapping the libc timerfd for the usage of setting timer, waiting expiring,
    disarm timer.
    
    This is derived from crosvm code base e4ece32798ba436fbfa88466c571f46dab99e2be.
    
    Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
    
    ---
    Change Log:
    
    Add license.
    Split the summary and description for method.
    Add link for structures and functions.
    Append prefix test_ for tests.
    Jing Liu committed May 7, 2019
    Configuration menu
    Copy the full SHA
    4d6455d View commit details
    Browse the repository at this point in the history
  5. vmm-sys-util: Add poll and syslog modules

    The poll module addis the Poller object for waiting on mutliple file
    descriptors at once. Add macro handle_eintr_errno! to check the epoll_wait return value.
    
    The syslog module is for logging, temporarily defining the SYS_getpid syscall value.
    
    This is derived from crosvm code base e4ece32798ba436fbfa88466c571f46dab99e2be.
    
    Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
    
    ---
    Change Log
    Append prefix test_ for tests.
    Jing Liu committed May 7, 2019
    Configuration menu
    Copy the full SHA
    a7987f5 View commit details
    Browse the repository at this point in the history
  6. file: Add file specific traits

    Copied verbatim from crosvm 107edb3e.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz committed May 7, 2019
    Configuration menu
    Copy the full SHA
    71bf8a0 View commit details
    Browse the repository at this point in the history
  7. vmm-sys-util: Add a basic fallocate implementation

    This will be needed for the write_zeroes and seek_hole implementations.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz committed May 7, 2019
    Configuration menu
    Copy the full SHA
    0588fc9 View commit details
    Browse the repository at this point in the history
  8. tempdir: Add a simple temporary directory implementation

    A dependency free alternative to the tempfile crate.
    Copied verbatim from crosvm 107edb3e.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz committed May 7, 2019
    Configuration menu
    Copy the full SHA
    d84dc8e View commit details
    Browse the repository at this point in the history
  9. write_zeroes: Add a trait for writing zeroes to a stream

    This is needed for disk image format support like e.g. QCOW2.
    Copied verbatim from crosvm 107edb3e.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz committed May 7, 2019
    Configuration menu
    Copy the full SHA
    09870bc View commit details
    Browse the repository at this point in the history
  10. seek_hole: Add a trait for seeking holes in a file

    This is needed for disk image format support like e.g. QCOW2.
    Copied verbatim from crosvm 107edb3e.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz committed May 7, 2019
    Configuration menu
    Copy the full SHA
    08daac2 View commit details
    Browse the repository at this point in the history
  11. vmm-sys-util: Make clippy clean

    Several places are improved to suppress the clippy warnings.
    
    The changes of type casting in timerfd module are based on crosvm latest code base
    b1de6323ab8c96c52a60e0ff735e4bbb8a8464c9.
    
    The write_zeroes and seek_hole clippy warnings are only on test code, we
    can safely allow them.
    
    Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
    Jing Liu authored and Samuel Ortiz committed May 7, 2019
    Configuration menu
    Copy the full SHA
    5aa355b View commit details
    Browse the repository at this point in the history
  12. vmm-sys-util: Add buildkite based CI

    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz committed May 7, 2019
    Configuration menu
    Copy the full SHA
    766db44 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2019

  1. seek_hole: Fix musl compilation

    musl does not define the SEEK_HOLE and SEEK_DATA constants.
    We use the libc one when using glibc and we define them when building
    for musl.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz authored and liujing2 committed May 21, 2019
    Configuration menu
    Copy the full SHA
    45d47cf View commit details
    Browse the repository at this point in the history

Commits on May 28, 2019

  1. syslog: Use libc directly to get lowest fd

    Using the File wrappers leads to poisoned pointers when running under a
    tmpfs based /dev mount.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz committed May 28, 2019
    Configuration menu
    Copy the full SHA
    d660a92 View commit details
    Browse the repository at this point in the history
  2. buildkite: Use a real tmpfs

    The vmm-sys-util test make heavy use of temporary dirs and files.
    Running that under a container overlay leads to erratic behaviours and
    this is fixed by using a real tmpfs mount into the container's /tmp.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Samuel Ortiz committed May 28, 2019
    Configuration menu
    Copy the full SHA
    700a05b View commit details
    Browse the repository at this point in the history