Commit 4988a579 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

test: create /etc in a temporary root

inotify_irmap creates files in /etc so it should be able to do
this from userns.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9daefff5
...@@ -419,6 +419,10 @@ construct_root() ...@@ -419,6 +419,10 @@ construct_root()
local tmpdir=$root/tmp local tmpdir=$root/tmp
local lname tname local lname tname
# inotify_irmap creates files in /etc so it should be able to do
# this from userns.
mkdir -m 0777 -p $root/etc
mkdir -p $root/bin mkdir -p $root/bin
cp $ps_path $root/bin cp $ps_path $root/bin
......
...@@ -30,7 +30,6 @@ int main (int argc, char *argv[]) ...@@ -30,7 +30,6 @@ int main (int argc, char *argv[])
test_init(argc, argv); test_init(argc, argv);
mkdir(TDIR, 0600);
unlink(TFIL); unlink(TFIL);
if (creat(TFIL, 0600) < 0) { if (creat(TFIL, 0600) < 0) {
err("Can't make test file"); err("Can't make test file");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment