From Fedora Project Wiki
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
- Run a container with a custom $HOME
- # virt-sandbox -c $URI --host-bind $HOME=$HOME/tmp/home /bin/sh
- $ cat $HOME/README
- Run a container with a custom /tmp
- # virt-sandbox -c $URI --host-bind /tmp=$HOME/tmp/tmp /bin/sh
- $ cat /tmp/README
- 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
- With a custom HOME
- "I'm at home"
- With a custom /tmp
- "I'm not at home"
- With a custom $HOME and /tmp
- "I'm at home"
- "I'm not at home"