mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
torture3: Test getting a blob as a string
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
1173fed916
commit
aaa6a688cf
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user