mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 03:55:11 +00:00
xtests for higher order bits
Finally, re-do the permissions extended tests to include the setuid, setgid, and sticky bits, and rename the last two existing ones to match the others (files with the same names as their permissions).
This commit is contained in:
parent
a2901c63cf
commit
c4447e35b6
25
Vagrantfile
vendored
25
Vagrantfile
vendored
@ -274,26 +274,25 @@ Vagrant.configure(2) do |config|
|
||||
|
||||
|
||||
# Awkward permission testcases.
|
||||
# Differences in the way ‘chmod’ handles setting ‘setuid’ and ‘setgid’
|
||||
# when you don’t already own the file mean that we need to use ‘sudo’
|
||||
# to change permissions to those.
|
||||
config.vm.provision :shell, privileged: false, inline: <<-EOF
|
||||
set -xe
|
||||
mkdir "#{test_dir}/permissions"
|
||||
|
||||
touch "#{test_dir}/permissions/all-permissions"
|
||||
chmod 777 "#{test_dir}/permissions/all-permissions"
|
||||
mkdir "#{test_dir}/permissions/forbidden-directory"
|
||||
chmod 000 "#{test_dir}/permissions/forbidden-directory"
|
||||
touch -t #{some_date} "#{test_dir}/permissions/forbidden-directory"
|
||||
sudo chown #{user}:#{user} "#{test_dir}/permissions/forbidden-directory"
|
||||
|
||||
touch "#{test_dir}/permissions/no-permissions"
|
||||
chmod 000 "#{test_dir}/permissions/no-permissions"
|
||||
|
||||
mkdir "#{test_dir}/permissions/forbidden-directory"
|
||||
chmod 000 "#{test_dir}/permissions/forbidden-directory"
|
||||
|
||||
for perms in 001 002 004 010 020 040 100 200 400; do
|
||||
touch "#{test_dir}/permissions/$perms"
|
||||
chmod $perms "#{test_dir}/permissions/$perms"
|
||||
for perms in 000 001 002 004 010 020 040 100 200 400 644 755 777 1000 1001 2000 2010 4000 4100 7666 7777; do
|
||||
touch "#{test_dir}/permissions/$perms"
|
||||
sudo chown #{user}:#{user} "#{test_dir}/permissions/$perms"
|
||||
sudo chmod $perms "#{test_dir}/permissions/$perms"
|
||||
sudo touch -t #{some_date} "#{test_dir}/permissions/$perms"
|
||||
done
|
||||
|
||||
touch -t #{some_date} "#{test_dir}/permissions/"*
|
||||
sudo chown #{user}:#{user} "#{test_dir}/permissions/"*
|
||||
EOF
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/testcases/permissions/forbidden-directory: Permission denied (os error 13)
|
||||
[4mPermissions[0m [4mSize[0m [4mUser[0m [4mGroup[0m [4mDate Modified[0m [4mName[0m
|
||||
.[38;5;244m---------[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 000
|
||||
.[38;5;244m--------[32mx[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 001
|
||||
.[38;5;244m-------[31mw[38;5;244m-[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 002
|
||||
.[38;5;244m------[33mr[38;5;244m--[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 004
|
||||
@ -9,6 +10,15 @@
|
||||
.[38;5;244m--[1;4;32mx[0m[38;5;244m------[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m [1;32m100[0m
|
||||
.[38;5;244m-[1;31mw[0m[38;5;244m-------[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 200
|
||||
.[1;33mr[0m[38;5;244m--------[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 400
|
||||
.[1;33mr[31mw[4;32mx[0m[33mr[31mw[32mx[33mr[31mw[32mx[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m [1;32mall-permissions[0m
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[38;5;244m--[33mr[38;5;244m--[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 644
|
||||
.[1;33mr[31mw[4;32mx[0m[33mr[38;5;244m-[32mx[33mr[38;5;244m-[32mx[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m [1;32m755[0m
|
||||
.[1;33mr[31mw[4;32mx[0m[33mr[31mw[32mx[33mr[31mw[32mx[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m [1;32m777[0m
|
||||
.[38;5;244m--------[35mT[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 1000
|
||||
.[38;5;244m--------[35mt[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 1001
|
||||
.[38;5;244m-----[35mS[38;5;244m---[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 2000
|
||||
.[38;5;244m-----[35ms[38;5;244m---[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 2010
|
||||
.[38;5;244m--[35mS[38;5;244m------[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 4000
|
||||
.[38;5;244m--[35ms[38;5;244m------[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m [1;32m4100[0m
|
||||
.[1;33mr[31mw[0m[35mS[33mr[31mw[35mS[33mr[31mw[35mT[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m 7666
|
||||
.[1;33mr[31mw[0m[35ms[33mr[31mw[35ms[33mr[31mw[35mt[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m [1;32m7777[0m
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary cassowary [34m 1 Jan 12:34[0m [1;34mforbidden-directory[0m
|
||||
.[38;5;244m---------[0m [1;32m0[0m cassowary cassowary [34m 1 Jan 12:34[0m no-permissions
|
||||
|
@ -1,5 +1,6 @@
|
||||
/testcases/permissions/forbidden-directory: Permission denied (os error 13)
|
||||
[4mPermissions[0m [4mSize[0m [4mUser[0m [4mGroup[0m [4mDate Modified[0m [4mName[0m
|
||||
.[38;5;244m---------[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 000
|
||||
.[38;5;244m--------[32mx[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 001
|
||||
.[38;5;244m-------[31mw[38;5;244m-[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 002
|
||||
.[38;5;244m------[33mr[38;5;244m--[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 004
|
||||
@ -9,6 +10,15 @@
|
||||
.[38;5;244m--[1;4;32mx[0m[38;5;244m------[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m [1;32m100[0m
|
||||
.[38;5;244m-[1;31mw[0m[38;5;244m-------[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 200
|
||||
.[1;33mr[0m[38;5;244m--------[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 400
|
||||
.[1;33mr[31mw[4;32mx[0m[33mr[31mw[32mx[33mr[31mw[32mx[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m [1;32mall-permissions[0m
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[38;5;244m--[33mr[38;5;244m--[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 644
|
||||
.[1;33mr[31mw[4;32mx[0m[33mr[38;5;244m-[32mx[33mr[38;5;244m-[32mx[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m [1;32m755[0m
|
||||
.[1;33mr[31mw[4;32mx[0m[33mr[31mw[32mx[33mr[31mw[32mx[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m [1;32m777[0m
|
||||
.[38;5;244m--------[35mT[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 1000
|
||||
.[38;5;244m--------[35mt[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 1001
|
||||
.[38;5;244m-----[35mS[38;5;244m---[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 2000
|
||||
.[38;5;244m-----[35ms[38;5;244m---[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 2010
|
||||
.[38;5;244m--[35mS[38;5;244m------[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 4000
|
||||
.[38;5;244m--[35ms[38;5;244m------[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m [1;32m4100[0m
|
||||
.[1;33mr[31mw[0m[35mS[33mr[31mw[35mS[33mr[31mw[35mT[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m 7666
|
||||
.[1;33mr[31mw[0m[35ms[33mr[31mw[35ms[33mr[31mw[35mt[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m [1;32m7777[0m
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m [1;34mforbidden-directory[0m
|
||||
.[38;5;244m---------[0m [1;32m0[0m [1;33mcassowary[0m [1;33mcassowary[0m [34m 1 Jan 12:34[0m no-permissions
|
||||
|
Loading…
Reference in New Issue
Block a user