diff options
author | Jiffin Tony Thottan <jthottan@redhat.com> | 2017-07-21 12:14:25 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-08-04 13:40:15 +0000 |
commit | b683109485da3a2681ff769ab40b512fb9a59c4a (patch) | |
tree | 32bc1021560607adab262e53e69c2ce9fa8c4cf0 /api | |
parent | ae084046cce12a1ce707b5d141f092b4c011e1b3 (diff) |
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 <jthottan@redhat.com>
>Reviewed-on: https://review.gluster.org/17844
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Niels de Vos <ndevos@redhat.com>
>Reviewed-by: soumya k <skoduri@redhat.com>
>(cherry picked from commit 5c433f8f5834a4cae62d0375bfdb273242630f01)
Change-Id: I6063f776ce1cd76cb4c1b1f621b064f3dcc91e5c
BUG: 1477994
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://review.gluster.org/17966
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/src/glfs-resolve.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |