linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] NFS4.0: Case for linking to bad source patch with zero-length
@ 2014-04-24 10:57 Kinglong Mee
  2014-05-06 20:34 ` J. Bruce Fields
  0 siblings, 1 reply; 3+ messages in thread
From: Kinglong Mee @ 2014-04-24 10:57 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 nfs4.0/servertests/st_create.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/nfs4.0/servertests/st_create.py b/nfs4.0/servertests/st_create.py
index d2d6701..09c80cc 100644
--- a/nfs4.0/servertests/st_create.py
+++ b/nfs4.0/servertests/st_create.py
@@ -161,6 +161,19 @@ def testZeroLength(t, env):
     res = c.create_obj(c.homedir + [''])
     check(res, NFS4ERR_INVAL, "CREATE with zero-length name")
 
+def testZeroLengthForLNK(t, env):
+    """CREATE with zero length name should return NFS4ERR_INVAL
+
+    FLAGS: create symlink all
+    CODE: CR9a
+    """
+    c = env.c1
+    ops = c.go_home()
+    objtype = createtype4(NF4LNK, **{'linkdata':''})
+    ops += [c.create_op(objtype, t.code, getDefaultAttr(c))]
+    res = c.compound(ops)
+    check(res, NFS4ERR_INVAL, "CREATE with zero-length name for SYMLINK")
+
 def testRegularFile(t, env):
     """CREATE should fail with NFS4ERR_BADTYPE for regular files
 
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-07  9:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-24 10:57 [PATCH 1/3] NFS4.0: Case for linking to bad source patch with zero-length Kinglong Mee
2014-05-06 20:34 ` J. Bruce Fields
2014-05-07  9:55   ` Kinglong Mee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).