summaryrefslogtreecommitdiffstats
path: root/tests/basic/gfapi/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic/gfapi/Makefile')
0 files changed, 0 insertions, 0 deletions
t/tree/tests/basic/gfapi?h=v9dev&id=753a603ce3259f3c6667a48ff4001512941f9128'>tests/basic/gfapi parent54f8ee45a5152bea73009accb569c90994f16f08 (diff)
libgfapi : anonymous fd support
backport of http://review.gluster.org/#/c/9971/ Anonymous fd's are floating fd assigned to a glusterfs client without a explicit file open. Here either it will create a new anonymous fd or existing anonymous fd in the client stack for requested file.The anonymous fd's are mainly used for IO's. This patch introduces two api's glfs_h_anonymous_read and glfs_h_anonymous_write which performs read and write respectively cherry-picked as fa0ad231745846918b2625d0e1a89c0a5c3c24dc >Change-Id: Id646f2220e8387b2f8bb244c848dc1db6761444f >BUG: 1204651 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-by: Niels de Vos <ndevos@redhat.com> >Reviewed-on: http://review.gluster.org/9971 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Change-Id: I6b01d88f92ad045e48debee23aa79f4517c6bdc2 BUG: 1218857 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/10635 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/basic/gfapi')
-rw-r--r--tests/basic/gfapi/Makefile.am2
-rwxr-xr-xtests/basic/gfapi/anonymous_fd.sh26
-rw-r--r--tests/basic/gfapi/anonymous_fd_read_write.c101
3 files changed, 128 insertions, 1 deletions
diff --git a/tests/basic/gfapi/Makefile.am b/tests/basic/gfapi/Makefile.am
index 39fc04b0f39..cdb0e543803 100644
--- a/tests/basic/gfapi/Makefile.am
+++ b/tests/basic/gfapi/Makefile.am
@@ -4,7 +4,7 @@
CFLAGS = -Wall -g $(shell pkg-config --cflags glusterfs-api)
LDFLAGS = $(shell pkg-config --libs glusterfs-api)
-BINARIES = upcall-cache-invalidate libgfapi-fini-hang
+BINARIES = upcall-cache-invalidate libgfapi-fini-hang anonymous_fd
%: %.c
diff --git a/tests/basic/gfapi/anonymous_fd.sh b/tests/basic/gfapi/anonymous_fd.sh
new file mode 100755
index 00000000000..2184f8efc8e
--- /dev/null
+++ b/tests/basic/gfapi/anonymous_fd.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+cleanup;
+
+TEST glusterd
+
+TEST $CLI volume create $V0 $H0:$B0/brick1;
+EXPECT 'Created' volinfo_field $V0 'Status';
+
+TEST $CLI volume start $V0;
+EXPECT 'Started' volinfo_field $V0 'Status';
+
+logdir=`gluster --print-logdir`
+
+TEST build_tester $(dirname $0)/anonymous_fd_read_write.c -lgf