summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2016-07-18 11:12:43 +0530
committerNiels de Vos <ndevos@redhat.com>2016-08-05 00:51:28 -0700
commit903ff0cf9c4e870f17fd9cc8ef95321f39c9760c (patch)
treea395940447cff04837cfc7943275313ffa41048c /tests
parent15e83bedbef360fea0ff67eab4ac8a8a8dd17772 (diff)
xlator/trash : append '/' at the end in trash_notify_lookup_cbk
In the notify function in trash xlator, a lookup is performed to obtain path of old trash directory. The result usually contains path without '/' at the end. The trash xlator maintains expects '/' at the end for the values such as 'old trash dir' and 'new trash dir'. Otherwise certian checks in the code will fail. >Change-Id: I89e02e4b249314fb6536297f959865feee182c83 >BUG: 1357397 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/14938 >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Anoop C S <anoopcs@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit d90307c1b0245e0e6a39044a28819cde520a100c) Change-Id: I89e02e4b249314fb6536297f959865feee182c83 BUG: 1358262 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14965 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/unclassified/bug-1357397.t29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/bugs/unclassified/bug-1357397.t b/tests/bugs/unclassified/bug-1357397.t
new file mode 100644
index 00000000000..dc76787b505
--- /dev/null
+++ b/tests/bugs/unclassified/bug-1357397.t
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+cleanup
+
+TEST glusterd
+TEST pidof glusterd
+
+TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2}
+
+TEST $CLI volume start $V0
+
+TEST [ -e $B0/${V0}1/.trashcan ]
+
+TEST [ -e $B0/${V0}1/.trashcan/internal_op ]
+
+TEST $CLI volume stop $V0
+
+rm -rf $B0/${V0}1/.trashcan/internal_op
+
+TEST [ ! -e $B0/${V0}1/.trashcan/internal_op ]
+
+TEST $CLI volume start $V0 force
+
+TEST [ -e $B0/${V0}1/.trashcan/internal_op ]
+
+cleanup