From 9bcae813af89d445a4d269e83c371847075f1008 Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Mon, 26 Mar 2012 19:27:18 +0300 Subject: Made --map affect chown/chgrp results. --- tests/test_bindfs.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/test_bindfs.rb') diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb index 30899ed..ef732ff 100755 --- a/tests/test_bindfs.rb +++ b/tests/test_bindfs.rb @@ -293,3 +293,17 @@ root_testenv("-u 1 --map=1/2:3/4") do assert { File.stat('mnt/file1').uid == 1 } assert { File.stat('mnt/file2').uid == 1 } end + +root_testenv("--map=0/1:@0/@1", :title => "--map and chown/chgrp") do + touch('src/file1') + chown(2, 2, 'src/file1') + assert { File.stat('mnt/file1').uid == 2 } + assert { File.stat('mnt/file1').gid == 2 } + + chown(1, 1, 'mnt/file1') + + assert { File.stat('src/file1').uid == 0 } + assert { File.stat('src/file1').gid == 0 } + assert { File.stat('mnt/file1').uid == 1 } + assert { File.stat('mnt/file1').gid == 1 } +end -- cgit v1.2.3