summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2014-06-20 19:14:12 +0200
committerMichael Adam <obnox@samba.org>2014-06-21 12:42:10 +0200
commitc9cac858d2c844f081510b147d7a79de6a6ec78e (patch)
tree69ea27c4f3266763716f4714ebbd32160357366a
parent159d1dde3a797360a47afa217c360a518034eb4e (diff)
downloadsamba-c9cac858d2c844f081510b147d7a79de6a6ec78e.tar.gz
samba-c9cac858d2c844f081510b147d7a79de6a6ec78e.tar.xz
samba-c9cac858d2c844f081510b147d7a79de6a6ec78e.zip
torture: validate FSCTL_SRV_ENUMERATE_SNAPSHOTS response
Check the NumberOfSnapShotsReturned and SnapShotArraySize fields in the FSCTL_SRV_ENUMERATE_SNAPSHOTS response match expected values. This is a regression test for bso#10549. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source4/torture/rpc/fsrvp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/torture/rpc/fsrvp.c b/source4/torture/rpc/fsrvp.c
index 4a55d28963..85d188ec0d 100644
--- a/source4/torture/rpc/fsrvp.c
+++ b/source4/torture/rpc/fsrvp.c
@@ -551,6 +551,16 @@ static bool test_fsrvp_enum_snaps(struct torture_context *tctx,
*_count = IVAL(io.out.out.data, 0);
+ /* with max_response_size=16, no labels should be sent */
+ torture_assert_int_equal(tctx, IVAL(io.out.out.data, 4), 0,
+ "enum snaps labels");
+
+ /* TODO with 0 snaps, needed_data_count should be 0? */
+ if (*_count != 0) {
+ torture_assert(tctx, IVAL(io.out.out.data, 8) != 0,
+ "enum snaps needed non-zero");
+ }
+
return true;
}