]> git.proxmox.com Git - mirror_zfs.git/blame - tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_index_props.zcp
Update ZTS to work on FreeBSD
[mirror_zfs.git] / tests / zfs-tests / tests / functional / channel_program / synctask_core / tst.get_index_props.zcp
CommitLineData
d99a0153
CW
1--
2-- This file and its contents are supplied under the terms of the
3-- Common Development and Distribution License ("CDDL"), version 1.0.
4-- You may only use this file in accordance with the terms of version
5-- 1.0 of the CDDL.
6--
7-- A full copy of the text of the CDDL should have accompanied this
8-- source. A copy of the CDDL is also available via the Internet at
9-- http://www.illumos.org/license/CDDL.
10--
11
12--
13-- Copyright (c) 2016 by Delphix. All rights reserved.
14--
15
16arg = ...
17fs = arg["argv"][1]
18snap = arg["argv"][2]
7839c4b5 19os = arg["argv"][3]
d99a0153
CW
20
21props = {}
22
23-- prop filesystem snapshot
24props['redundant_metadata'] = {{'all', 'default'}, {nil, nil}}
25props['sync'] = {{'standard', 'default'}, {nil, nil}}
26props['checksum'] = {{'on', 'default'}, {nil, nil}}
27props['dedup'] = {{'off', 'default'}, {nil, nil}}
28props['compression'] = {{'off', 'default'}, {nil, nil}}
29props['snapdir'] = {{'hidden', 'default'}, {nil, nil}}
7839c4b5
MM
30if os == "Linux" then
31 props['acltype'] = {{'off', 'default'}, {'off', 'default'}}
32elseif os == "FreeBSD" then
33 props['aclmode'] = {{'discard', 'default'}, {'discard', 'default'}}
34end
d99a0153
CW
35props['aclinherit'] = {{'restricted','default'}, {nil, nil}}
36props['copies'] = {{'1', 'default'}, {nil, nil}}
37props['primarycache'] = {{'all', 'default'}, {'all', 'default'}}
38props['secondarycache'] = {{'all', 'default'}, {'all', 'default'}}
39props['logbias'] = {{'latency', 'default'}, {nil, nil}}
40props['atime'] = {{'on', 'default'}, {nil, nil}}
41props['devices'] = {{'on', 'default'}, {'on', 'default'}}
42props['exec'] = {{'on', 'default'}, {'on', 'default'}}
43props['setuid'] = {{'on', 'default'}, {'on', 'default'}}
44props['readonly'] = {{'off', 'default'}, {nil, nil}}
7839c4b5
MM
45if os == "FreeBSD" then
46 props['jailed'] = {{'off', 'default'}, {nil, nil}}
47else
48 props['zoned'] = {{'off', 'default'}, {nil, nil}}
49end
d99a0153
CW
50props['vscan'] = {{'off', 'default'}, {nil, nil}}
51props['nbmand'] = {{'off', 'default'}, {'off', 'default'}}
52props['version'] = {{'5', nil}, {'5', nil}}
53props['canmount'] = {{'on', 'default'}, {nil, nil}}
54props['mounted'] = {{nil, nil}, {nil, nil}}
55props['defer_destroy'] = {{nil, nil}, {'off', nil}}
56props['normalization'] = {{'none', nil}, {'none', nil}}
57props['casesensitivity'] = {{'sensitive', nil}, {'sensitive', nil}}
58props['utf8only'] = {{'off', nil}, {'off', nil}}
59props['dnodesize'] = {{'legacy', 'default'}, {nil, nil}}
60props['relatime'] = {{'off', 'default'}, {nil, nil}}
61props['overlay'] = {{'off', 'default'}, {nil, nil}}
62
63fs_fails = {}
64snap_fails = {}
65for prop, expected in pairs(props) do
66 ans, src = zfs.get_prop(fs, prop)
67 if ((ans ~= expected[1][1]) or (src ~= expected[1][2])) then
68 fs_fails[prop] = {ans, src}
69 end
70
71 ans, src = zfs.get_prop(snap, prop)
72 if ((ans ~= expected[2][1]) or (src ~= expected[2][2])) then
73 snap_fails[prop] = {ans, src}
74 end
75end
76
77return {fs_fails, snap_fails}