r5308: trimmed back a lot of the old macros from smb_macros.h
[bbaumbach/samba-autobuild/.git] / source4 / torture / torture.c
index 638150e91bc3deedba4d82aa963357763d89763b..6b92bce691caa9fce705d539add2859f12c90152 100644 (file)
@@ -25,6 +25,7 @@
 #include "libcli/raw/libcliraw.h"
 #include "system/time.h"
 #include "system/wait.h"
+#include "system/filesys.h"
 #include "ioctl.h"
 #include "librpc/gen_ndr/ndr_security.h"
 
@@ -174,7 +175,7 @@ NTSTATUS torture_rpc_connection_transport(struct dcerpc_pipe **p,
        status = dcerpc_parse_binding(mem_ctx, binding, &b);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Failed to parse dcerpc binding '%s'\n", binding));
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return status;
        }
 
@@ -526,6 +527,8 @@ static BOOL rw_torture2(struct smbcli_state *c1, struct smbcli_state *c2)
        return correct;
 }
 
+#define BOOLSTR(b) ((b) ? "Yes" : "No")
+
 static BOOL run_readwritetest(void)
 {
        struct smbcli_state *cli1, *cli2;
@@ -2342,6 +2345,7 @@ static struct {
        {"BENCH-HOLDCON",  torture_holdcon, 0},
        {"BENCH-NBENCH",  torture_nbench, 0},
        {"BENCH-TORTURE", NULL, run_torture},
+       {"BENCH-NBT",     torture_bench_nbt, 0},
 
        /* RAW smb tests */
        {"RAW-QFSINFO", torture_raw_qfsinfo, 0},
@@ -2380,6 +2384,7 @@ static struct {
        {"SCAN-CASETABLE", torture_casetable, 0},
        {"SCAN-PIPE_NUMBER", run_pipe_number, 0},
        {"SCAN-IOCTL",  torture_ioctl_test, 0},
+       {"SCAN-RAP",  torture_rap_scan, 0},
 
        /* rpc testers */
         {"RPC-LSA", torture_rpc_lsa, 0},
@@ -2426,6 +2431,10 @@ static struct {
        /* ldap testers */
        {"LDAP-BASIC", torture_ldap_basic, 0},
 
+       /* nbt tests */
+       {"NBT-REGISTER", torture_nbt_register, 0},
+       {"NBT-WINS", torture_nbt_wins, 0},
+
        {NULL, NULL, 0}};
 
 
@@ -2597,7 +2606,7 @@ static BOOL is_binding_string(const char *binding_string)
        
        status = dcerpc_parse_binding(mem_ctx, binding_string, &binding_struct);
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return NT_STATUS_IS_OK(status);
 }