diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-02 14:09:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:03:31 -0500 |
commit | ab055fb990e36be37a39a1d3a59788720e7e31e4 (patch) | |
tree | 7504e5b0cc5faaf24ae01b656ec10b6a15b9a778 | |
parent | f1e576cb1232bd855a7645bce40c0afc86900cba (diff) | |
download | samba-ab055fb990e36be37a39a1d3a59788720e7e31e4.tar.gz samba-ab055fb990e36be37a39a1d3a59788720e7e31e4.tar.bz2 samba-ab055fb990e36be37a39a1d3a59788720e7e31e4.zip |
r24894: Run the libnet tests over just one DCE/RPC transport. Other DCE/RPC tests already check
that the DCE/RPC library and interfaces work ok.
(This used to be commit d392d6e92b4145106e073ec4410796e3913320c0)
-rw-r--r-- | source4/samba4-knownfail | 1 | ||||
-rw-r--r-- | source4/samba4-skip | 2 | ||||
-rwxr-xr-x | source4/selftest/test_net.sh | 20 | ||||
-rw-r--r-- | source4/torture/libnet/libnet_share.c | 24 |
4 files changed, 13 insertions, 34 deletions
diff --git a/source4/samba4-knownfail b/source4/samba4-knownfail index 5ef7ad9833..bd74746f67 100644 --- a/source4/samba4-knownfail +++ b/source4/samba4-knownfail @@ -33,3 +33,4 @@ RPC-DRSUAPI.*/DsGetDomainControllerInfo RPC-DRSUAPI.*/QuerySitesByCost RPC-DRSUAPI.*/DsGetNCChange BASE-CHARSET.*/Testing partial surrogate +.*NET-API-DELSHARE.* # DelShare isn't implemented yet diff --git a/source4/samba4-skip b/source4/samba4-skip index a0ad0f50dc..2e62bbcf24 100644 --- a/source4/samba4-skip +++ b/source4/samba4-skip @@ -43,3 +43,5 @@ RPC-INITSHUTDOWN # Not provided by Samba 4 RPC-SVCCTL # Not provided by Samba 4 RPC-ATSVC # Not provided by Samba 4 .*SAMBA3.* # Samba3-specific test +^NET-DOMOPEN$ # Hangs for some reason +^NET-API-BECOME-DC$ # Fails diff --git a/source4/selftest/test_net.sh b/source4/selftest/test_net.sh index e25f695f47..1721c31b02 100755 --- a/source4/selftest/test_net.sh +++ b/source4/selftest/test_net.sh @@ -2,23 +2,11 @@ # add tests to this list as they start passing, so we test # that they stay passing -ncacn_np_tests="NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-LOOKUPPDC NET-API-RPCCONN-BIND NET-API-RPCCONN-SRV NET-API-RPCCONN-PDC NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER NET-API-DOMLIST" -ncalrpc_tests="NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER NET-USERINFO NET-USERADD NET-USERDEL NET-USERMOD NET-API-LOOKUPNAME NET-API-USERINFO NET-API-USERLIST NET-API-DOMOPENLSA NET-API-DOMCLOSELSA NET-API-DOMOPENSAMR NET-API-DOMCLOSESAMR NET-API-DOMLIST" -ncacn_ip_tcp_tests="NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-LOOKUPPDC NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER NET-API-MODIFYUSER NET-API-DOMLIST" - incdir=`dirname $0` . $incdir/test_functions.sh -for bindoptions in seal,padcheck $VALIDATE bigendian; do - for transport in ncalrpc ncacn_np ncacn_ip_tcp; do - case $transport in - ncalrpc) tests=$ncalrpc_tests ;; - ncacn_np) tests=$ncacn_np_tests ;; - ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;; - esac - for t in $tests; do - name="$t on $transport with $bindoptions" - plantest "$name" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" $t "$*" - done - done +tests=`$samba4bindir/smbtorture --list | grep ^NET-` + +for t in $tests; do + plantest "$t" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS "\$SERVER[$VALIDATE]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" $t "$*" done diff --git a/source4/torture/libnet/libnet_share.c b/source4/torture/libnet/libnet_share.c index b6b0b37d01..b1657c0922 100644 --- a/source4/torture/libnet/libnet_share.c +++ b/source4/torture/libnet/libnet_share.c @@ -195,24 +195,19 @@ static BOOL test_addshare(struct dcerpc_pipe *svc_pipe, TALLOC_CTX *mem_ctx, con } -BOOL torture_delshare(struct torture_context *torture) +bool torture_delshare(struct torture_context *torture) { struct dcerpc_pipe *p; struct dcerpc_binding *bind; struct libnet_context* libnetctx; const char *host; - TALLOC_CTX *mem_ctx; NTSTATUS status; BOOL ret = True; struct libnet_DelShare share; - mem_ctx = talloc_init("test_listshares"); host = torture_setting_string(torture, "host", NULL); status = torture_rpc_binding(torture, &bind); - if (!NT_STATUS_IS_OK(status)) { - ret = False; - goto done; - } + torture_assert_ntstatus_ok(torture, status, "Failed to get binding"); libnetctx = libnet_context_init(NULL); libnetctx->cred = cmdline_credentials; @@ -221,22 +216,15 @@ BOOL torture_delshare(struct torture_context *torture) &p, &ndr_table_srvsvc); - if (!test_addshare(p, mem_ctx, host, TEST_SHARENAME)) { - ret = False; - goto done; + if (!test_addshare(p, torture, host, TEST_SHARENAME)) { + return false; } share.in.server_name = bind->host; share.in.share_name = TEST_SHARENAME; - status = libnet_DelShare(libnetctx, mem_ctx, &share); - if (!NT_STATUS_IS_OK(status)) { - ret = False; - goto done; - } + status = libnet_DelShare(libnetctx, torture, &share); + torture_assert_ntstatus_ok(torture, status, "Failed to delete share"); - -done: - talloc_free(mem_ctx); return ret; } |