@@ -130,25 +130,28 @@ def doCheckACL(t, c, file, acl):
# print printableacl(attrs[FATTR4_ACL])
def doSetACLEnv(t, env, type = NF4REG):
- c = env.c1
- path = c.homedir + [t.code]
- res = c.create_obj(path, attrs={FATTR4_MODE:0777})
+ """ Create a directory with 0777 as top dir, and create a directory
+ or a regualr file for testing by other user under the above dir.
+ """
+ cdir = env.c1
+ path = cdir.homedir + [t.code]
+ res = cdir.create_obj(path, attrs={FATTR4_MODE:0777})
check(res)
- c1 = env.c2
- c1.init_connection()
+ ctest = env.c2
+ ctest.init_connection()
path += [t.code]
attrs = {FATTR4_MODE: 0777}
if type == NF4REG:
- fh, stateid = c1.create_confirm(t.code, path, attrs=attrs,
+ fh, stateid = ctest.create_confirm(t.code, path, attrs=attrs,
deny=OPEN4_SHARE_DENY_NONE)
- return (c1, path, fh, stateid)
+ return (ctest, path, fh, stateid)
else:
- res = c1.create_obj(path, attrs=attrs)
+ res = ctest.create_obj(path, attrs=attrs)
check(res)
- return (c1, path)
+ return (ctest, path)
def testWriteFileWithoutACL(t, env):
""" Check write file without write ACL