summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-04 08:44:50 +0200
committerJeremy Allison <jra@samba.org>2013-09-05 09:16:22 -0700
commitaaa6a688cfc44ca681098a8ee66551689e8894a9 (patch)
treed47c4c7b26e680f21091e8505974619baad49cfe /source3/torture
parent1173fed9165dffb79cfb119b6e80e379a6fd85ba (diff)
downloadsamba-aaa6a688cfc44ca681098a8ee66551689e8894a9.tar.gz
samba-aaa6a688cfc44ca681098a8ee66551689e8894a9.tar.bz2
samba-aaa6a688cfc44ca681098a8ee66551689e8894a9.zip
torture3: Test getting a blob as a string
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 15bb8f3d7f..b18dd99f5c 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -8123,6 +8123,7 @@ static bool run_local_gencache(int dummy)
char *val;
time_t tm;
DATA_BLOB blob;
+ char v;
if (!gencache_set("foo", "bar", time(NULL) + 1000)) {
d_printf("%s: gencache_set() failed\n", __location__);
@@ -8202,6 +8203,20 @@ static bool run_local_gencache(int dummy)
return False;
}
+ v = 1;
+ blob.data = (uint8_t *)&v;
+ blob.length = sizeof(v);
+
+ if (!gencache_set_data_blob("blob", &blob, tm)) {
+ d_printf("%s: gencache_set_data_blob() failed\n",
+ __location__);
+ return false;
+ }
+ if (gencache_get("blob", &val, &tm)) {
+ d_printf("%s: gencache_get succeeded\n", __location__);
+ return false;
+ }
+
return True;
}