r24894: Run the libnet tests over just one DCE/RPC transport. Other DCE/RPC tests...
authorJelmer Vernooij <jelmer@samba.org>
Sun, 2 Sep 2007 14:09:24 +0000 (14:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:03:31 +0000 (15:03 -0500)
that the DCE/RPC library and interfaces work ok.
(This used to be commit d392d6e92b4145106e073ec4410796e3913320c0)

source4/samba4-knownfail
source4/samba4-skip
source4/selftest/test_net.sh
source4/torture/libnet/libnet_share.c

index 5ef7ad98339498475a15c928ac35b9b4e3dfab00..bd74746f67a14f16cfdf4afa472478bee1c246b3 100644 (file)
@@ -33,3 +33,4 @@ RPC-DRSUAPI.*/DsGetDomainControllerInfo
 RPC-DRSUAPI.*/QuerySitesByCost
 RPC-DRSUAPI.*/DsGetNCChange
 BASE-CHARSET.*/Testing partial surrogate
 RPC-DRSUAPI.*/QuerySitesByCost
 RPC-DRSUAPI.*/DsGetNCChange
 BASE-CHARSET.*/Testing partial surrogate
+.*NET-API-DELSHARE.*                           # DelShare isn't implemented yet
index a0ad0f50dcbbf133a37b6ca7d1fbe0a7367a2af5..2e62bbcf242c57e633152afb18ff96736e34820d 100644 (file)
@@ -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
 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
index e25f695f4750059ef681d9917c3b050bb5d9e135..1721c31b0261a4fd9f0fd0175b846f540442d7ab 100755 (executable)
@@ -2,23 +2,11 @@
 
 # add tests to this list as they start passing, so we test
 # that they stay passing
 
 # 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
 
 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
 done
index b6b0b37d016fc443f774f81398b58843e4c5973f..b1657c0922c6936a0e54c26e0180334517be79af 100644 (file)
@@ -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;
 {
        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;
        
        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);
        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;
 
        libnetctx = libnet_context_init(NULL);
        libnetctx->cred = cmdline_credentials;
@@ -221,22 +216,15 @@ BOOL torture_delshare(struct torture_context *torture)
                                        &p,
                                        &ndr_table_srvsvc);
 
                                        &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;
 
        }
 
        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;
 }
        return ret;
 }