diff options
author | Günther Deschner <gd@samba.org> | 2011-03-02 10:57:26 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-03-02 12:12:32 +0100 |
commit | bd675e0b1502564b16a23d544f23762990849f5f (patch) | |
tree | 0367824228c8a4639b1b89d8d4201b888b7f6351 /source4/torture | |
parent | c884e622fae971a0ea35a1d59e4d5a14bcdf9dd3 (diff) | |
download | samba-bd675e0b1502564b16a23d544f23762990849f5f.tar.gz samba-bd675e0b1502564b16a23d544f23762990849f5f.tar.bz2 samba-bd675e0b1502564b16a23d544f23762990849f5f.zip |
s4-smbtorture: add netsessionenum rap torture test.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rap/rap.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c index 8d70b2cf70..ae505b9e31 100644 --- a/source4/torture/rap/rap.c +++ b/source4/torture/rap/rap.c @@ -1609,6 +1609,29 @@ static NTSTATUS smbcli_rap_netsessionenum(struct smbcli_tree *tree, return result; } +static bool test_netsessionenum(struct torture_context *tctx, + struct smbcli_state *cli) +{ + struct rap_NetSessionEnum r; + int i; + uint16_t levels[] = { 2 }; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + r.in.level = levels[i]; + r.in.bufsize = 8192; + + torture_comment(tctx, + "Testing rap_NetSessionEnum level %d\n", r.in.level); + + torture_assert_ntstatus_ok(tctx, + smbcli_rap_netsessionenum(cli->tree, tctx, &r), + "smbcli_rap_netsessionenum failed"); + } + + return true; +} + bool torture_rap_scan(struct torture_context *torture, struct smbcli_state *cli) { int callno; @@ -1644,6 +1667,8 @@ NTSTATUS torture_rap_init(void) test_netshareenum); torture_suite_add_1smb_test(suite_basic, "netservergetinfo", test_netservergetinfo); + torture_suite_add_1smb_test(suite_basic, "netsessionenum", + test_netsessionenum); torture_suite_add_1smb_test(suite, "scan", torture_rap_scan); |