summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/attr.c6
-rw-r--r--source4/torture/basic/base.c2
-rw-r--r--source4/torture/basic/denytest.c6
-rw-r--r--source4/torture/basic/locking.c4
-rw-r--r--source4/torture/basic/mangle_test.c6
-rw-r--r--source4/torture/basic/misc.c2
-rw-r--r--source4/torture/gentest.c40
-rw-r--r--source4/torture/locktest.c12
-rw-r--r--source4/torture/locktest2.c22
-rw-r--r--source4/torture/nbench/nbio.c22
-rw-r--r--source4/torture/raw/qfileinfo.c40
-rw-r--r--source4/torture/raw/qfsinfo.c12
-rw-r--r--source4/torture/raw/read.c12
-rw-r--r--source4/torture/raw/samba3misc.c8
-rw-r--r--source4/torture/raw/setfileinfo.c6
-rw-r--r--source4/torture/raw/write.c12
-rw-r--r--source4/torture/rpc/echo.c10
-rw-r--r--source4/torture/rpc/lsa.c4
-rw-r--r--source4/torture/rpc/session_key.c2
-rw-r--r--source4/torture/smb2/dir.c14
-rw-r--r--source4/torture/smb2/setinfo.c6
21 files changed, 124 insertions, 124 deletions
diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c
index 6c18e18e4e..49e8a5975c 100644
--- a/source4/torture/basic/attr.c
+++ b/source4/torture/basic/attr.c
@@ -49,7 +49,7 @@ static const uint32_t open_attrs_table[] = {
};
struct trunc_open_results {
- uint_t num;
+ unsigned int num;
uint32_t init_attr;
uint32_t trunc_attr;
uint32_t result_attr;
@@ -91,7 +91,7 @@ bool torture_openattrtest(struct torture_context *tctx,
const char *fname = "\\openattr.file";
int fnum1;
uint16_t attr;
- uint_t i, j, k, l;
+ unsigned int i, j, k, l;
int failures = 0;
for (k = 0, i = 0; i < sizeof(open_attrs_table)/sizeof(uint32_t); i++) {
@@ -163,7 +163,7 @@ bool torture_openattrtest(struct torture_context *tctx,
torture_comment(tctx, "[%d] getatr check failed. [0x%x] trunc [0x%x] got attr 0x%x, should be 0x%x\n",
k, open_attrs_table[i],
open_attrs_table[j],
- (uint_t)attr,
+ (unsigned int)attr,
attr_results[l].result_attr);
CHECK_MAX_FAILURES(error_exit);
}
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index ed389fb9d5..e4b4c62f61 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -568,7 +568,7 @@ static bool rw_torture2(struct torture_context *tctx,
for (i=0;i<torture_numops;i++)
{
- size_t buf_size = ((uint_t)random()%(sizeof(buf)-1))+ 1;
+ size_t buf_size = ((unsigned int)random()%(sizeof(buf)-1))+ 1;
if (i % 10 == 0) {
if (torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "%d\r", i); fflush(stdout);
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 501647eee4..2019ec5a02 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1399,7 +1399,7 @@ static const struct {
};
-static void progress_bar(struct torture_context *tctx, uint_t i, uint_t total)
+static void progress_bar(struct torture_context *tctx, unsigned int i, unsigned int total)
{
if (torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "%5d/%5d\r", i, total);
@@ -2279,8 +2279,8 @@ static bool createx_test_file(struct torture_context *tctx,
/* TODO When redirecting stdout to a file, the progress bar really screws up
* the output. Could use a switch "--noprogress", or direct the progress bar to
* stderr? No other solution? */
-static void createx_progress_bar(struct torture_context *tctx, uint_t i,
- uint_t total, uint_t skipped)
+static void createx_progress_bar(struct torture_context *tctx, unsigned int i,
+ unsigned int total, unsigned int skipped)
{
if (torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "%5d/%5d (%d skipped)\r", i, total,
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c
index 8feea23534..cece543fdd 100644
--- a/source4/torture/basic/locking.c
+++ b/source4/torture/basic/locking.c
@@ -42,7 +42,7 @@ static bool torture_locktest1(struct torture_context *tctx,
const char *fname = BASEDIR "\\lockt1.lck";
int fnum1, fnum2, fnum3;
time_t t1, t2;
- uint_t lock_timeout;
+ unsigned int lock_timeout;
if (!torture_setup_dir(cli1, BASEDIR)) {
return false;
@@ -120,7 +120,7 @@ static bool torture_locktest1(struct torture_context *tctx,
"error: This server appears not to support timed lock requests");
}
torture_comment(tctx, "server slept for %u seconds for a %u second timeout\n",
- (uint_t)(t2-t1), lock_timeout);
+ (unsigned int)(t2-t1), lock_timeout);
torture_assert_ntstatus_ok(tctx, smbcli_close(cli1->tree, fnum2),
talloc_asprintf(tctx, "close1 failed (%s)", smbcli_errstr(cli1->tree)));
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 0d710f2cfe..0f38c9ff03 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -29,7 +29,7 @@ static TDB_CONTEXT *tdb;
#define NAME_LENGTH 20
-static uint_t total, collisions, failures;
+static unsigned int total, collisions, failures;
static bool test_one(struct torture_context *tctx ,struct smbcli_state *cli,
const char *name)
@@ -114,8 +114,8 @@ static bool test_one(struct torture_context *tctx ,struct smbcli_state *cli,
static char *gen_name(TALLOC_CTX *mem_ctx)
{
const char *chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._-$~...";
- uint_t max_idx = strlen(chars);
- uint_t len;
+ unsigned int max_idx = strlen(chars);
+ unsigned int len;
int i;
char *p;
char *name;
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index ab79d798fc..2b08ad2d8a 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -68,7 +68,7 @@ static bool rw_torture(struct torture_context *tctx, struct smbcli_state *c)
generate_random_buffer(buf, sizeof(buf));
for (i=0;i<torture_numops;i++) {
- uint_t n = (uint_t)random()%10;
+ unsigned int n = (unsigned int)random()%10;
if (i % 10 == 0) {
if (torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "%d\r", i);
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index b0ab41cb3d..4b7128f3ab 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -48,9 +48,9 @@ static struct gentest_options {
int analyze;
int analyze_always;
int analyze_continuous;
- uint_t max_open_handles;
- uint_t seed;
- uint_t numops;
+ unsigned int max_open_handles;
+ unsigned int seed;
+ unsigned int numops;
int use_oplocks;
char **ignore_patterns;
const char *seeds_file;
@@ -67,12 +67,12 @@ static struct gentest_options {
/* mapping between open handles on the server and local handles */
static struct {
bool active;
- uint_t instance;
+ unsigned int instance;
struct smb2_handle smb2_handle[NSERVERS]; /* SMB2 */
uint16_t smb_handle[NSERVERS]; /* SMB */
const char *name;
} *open_handles;
-static uint_t num_open_handles;
+static unsigned int num_open_handles;
/* state information for the servers. We open NINSTANCES connections to
each server */
@@ -86,7 +86,7 @@ static struct {
/* the seeds and flags for each operation */
static struct {
- uint_t seed;
+ unsigned int seed;
bool disabled;
} *op_parms;
@@ -111,9 +111,9 @@ static struct {
/* info relevant to the current operation */
static struct {
const char *name;
- uint_t seed;
+ unsigned int seed;
NTSTATUS status;
- uint_t opnum;
+ unsigned int opnum;
TALLOC_CTX *mem_ctx;
const char *mismatch;
} current_op;
@@ -277,9 +277,9 @@ static bool connect_servers(struct tevent_context *ev,
/*
work out the time skew between the servers - be conservative
*/
-static uint_t time_skew(void)
+static unsigned int time_skew(void)
{
- uint_t ret;
+ unsigned int ret;
if (options.smb2) {
ret = labs(servers[0].smb2_tree[0]->session->transport->negotiate.system_time -
servers[1].smb2_tree[0]->session->transport->negotiate.system_time);
@@ -299,9 +299,9 @@ static bool smb2_handle_equal(const struct smb2_handle *h1, const struct smb2_ha
/*
turn a server handle into a local handle
*/
-static uint_t fnum_to_handle_smb2(int server, int instance, struct smb2_handle server_handle)
+static unsigned int fnum_to_handle_smb2(int server, int instance, struct smb2_handle server_handle)
{
- uint_t i;
+ unsigned int i;
for (i=0;i<options.max_open_handles;i++) {
if (!open_handles[i].active ||
instance != open_handles[i].instance) continue;
@@ -317,9 +317,9 @@ static uint_t fnum_to_handle_smb2(int server, int instance, struct smb2_handle s
/*
turn a server handle into a local handle
*/
-static uint_t fnum_to_handle_smb(int server, int instance, uint16_t server_handle)
+static unsigned int fnum_to_handle_smb(int server, int instance, uint16_t server_handle)
{
- uint_t i;
+ unsigned int i;
for (i=0;i<options.max_open_handles;i++) {
if (!open_handles[i].active ||
instance != open_handles[i].instance) continue;
@@ -450,7 +450,7 @@ static void gen_remove_handle_smb(int instance, uint16_t handles[NSERVERS])
/*
return true with 'chance' probability as a percentage
*/
-static bool gen_chance(uint_t chance)
+static bool gen_chance(unsigned int chance)
{
return ((random() % 100) <= chance);
}
@@ -511,7 +511,7 @@ static uint16_t gen_fnum_close(int instance)
*/
static int gen_int_range(uint64_t min, uint64_t max)
{
- uint_t r = random();
+ unsigned int r = random();
return min + (r % (1+max-min));
}
@@ -640,9 +640,9 @@ static uint32_t gen_bits_levels(int nlevels, ...)
/*
generate a bitmask
*/
-static uint32_t gen_bits_mask(uint_t mask)
+static uint32_t gen_bits_mask(unsigned int mask)
{
- uint_t ret = random();
+ unsigned int ret = random();
return ret & mask;
}
@@ -869,9 +869,9 @@ static NTTIME gen_timewarp(void)
/*
generate a file allocation size
*/
-static uint_t gen_alloc_size(void)
+static unsigned int gen_alloc_size(void)
{
- uint_t ret;
+ unsigned int ret;
if (gen_chance(30)) return 0;
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index 12be00f298..17a46a482a 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -33,9 +33,9 @@ static int showall;
static int analyze;
static int hide_unlock_fails;
static int use_oplocks;
-static uint_t lock_range = 100;
-static uint_t lock_base = 0;
-static uint_t min_length = 0;
+static unsigned int lock_range = 100;
+static unsigned int lock_base = 0;
+static unsigned int min_length = 0;
static int exact_error_codes;
static int zero_zero;
@@ -216,8 +216,8 @@ static bool test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS],
int fnum[NSERVERS][NCONNECTIONS][NFILES],
struct record *rec)
{
- uint_t conn = rec->conn;
- uint_t f = rec->f;
+ unsigned int conn = rec->conn;
+ unsigned int f = rec->f;
uint64_t start = rec->start;
uint64_t len = rec->len;
enum brl_type op = rec->lock_type;
@@ -426,7 +426,7 @@ static int test_locks(struct tevent_context *ev,
#endif
recorded[n].conn = random() % NCONNECTIONS;
recorded[n].f = random() % NFILES;
- recorded[n].start = lock_base + ((uint_t)random() % (lock_range-1));
+ recorded[n].start = lock_base + ((unsigned int)random() % (lock_range-1));
recorded[n].len = min_length +
random() % (lock_range-(recorded[n].start-lock_base));
recorded[n].start *= RANGE_MULTIPLE;
diff --git a/source4/torture/locktest2.c b/source4/torture/locktest2.c
index 40b0085881..86f04cc7b0 100644
--- a/source4/torture/locktest2.c
+++ b/source4/torture/locktest2.c
@@ -55,7 +55,7 @@ static bool use_oplocks;
struct record {
char r1, r2;
char conn, f, fstype;
- uint_t start, len;
+ unsigned int start, len;
char needed;
};
@@ -95,7 +95,7 @@ static bool try_close(struct smbcli_state *c, int fstype, int fd)
}
static bool try_lock(struct smbcli_state *c, int fstype,
- int fd, uint_t start, uint_t len,
+ int fd, unsigned int start, unsigned int len,
enum brl_type op)
{
struct flock lock;
@@ -117,7 +117,7 @@ static bool try_lock(struct smbcli_state *c, int fstype,
}
static bool try_unlock(struct smbcli_state *c, int fstype,
- int fd, uint_t start, uint_t len)
+ int fd, unsigned int start, unsigned int len)
{
struct flock lock;
@@ -228,13 +228,13 @@ static bool test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS],
int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES],
struct record *rec)
{
- uint_t conn = rec->conn;
- uint_t f = rec->f;
- uint_t fstype = rec->fstype;
- uint_t start = rec->start;
- uint_t len = rec->len;
- uint_t r1 = rec->r1;
- uint_t r2 = rec->r2;
+ unsigned int conn = rec->conn;
+ unsigned int f = rec->f;
+ unsigned int fstype = rec->fstype;
+ unsigned int start = rec->start;
+ unsigned int len = rec->len;
+ unsigned int r1 = rec->r1;
+ unsigned int r2 = rec->r2;
enum brl_type op;
int server;
bool ret[NSERVERS];
@@ -384,7 +384,7 @@ static void test_locks(TALLOC_CTX *mem_ctx, char *share1, char *share2,
recorded[n].conn = random() % NCONNECTIONS;
recorded[n].fstype = random() % NUMFSTYPES;
recorded[n].f = random() % NFILES;
- recorded[n].start = LOCKBASE + ((uint_t)random() % (LOCKRANGE-1));
+ recorded[n].start = LOCKBASE + ((unsigned int)random() % (LOCKRANGE-1));
recorded[n].len = 1 +
random() % (LOCKRANGE-(recorded[n].start-LOCKBASE));
recorded[n].start *= RANGE_MULTIPLE;
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c
index 2c9e568003..fa8155e2c3 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -46,8 +46,8 @@ struct lock_info {
struct createx_params {
char *fname;
- uint_t create_options;
- uint_t create_disposition;
+ unsigned int create_options;
+ unsigned int create_disposition;
int handle;
};
@@ -72,8 +72,8 @@ static struct {
static bool nb_do_createx(struct ftable *f,
const char *fname,
- uint_t create_options,
- uint_t create_disposition,
+ unsigned int create_options,
+ unsigned int create_disposition,
int handle,
NTSTATUS status,
bool retry);
@@ -82,8 +82,8 @@ static bool nb_do_lockx(bool relock, int handle, off_t offset, int size, NTSTATU
static void nb_set_createx_params(struct ftable *f,
const char *fname,
- uint_t create_options,
- uint_t create_disposition,
+ unsigned int create_options,
+ unsigned int create_disposition,
int handle)
{
struct createx_params *cp = &f->cp;
@@ -455,8 +455,8 @@ bool nb_unlink(const char *fname, int attr, NTSTATUS status, bool retry)
static bool nb_do_createx(struct ftable *f,
const char *fname,
- uint_t create_options,
- uint_t create_disposition,
+ unsigned int create_options,
+ unsigned int create_disposition,
int handle,
NTSTATUS status,
bool retry)
@@ -465,7 +465,7 @@ static bool nb_do_createx(struct ftable *f,
uint32_t desired_access;
NTSTATUS ret;
TALLOC_CTX *mem_ctx;
- uint_t flags = 0;
+ unsigned int flags = 0;
mem_ctx = talloc_init("raw_open");
@@ -531,7 +531,7 @@ static bool nb_do_createx(struct ftable *f,
}
bool nb_createx(const char *fname,
- uint_t create_options, uint_t create_disposition, int handle,
+ unsigned int create_options, unsigned int create_disposition, int handle,
NTSTATUS status)
{
return nb_do_createx(NULL, fname, create_options, create_disposition, handle, status, false);
@@ -664,7 +664,7 @@ bool nb_lockx(int handle, off_t offset, int size, NTSTATUS status)
return nb_do_lockx(false, handle, offset, size, status);
}
-bool nb_unlockx(int handle, uint_t offset, int size, NTSTATUS status)
+bool nb_unlockx(int handle, unsigned int offset, int size, NTSTATUS status)
{
union smb_lock io;
int i;
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index 032df87a4d..86cae383ff 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -29,10 +29,10 @@
static struct {
const char *name;
enum smb_fileinfo_level level;
- uint_t only_paths:1;
- uint_t only_handles:1;
+ unsigned int only_paths:1;
+ unsigned int only_handles:1;
uint32_t capability_mask;
- uint_t expected_ipc_access_denied:1;
+ unsigned int expected_ipc_access_denied:1;
NTSTATUS expected_ipc_fnum_status;
NTSTATUS fnum_status, fname_status;
union smb_fileinfo fnum_finfo, fname_finfo;
@@ -182,8 +182,8 @@ static union smb_fileinfo *fname_find(bool is_ipc, const char *name)
/* local macros to make the code below more readable */
#define VAL_EQUAL(n1, v1, n2, v2) do {if (s1->n1.out.v1 != s2->n2.out.v2) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
- #n1, #v1, (uint_t)s1->n1.out.v1, \
- #n2, #v2, (uint_t)s2->n2.out.v2, \
+ #n1, #v1, (unsigned int)s1->n1.out.v1, \
+ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
@@ -211,8 +211,8 @@ static union smb_fileinfo *fname_find(bool is_ipc, const char *name)
#define VAL_UNKNOWN(n1, v1) do {if (s1->n1.out.v1 != 0) { \
printf("%s/%s non-zero unknown - %u (0x%x) at %s(%d)\n", \
#n1, #v1, \
- (uint_t)s1->n1.out.v1, \
- (uint_t)s1->n1.out.v1, \
+ (unsigned int)s1->n1.out.v1, \
+ (unsigned int)s1->n1.out.v1, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
@@ -529,21 +529,21 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find(sname); \
if (s1 && s1->stype.out.tfield != correct_size) { \
printf("(%d) handle %s/%s incorrect - %u should be %u\n", __LINE__, #stype, #tfield, \
- (uint_t)s1->stype.out.tfield, \
- (uint_t)correct_size); \
+ (unsigned int)s1->stype.out.tfield, \
+ (unsigned int)correct_size); \
ret = false; \
} \
s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != correct_size) { \
printf("(%d) path %s/%s incorrect - %u should be %u\n", __LINE__, #stype, #tfield, \
- (uint_t)s1->stype.out.tfield, \
- (uint_t)correct_size); \
+ (unsigned int)s1->stype.out.tfield, \
+ (unsigned int)correct_size); \
ret = false; \
}} while (0)
s1 = fnum_find("STANDARD_INFO");
correct_size = s1->standard_info.out.size;
- torture_comment(torture, "size: %u\n", (uint_t)correct_size);
+ torture_comment(torture, "size: %u\n", (unsigned int)correct_size);
SIZE_CHECK("GETATTR", getattr, size);
SIZE_CHECK("GETATTRE", getattre, size);
@@ -564,7 +564,7 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find("STANDARD_INFO");
correct_size = s1->standard_info.out.alloc_size;
- torture_comment(torture, "alloc_size: %u\n", (uint_t)correct_size);
+ torture_comment(torture, "alloc_size: %u\n", (unsigned int)correct_size);
SIZE_CHECK("GETATTRE", getattre, alloc_size);
SIZE_CHECK("STANDARD", standard, alloc_size);
@@ -583,21 +583,21 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find(sname); \
if (s1 && s1->stype.out.tfield != correct_attrib) { \
printf("(%d) handle %s/%s incorrect - 0x%x should be 0x%x\n", __LINE__, #stype, #tfield, \
- (uint_t)s1->stype.out.tfield, \
- (uint_t)correct_attrib); \
+ (unsigned int)s1->stype.out.tfield, \
+ (unsigned int)correct_attrib); \
ret = false; \
} \
s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != correct_attrib) { \
printf("(%d) path %s/%s incorrect - 0x%x should be 0x%x\n", __LINE__, #stype, #tfield, \
- (uint_t)s1->stype.out.tfield, \
- (uint_t)correct_attrib); \
+ (unsigned int)s1->stype.out.tfield, \
+ (unsigned int)correct_attrib); \
ret = false; \
}} while (0)
s1 = fnum_find("BASIC_INFO");
correct_attrib = s1->basic_info.out.attrib;
- torture_comment(torture, "attrib: 0x%x\n", (uint_t)correct_attrib);
+ torture_comment(torture, "attrib: 0x%x\n", (unsigned int)correct_attrib);
ATTRIB_CHECK("GETATTR", getattr, attrib);
if (!is_ipc) {
@@ -825,13 +825,13 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
if (s1 && s1->stype.out.tfield != 0) { \
printf("(%d) handle %s/%s unknown != 0 (0x%x)\n", __LINE__, \
#stype, #tfield, \
- (uint_t)s1->stype.out.tfield); \
+ (unsigned int)s1->stype.out.tfield); \
} \
s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != 0) { \
printf("(%d) path %s/%s unknown != 0 (0x%x)\n", __LINE__, \
#stype, #tfield, \
- (uint_t)s1->stype.out.tfield); \
+ (unsigned int)s1->stype.out.tfield); \
}} while (0)
#endif
/* now get a bit fancier .... */
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c
index e4492a5312..111eac14d5 100644
--- a/source4/torture/raw/qfsinfo.c
+++ b/source4/torture/raw/qfsinfo.c
@@ -69,16 +69,16 @@ static union smb_fsinfo *find(const char *name)
/* local macros to make the code below more readable */
#define VAL_EQUAL(n1, v1, n2, v2) do {if (s1->n1.out.v1 != s2->n2.out.v2) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
- #n1, #v1, (uint_t)s1->n1.out.v1, \
- #n2, #v2, (uint_t)s2->n2.out.v2, \
+ #n1, #v1, (unsigned int)s1->n1.out.v1, \
+ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
#define VAL_APPROX_EQUAL(n1, v1, n2, v2) do {if (abs((int)(s1->n1.out.v1) - (int)(s2->n2.out.v2)) > 0.1*s1->n1.out.v1) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
- #n1, #v1, (uint_t)s1->n1.out.v1, \
- #n2, #v2, (uint_t)s2->n2.out.v2, \
+ #n1, #v1, (unsigned int)s1->n1.out.v1, \
+ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
@@ -105,8 +105,8 @@ static union smb_fsinfo *find(const char *name)
#define VAL_UNKNOWN(n1, v1) do {if (s1->n1.out.v1 != 0) { \
printf("%s/%s non-zero unknown - %u (0x%x) at %s(%d)\n", \
#n1, #v1, \
- (uint_t)s1->n1.out.v1, \
- (uint_t)s1->n1.out.v1, \
+ (unsigned int)s1->n1.out.v1, \
+ (unsigned int)s1->n1.out.v1, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index efdd040451..430f09be54 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -52,7 +52,7 @@
/*
setup a random buffer based on a seed
*/
-static void setup_buffer(uint8_t *buf, uint_t seed, int len)
+static void setup_buffer(uint8_t *buf, unsigned int seed, int len)
{
int i;
srandom(seed);
@@ -62,7 +62,7 @@ static void setup_buffer(uint8_t *buf, uint_t seed, int len)
/*
check a random buffer based on a seed
*/
-static bool check_buffer(uint8_t *buf, uint_t seed, int len, int line)
+static bool check_buffer(uint8_t *buf, unsigned int seed, int len, int line)
{
int i;
srandom(seed);
@@ -90,7 +90,7 @@ static bool test_read(struct torture_context *tctx, struct smbcli_state *cli)
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
buf = talloc_zero_array(tctx, uint8_t, maxsize);
@@ -222,7 +222,7 @@ static bool test_lockread(struct torture_context *tctx,
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
if (!cli->transport->negotiate.lockread_supported) {
printf("Server does not support lockread - skipping\n");
@@ -372,7 +372,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
buf = talloc_zero_array(tctx, uint8_t, maxsize);
@@ -655,7 +655,7 @@ static bool test_readbraw(struct torture_context *tctx,
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
if (!cli->transport->negotiate.readbraw_supported) {
printf("Server does not support readbraw - skipping\n");
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 2e85a34761..ca2254b634 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -162,8 +162,8 @@ bool torture_samba3_checkfsp(struct torture_context *torture)
static NTSTATUS raw_smbcli_open(struct smbcli_tree *tree, const char *fname, int flags, int share_mode, int *fnum)
{
union smb_open open_parms;
- uint_t openfn=0;
- uint_t accessmode=0;
+ unsigned int openfn=0;
+ unsigned int accessmode=0;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
@@ -225,8 +225,8 @@ static NTSTATUS raw_smbcli_open(struct smbcli_tree *tree, const char *fname, int
static NTSTATUS raw_smbcli_t2open(struct smbcli_tree *tree, const char *fname, int flags, int share_mode, int *fnum)
{
union smb_open io;
- uint_t openfn=0;
- uint_t accessmode=0;
+ unsigned int openfn=0;
+ unsigned int accessmode=0;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 1f8adfbe9a..8b540b2b61 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -144,7 +144,7 @@ torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && finfo2.stype.out.field != value) { \
printf("(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \
- (uint_t)value, (uint_t)finfo2.stype.out.field); \
+ (unsigned int)value, (unsigned int)finfo2.stype.out.field); \
dump_all_info(torture, &finfo1); \
ret = false; \
}} while (0)
@@ -154,8 +154,8 @@ torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && nt_time_to_unix(finfo2.stype.out.field) != value) { \
printf("(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \
- (uint_t)value, \
- (uint_t)nt_time_to_unix(finfo2.stype.out.field)); \
+ (unsigned int)value, \
+ (unsigned int)nt_time_to_unix(finfo2.stype.out.field)); \
printf("\t%s", timestring(torture, value)); \
printf("\t%s\n", nt_time_string(torture, finfo2.stype.out.field)); \
dump_all_info(torture, &finfo1); \
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index ff82dc19d8..a1fde16611 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -66,7 +66,7 @@
/*
setup a random buffer based on a seed
*/
-static void setup_buffer(uint8_t *buf, uint_t seed, int len)
+static void setup_buffer(uint8_t *buf, unsigned int seed, int len)
{
int i;
srandom(seed);
@@ -76,7 +76,7 @@ static void setup_buffer(uint8_t *buf, uint_t seed, int len)
/*
check a random buffer based on a seed
*/
-static bool check_buffer(uint8_t *buf, uint_t seed, int len, const char *location)
+static bool check_buffer(uint8_t *buf, unsigned int seed, int len, const char *location)
{
int i;
srandom(seed);
@@ -104,7 +104,7 @@ static bool test_write(struct torture_context *tctx,
uint8_t *buf;
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize);
@@ -232,7 +232,7 @@ static bool test_writex(struct torture_context *tctx,
uint8_t *buf;
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
union smb_fileinfo finfo;
int max_bits=63;
@@ -420,7 +420,7 @@ static bool test_writeunlock(struct torture_context *tctx,
uint8_t *buf;
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize);
@@ -568,7 +568,7 @@ static bool test_writeclose(struct torture_context *tctx,
uint8_t *buf;
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize);
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 4fd2694926..043b386efd 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -268,19 +268,19 @@ static bool test_sleep(struct torture_context *tctx,
talloc_asprintf(tctx, "TestSleep(%d) failed", i));
torture_assert(tctx, r[i].out.result == r[i].in.seconds,
talloc_asprintf(tctx, "Failed - Asked to sleep for %u seconds (server replied with %u seconds and the reply takes only %u seconds)",
- r[i].out.result, r[i].in.seconds, (uint_t)diff[i].tv_sec));
+ r[i].out.result, r[i].in.seconds, (unsigned int)diff[i].tv_sec));
torture_assert(tctx, r[i].out.result <= rounded_tdiff,
talloc_asprintf(tctx, "Failed - Slept for %u seconds (but reply takes only %u.%06u seconds)",
- r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec));
+ r[i].out.result, (unsigned int)diff[i].tv_sec, (unsigned int)diff[i].tv_usec));
if (r[i].out.result+1 == rounded_tdiff) {
torture_comment(tctx, "Slept for %u seconds (but reply takes %u.%06u seconds - busy server?)\n",
- r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec);
+ r[i].out.result, (unsigned int)diff[i].tv_sec, (unsigned int)diff[i].tv_usec);
} else if (r[i].out.result == rounded_tdiff) {
torture_comment(tctx, "Slept for %u seconds (reply takes %u.%06u seconds - ok)\n",
- r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec);
+ r[i].out.result, (unsigned int)diff[i].tv_sec, (unsigned int)diff[i].tv_usec);
} else {
torture_comment(tctx, "(Failed) - Not async - Slept for %u seconds (but reply takes %u.%06u seconds)",
- r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec);
+ r[i].out.result, (unsigned int)diff[i].tv_sec, (unsigned int)diff[i].tv_usec);
/* TODO: let the test fail here, when we support async rpc on ncacn_np */
}
}
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index cff42a2aab..22fb28f076 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -1219,8 +1219,8 @@ static bool test_CreateSecret(struct dcerpc_pipe *p,
const int LOCAL = 0;
const int GLOBAL = 1;
- secname[LOCAL] = talloc_asprintf(tctx, "torturesecret-%u", (uint_t)random());
- secname[GLOBAL] = talloc_asprintf(tctx, "G$torturesecret-%u", (uint_t)random());
+ secname[LOCAL] = talloc_asprintf(tctx, "torturesecret-%u", (unsigned int)random());
+ secname[GLOBAL] = talloc_asprintf(tctx, "G$torturesecret-%u", (unsigned int)random());
for (i=0; i< 2; i++) {
torture_comment(tctx, "\nTesting CreateSecret of %s\n", secname[i]);
diff --git a/source4/torture/rpc/session_key.c b/source4/torture/rpc/session_key.c
index d0a2009fd1..a0bd40124d 100644
--- a/source4/torture/rpc/session_key.c
+++ b/source4/torture/rpc/session_key.c
@@ -52,7 +52,7 @@ static bool test_CreateSecret_basic(struct dcerpc_pipe *p,
char *secret2;
char *secname;
- secname = talloc_asprintf(tctx, "torturesecret-%u", (uint_t)random());
+ secname = talloc_asprintf(tctx, "torturesecret-%u", (unsigned int)random());
torture_comment(tctx, "Testing CreateSecret of %s\n", secname);
diff --git a/source4/torture/smb2/dir.c b/source4/torture/smb2/dir.c
index 4af6900a81..8c3cb76336 100644
--- a/source4/torture/smb2/dir.c
+++ b/source4/torture/smb2/dir.c
@@ -108,7 +108,7 @@ static bool test_find(struct torture_context *tctx,
struct file_elem files[NFILES] = {};
NTSTATUS status;
bool ret = true;
- uint_t count;
+ unsigned int count;
int i, j, file_count = 0;
status = populate_tree(tctx, mem_ctx, tree, files, NFILES, &h);
@@ -193,7 +193,7 @@ static bool test_fixed(struct torture_context *tctx,
struct file_elem files[NFILES] = {};
NTSTATUS status;
bool ret = true;
- uint_t count;
+ unsigned int count;
int i;
status = populate_tree(tctx, mem_ctx, tree, files, NFILES, &h);
@@ -360,7 +360,7 @@ static union smb_search_data *find(const char *name)
static bool fill_level_data(TALLOC_CTX *mem_ctx,
union smb_search_data *data,
union smb_search_data *d,
- uint_t count,
+ unsigned int count,
uint8_t level,
enum smb_search_data_level data_level)
{
@@ -385,7 +385,7 @@ NTSTATUS torture_single_file_search(struct smb2_tree *tree,
enum smb_search_data_level data_level,
int idx,
union smb_search_data *d,
- uint_t *count,
+ unsigned int *count,
struct smb2_handle *h)
{
struct smb2_find f;
@@ -416,7 +416,7 @@ static bool test_one_file(struct torture_context *tctx,
const char *fname = "torture_search.txt";
NTSTATUS status;
int i;
- uint_t count;
+ unsigned int count;
union smb_fileinfo all_info2, alt_info, internal_info;
union smb_search_data *s;
union smb_search_data d;
@@ -671,7 +671,7 @@ static NTSTATUS multiple_smb2_search(struct smb2_tree *tree,
{
struct smb2_find f;
bool ret = true;
- uint_t count = 0;
+ unsigned int count = 0;
union smb_search_data *d;
NTSTATUS status;
struct multiple_result *result = (struct multiple_result *)data;
@@ -895,7 +895,7 @@ static bool test_modify_search(struct torture_context *tctx,
NTSTATUS status;
bool ret = true;
int i;
- uint_t count;
+ unsigned int count;
smb2_deltree(tree, DNAME);
diff --git a/source4/torture/smb2/setinfo.c b/source4/torture/smb2/setinfo.c
index 38642a673d..04b64fd632 100644
--- a/source4/torture/smb2/setinfo.c
+++ b/source4/torture/smb2/setinfo.c
@@ -117,7 +117,7 @@ bool torture_smb2_setinfo(struct torture_context *tctx)
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && finfo2.stype.out.field != value) { \
torture_result(tctx, TORTURE_FAIL, "(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \
- (uint_t)value, (uint_t)finfo2.stype.out.field); \
+ (unsigned int)value, (unsigned int)finfo2.stype.out.field); \
torture_smb2_all_info(tree, handle); \
ret = false; \
goto done; \
@@ -128,8 +128,8 @@ bool torture_smb2_setinfo(struct torture_context *tctx)
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && nt_time_to_unix(finfo2.stype.out.field) != value) { \
torture_result(tctx, TORTURE_FAIL, "(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \
- (uint_t)value, \
- (uint_t)nt_time_to_unix(finfo2.stype.out.field)); \
+ (unsigned int)value, \
+ (unsigned int)nt_time_to_unix(finfo2.stype.out.field)); \
torture_warning(tctx, "\t%s", timestring(tctx, value)); \
torture_warning(tctx, "\t%s\n", nt_time_string(tctx, finfo2.stype.out.field)); \
torture_smb2_all_info(tree, handle); \