From Fedora Project Wiki

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

This test aims to verify mount setup is done correctly

Setup

Follow the VirtSandbox common setup

Create a temporary directory with some dummy files

# mkdir $HOME/tmp
# mkdir $HOME/tmp/home
# mkdir $HOME/tmp/tmp
# echo "I'm at home" > $HOME/tmp/home/README
# echo "I'm not at home" > $HOME/tmp/tmp/README 

How to test

  1. Run a container with a custom $HOME
    # virt-sandbox -c $URI --host-bind $HOME=$HOME/tmp/home /bin/sh
    $ cat $HOME/README
  2. Run a container with a custom /tmp
    # virt-sandbox -c $URI --host-bind /tmp=$HOME/tmp/tmp /bin/sh
    $ cat /tmp/README
  3. Run a container with custom $HOME and /tmp, using bind mounts
    # virt-sandbox -c $URI --host-bind /mnt=$HOME/tmp --guest-bind /tmp=/mnt/tmp --guest-bind $HOME=/mnt/home /bin/sh
    $ cat $HOME/README
    $ cat /tmp/README

Expected Results

  1. With a custom HOME
    "I'm at home"
  2. With a custom /tmp
    "I'm not at home"
  3. With a custom $HOME and /tmp
    "I'm at home"
    "I'm not at home"