From b683109485da3a2681ff769ab40b512fb9a59c4a Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Fri, 21 Jul 2017 12:14:25 +0530 Subject: tests/gfapi : add test case for nameless lookups in glfs_resolve_component() Plus address pending comment to add check for entry "" in glfs_resolve_component() Upstream reference : >Change-Id: I6063f776ce1cd76cb4c1b1f621b064f3dcc91e5c >BUG: 1460514 >Signed-off-by: Jiffin Tony Thottan >Reviewed-on: https://review.gluster.org/17844 >Smoke: Gluster Build System >CentOS-regression: Gluster Build System >Reviewed-by: Niels de Vos >Reviewed-by: soumya k >(cherry picked from commit 5c433f8f5834a4cae62d0375bfdb273242630f01) Change-Id: I6063f776ce1cd76cb4c1b1f621b064f3dcc91e5c BUG: 1477994 Signed-off-by: Jiffin Tony Thottan Reviewed-on: https://review.gluster.org/17966 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- api/src/glfs-resolve.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c index 8e91cd71c20..76835cbaebd 100644 --- a/api/src/glfs-resolve.c +++ b/api/src/glfs-resolve.c @@ -282,7 +282,8 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent, if (__is_root_gfid (parent->gfid) && ((strcmp (component, ".") == 0) || - (strcmp (component, "..") == 0))) { + (strcmp (component, "..") == 0) || + (strcmp (component, "") == 0))) { if (!force_lookup) { inode = inode_ref (parent); } else { -- cgit