From 0aa7f38a7fbbdee3bc38dac22e8d122c32909294 Mon Sep 17 00:00:00 2001 From: Andreas Florath Date: Fri, 6 May 2016 16:34:31 +0200 Subject: [PATCH] tests/elements/fake-os: add '/tmp' as top level dir lib/img-functions:finalise_base() does a recursive unmount of /tmp to cleanup any old mounts that might be in there (we do things like bind mount caches in there). unmount_dir fails if /tmp isn't a directory. The 'run_output_format_test.sh' uses the 'fake-os' element for testing. Because 'fake-os' did not create the '/tmp' directory, the test script fails. This patch fixes the problem: it adds '/tmp' to the list of directories that are created. It was implemented replacing the existing five 'mkdir' command with a for loop over now six directories. Change-Id: Ic7aca155492967b9819f129d3843cf95e136410e Signed-off-by: Andreas Florath --- tests/elements/fake-os/root.d/10-fake-os | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/elements/fake-os/root.d/10-fake-os b/tests/elements/fake-os/root.d/10-fake-os index e522cb174..388c7f350 100755 --- a/tests/elements/fake-os/root.d/10-fake-os +++ b/tests/elements/fake-os/root.d/10-fake-os @@ -5,11 +5,9 @@ set -o pipefail sudo touch $TARGET_ROOT/fake-os -sudo mkdir -p $TARGET_ROOT/etc -sudo mkdir -p $TARGET_ROOT/mnt -sudo mkdir -p $TARGET_ROOT/proc -sudo mkdir -p $TARGET_ROOT/dev -sudo mkdir -p $TARGET_ROOT/sys +for DIR in etc mnt proc dev sys tmp; do + sudo mkdir -p ${TARGET_ROOT}/${DIR} +done # We need some size so the mkfs does not fail when making an fs of size 0 # We also need to account for the journal size on the FS