From 3067ec21fb34f46fd1683aad6d455e7d6da8f52e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 12 Apr 2002 03:26:19 +0000 Subject: - added a mangling test suite that measures the collision rate on randomised filenames - fixed several mangling bugs that the test suite pointed out (This used to be commit 858fa7efc34f6e7cdf8500900aed3f7943c91348) --- source3/torture/mangle_test.c | 162 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 source3/torture/mangle_test.c (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c new file mode 100644 index 0000000000..9024925beb --- /dev/null +++ b/source3/torture/mangle_test.c @@ -0,0 +1,162 @@ +/* + Unix SMB/CIFS implementation. + SMB torture tester - mangling test + Copyright (C) Andrew Tridgell 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" + +static TDB_CONTEXT *tdb; + +#define NAME_LENGTH 30 + +static unsigned total, collisions; + +static BOOL test_one(struct cli_state *cli, const char *name) +{ + int fnum; + fstring shortname; + fstring name2; + NTSTATUS status; + TDB_DATA data; + + total++; + + fnum = cli_open(cli, name, O_RDWR|O_CREAT|O_EXCL, DENY_NONE); + if (fnum == -1) { + printf("open of %s failed (%s)\n", name, cli_errstr(cli)); + return False; + } + + if (!cli_close(cli, fnum)) { + printf("close of %s failed (%s)\n", name, cli_errstr(cli)); + return False; + } + + /* get the short name */ + status = cli_qpathinfo_alt_name(cli, name, shortname); + if (!NT_STATUS_IS_OK(status)) { + printf("query altname of %s failed (%s)\n", name, cli_errstr(cli)); + return False; + } + + snprintf(name2, sizeof(name2), "\\mangle_test\\%s", shortname); + if (!cli_unlink(cli, name2)) { + printf("unlink of %s (%s) failed (%s)\n", + name2, name, cli_errstr(cli)); + return False; + } + + /* see if the short name is already in the tdb */ + data = tdb_fetch_by_string(tdb, shortname); + if (data.dptr) { + /* maybe its a duplicate long name? */ + if (strcasecmp(name, data.dptr) != 0) { + /* we have a collision */ + collisions++; + printf("Collision between %s and %s -> %s\n", + name, data.dptr, shortname); + } + free(data.dptr); + } else { + /* store it for later */ + tdb_store_by_string(tdb, shortname, name, strlen(name)+1); + } + + return True; +} + + +static void gen_name(char *name) +{ + const char *chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._-$~"; + unsigned max_idx = strlen(chars); + unsigned len; + int i; + char *p; + + fstrcpy(name, "\\mangle_test\\"); + p = name + strlen(name); + + len = 1 + random() % NAME_LENGTH; + + for (i=0;i Date: Fri, 12 Apr 2002 03:42:44 +0000 Subject: better mangling test. We now test that we can create by long name and delete by short name, and that we can create by short name and delete by long name our old mangling code fails this test. also tweaked the random filename generation to produce more likely collisions (This used to be commit 65609c52960c2b5938150a2fdb5290541f4e0225) --- source3/torture/mangle_test.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 9024925beb..7f05b953c5 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -22,7 +22,7 @@ static TDB_CONTEXT *tdb; -#define NAME_LENGTH 30 +#define NAME_LENGTH 20 static unsigned total, collisions; @@ -61,6 +61,24 @@ static BOOL test_one(struct cli_state *cli, const char *name) return False; } + /* recreate by short name */ + fnum = cli_open(cli, name2, O_RDWR|O_CREAT|O_EXCL, DENY_NONE); + if (fnum == -1) { + printf("open2 of %s failed (%s)\n", name2, cli_errstr(cli)); + return False; + } + if (!cli_close(cli, fnum)) { + printf("close of %s failed (%s)\n", name, cli_errstr(cli)); + return False; + } + + /* and unlink by long name */ + if (!cli_unlink(cli, name)) { + printf("unlink2 of %s (%s) failed (%s)\n", + name, name2, cli_errstr(cli)); + return False; + } + /* see if the short name is already in the tdb */ data = tdb_fetch_by_string(tdb, shortname); if (data.dptr) { @@ -83,7 +101,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) static void gen_name(char *name) { - const char *chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._-$~"; + const char *chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._-$~..."; unsigned max_idx = strlen(chars); unsigned len; int i; @@ -103,6 +121,19 @@ static void gen_name(char *name) if (strcmp(p, ".") == 0 || strcmp(p, "..") == 0) { p[0] = '_'; } + + /* have a high probability of a common lead char */ + if (random() % 2 == 0) { + p[0] = 'A'; + } + + /* and a high probability of a good extension length */ + if (random() % 2 == 0) { + char *s = strrchr(p, '.'); + if (s) { + s[4] = 0; + } + } } -- cgit From 71c2943d34e6a30819d7c36d7c1d5d5eab2eb968 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 12 Apr 2002 03:54:13 +0000 Subject: nicer measurement of failures and collisions (This used to be commit 61c61f6b4f22c1ef6f837145f5e05730706cc8d4) --- source3/torture/mangle_test.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 7f05b953c5..2d5b3610d5 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -24,7 +24,7 @@ static TDB_CONTEXT *tdb; #define NAME_LENGTH 20 -static unsigned total, collisions; +static unsigned total, collisions, failures; static BOOL test_one(struct cli_state *cli, const char *name) { @@ -76,7 +76,9 @@ static BOOL test_one(struct cli_state *cli, const char *name) if (!cli_unlink(cli, name)) { printf("unlink2 of %s (%s) failed (%s)\n", name, name2, cli_errstr(cli)); - return False; + failures++; + cli_unlink(cli, name2); + return True; } /* see if the short name is already in the tdb */ @@ -127,6 +129,11 @@ static void gen_name(char *name) p[0] = 'A'; } + /* and a medium probability of a common lead string */ + if (random() % 10 == 0) { + strncpy(p, "ABCDE", 5); + } + /* and a high probability of a good extension length */ if (random() % 2 == 0) { char *s = strrchr(p, '.'); @@ -173,21 +180,22 @@ BOOL torture_mangle(int dummy) break; } if (total && total % 100 == 0) { - printf("collisions %u/%u - %.2f%%\r", - collisions, total, (100.0*collisions) / total); + printf("collisions %u/%u - %.2f%% (%u failures)\r", + collisions, total, (100.0*collisions) / total, failures); } } + cli_unlink(&cli, "\\mangle_test\\*"); if (!cli_rmdir(&cli, "\\mangle_test")) { printf("ERROR: Failed to remove directory\n"); return False; } - printf("\nTotal collisions %u/%u - %.2f%%\n", - collisions, total, (100.0*collisions) / total); + printf("\nTotal collisions %u/%u - %.2f%% (%u failures)\n", + collisions, total, (100.0*collisions) / total, failures); torture_close_connection(&cli); printf("mangle test finished\n"); - return True; + return (failures == 0); } -- cgit From e90b65284812aaa5ff9e9935ce9bbad7791cbbcd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 10:35:28 +0000 Subject: updated the 3.0 branch from the head branch - ready for alpha18 (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce) --- source3/torture/mangle_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 2d5b3610d5..ced0185c95 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -88,8 +88,9 @@ static BOOL test_one(struct cli_state *cli, const char *name) if (strcasecmp(name, data.dptr) != 0) { /* we have a collision */ collisions++; - printf("Collision between %s and %s -> %s\n", - name, data.dptr, shortname); + printf("Collision between %s and %s -> %s " + " (coll/tot: %u/%u)\n", + name, data.dptr, shortname, collisions, total); } free(data.dptr); } else { -- cgit From f3054fd405c6ad2c9c15d11ac276b502bcca7289 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Thu, 7 Nov 2002 15:32:48 +0000 Subject: Fix the build. Build farm! Build farm! Please check the build farm! ...or at least run make torture. (This used to be commit 36545ee9a78146fa03d27fed6c7184d5fdadb2ab) --- source3/torture/mangle_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index ced0185c95..6d127a918e 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -94,8 +94,11 @@ static BOOL test_one(struct cli_state *cli, const char *name) } free(data.dptr); } else { + TDB_DATA namedata; /* store it for later */ - tdb_store_by_string(tdb, shortname, name, strlen(name)+1); + namedata.dptr = name; + namedata.dsize = strlen(name)+1; + tdb_store_by_string(tdb, shortname, namedata, TDB_REPLACE); } return True; -- cgit From 2206df6b30c4992daa17257287390421cfc0662d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 23 Apr 2003 08:12:34 +0000 Subject: Merge torture tests from HEAD - it looks like we had rather an incomplete merge last time. I hope this might fix a few failures on the build farm too. Andrew Bartlett (This used to be commit 0c837126923cc30fa60223a5a68d4f527971cc7b) --- source3/torture/mangle_test.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 6d127a918e..e4ccfc1b83 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -107,7 +107,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) static void gen_name(char *name) { - const char *chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._-$~..."; + const char *chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._-$~... "; unsigned max_idx = strlen(chars); unsigned len; int i; @@ -135,7 +135,12 @@ static void gen_name(char *name) /* and a medium probability of a common lead string */ if (random() % 10 == 0) { - strncpy(p, "ABCDE", 5); + if (strlen(p) <= 5) { + fstrcpy(p, "ABCDE"); + } else { + /* try not to kill off the null termination */ + memcpy(p, "ABCDE", 5); + } } /* and a high probability of a good extension length */ @@ -151,8 +156,9 @@ static void gen_name(char *name) BOOL torture_mangle(int dummy) { extern int torture_numops; - static struct cli_state cli; + static struct cli_state *cli; int i; + BOOL ret = True; printf("starting mangle test\n"); @@ -167,20 +173,22 @@ BOOL torture_mangle(int dummy) return False; } - cli_unlink(&cli, "\\mangle_test\\*"); - cli_rmdir(&cli, "\\mangle_test"); + cli_unlink(cli, "\\mangle_test\\*"); + cli_rmdir(cli, "\\mangle_test"); - if (!cli_mkdir(&cli, "\\mangle_test")) { + if (!cli_mkdir(cli, "\\mangle_test")) { printf("ERROR: Failed to make directory\n"); return False; } for (i=0;i Date: Thu, 10 Jul 2003 20:37:01 +0000 Subject: i guess i'm the only one this ever annyoed... fix the confusion when we tdb_lock_bystring() but we retrieve an entry using tdb_fetch_by_string. It's now always tdb.*bystring() (This used to be commit 66359531b89368939f0e8f584a45844b5f2f99e7) --- source3/torture/mangle_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index e4ccfc1b83..660d4d17af 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -82,7 +82,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) } /* see if the short name is already in the tdb */ - data = tdb_fetch_by_string(tdb, shortname); + data = tdb_fetch_bystring(tdb, shortname); if (data.dptr) { /* maybe its a duplicate long name? */ if (strcasecmp(name, data.dptr) != 0) { @@ -98,7 +98,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) /* store it for later */ namedata.dptr = name; namedata.dsize = strlen(name)+1; - tdb_store_by_string(tdb, shortname, namedata, TDB_REPLACE); + tdb_store_bystring(tdb, shortname, namedata, TDB_REPLACE); } return True; -- cgit From 3a5dc7c2ecacecf7dd0cfd71ff1bb298d70b391b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Jul 2003 12:33:59 +0000 Subject: convert snprintf() calls using pstrings & fstrings to pstr_sprintf() and fstr_sprintf() to try to standardize. lots of snprintf() calls were using len-1; some were using len. At least this helps to be consistent. (This used to be commit 9f835b85dd38cbe655eb19021ff763f31886ac00) --- source3/torture/mangle_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 660d4d17af..9a719349b6 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -54,7 +54,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) return False; } - snprintf(name2, sizeof(name2), "\\mangle_test\\%s", shortname); + fstr_sprintf(name2, "\\mangle_test\\%s", shortname); if (!cli_unlink(cli, name2)) { printf("unlink of %s (%s) failed (%s)\n", name2, name, cli_errstr(cli)); -- cgit From bb0598faf58679a7ad26a1caab8eadb154a07ae2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 22 Oct 2003 23:38:20 +0000 Subject: Put strcasecmp/strncasecmp on the banned list (except for needed calls in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at all and I really want to discourage that. Jeremy. (This used to be commit d7e35dfb9283d560d0ed2ab231f36ed92767dace) --- source3/torture/mangle_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 9a719349b6..f31621b23b 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -85,7 +85,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) data = tdb_fetch_bystring(tdb, shortname); if (data.dptr) { /* maybe its a duplicate long name? */ - if (strcasecmp(name, data.dptr) != 0) { + if (!strequal(name, data.dptr)) { /* we have a collision */ collisions++; printf("Collision between %s and %s -> %s " -- cgit From 8c518daa86518f5752b1f571f08bd34b0143d10e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 8 Jul 2004 12:42:01 +0000 Subject: r1396: Give the build farm a chance to be clean before 3.0.5. We don't accept filenames ending in a dot. Volker (This used to be commit f17cb54a6f97b2ce0084d27ec219b4c3fe05c1fa) --- source3/torture/mangle_test.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index f31621b23b..174c7128be 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -150,6 +150,10 @@ static void gen_name(char *name) s[4] = 0; } } + + /* ..... and a 100% proability of a file not ending in "." */ + if (p[strlen(p)-1] == '.') + p[strlen(p)-1] = '\0'; } -- cgit From 4499082b83515bb15f3ecf6ca4568ab1729c73b7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 11 Jul 2004 11:33:25 +0000 Subject: r1444: Another attempt to fulfil the 100% promise. There might be two dots at the end... Volker (This used to be commit 65518960e54f98e750c7e044004ce72a7503760b) --- source3/torture/mangle_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 174c7128be..5acad2d015 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -153,7 +153,7 @@ static void gen_name(char *name) /* ..... and a 100% proability of a file not ending in "." */ if (p[strlen(p)-1] == '.') - p[strlen(p)-1] = '\0'; + p[strlen(p)-1] = '_'; } -- cgit From 1c4bbe06549d86614318718a45b9bc48e3bfc81f Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 2 May 2005 17:49:43 +0000 Subject: r6586: get rid of a few more compiler warnings (This used to be commit 173375f8d88bf8e8db8d60e5d5f0e5dcc28767d9) --- source3/torture/mangle_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 5acad2d015..df0855d93d 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -20,6 +20,8 @@ #include "includes.h" +extern int torture_numops; + static TDB_CONTEXT *tdb; #define NAME_LENGTH 20 @@ -159,7 +161,6 @@ static void gen_name(char *name) BOOL torture_mangle(int dummy) { - extern int torture_numops; static struct cli_state *cli; int i; BOOL ret = True; -- cgit From 54abd2aa66069e6baf7769c496f46d9dba18db39 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 30 Sep 2005 17:13:37 +0000 Subject: r10656: BIG merge from trunk. Features not copied over * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3) --- source3/torture/mangle_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index df0855d93d..9ce6afa038 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -98,7 +98,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) } else { TDB_DATA namedata; /* store it for later */ - namedata.dptr = name; + namedata.dptr = CONST_DISCARD(char *, name); namedata.dsize = strlen(name)+1; tdb_store_bystring(tdb, shortname, namedata, TDB_REPLACE); } -- cgit From 5fbe298b5ad781670715c63e248131498d73e7c6 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Mon, 31 Jul 2006 09:41:25 +0000 Subject: r17338: Add support for multiple shares test inspired by Samba 4 torture's --unclist option. Triggered by -b sharelist_file option. Based on Peter Samogyi's work. I'm not sure what concept for fstring replacement is currently in place though (talloc-ed strings? or it was for pstring only?) (This used to be commit c9f8fafad698c5bc75df86ee8b611104d3fb65bc) --- source3/torture/mangle_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 9ce6afa038..1c9fba355a 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -167,7 +167,7 @@ BOOL torture_mangle(int dummy) printf("starting mangle test\n"); - if (!torture_open_connection(&cli)) { + if (!torture_open_connection(&cli, 0)) { return False; } -- cgit From bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 29 Mar 2007 09:35:51 +0000 Subject: r22009: change TDB_DATA from char * to unsigned char * and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f) --- source3/torture/mangle_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 1c9fba355a..1330477cc5 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -87,7 +87,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) data = tdb_fetch_bystring(tdb, shortname); if (data.dptr) { /* maybe its a duplicate long name? */ - if (!strequal(name, data.dptr)) { + if (!strequal(name, (const char *)data.dptr)) { /* we have a collision */ collisions++; printf("Collision between %s and %s -> %s " @@ -98,7 +98,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) } else { TDB_DATA namedata; /* store it for later */ - namedata.dptr = CONST_DISCARD(char *, name); + namedata.dptr = CONST_DISCARD(uint8 *, name); namedata.dsize = strlen(name)+1; tdb_store_bystring(tdb, shortname, namedata, TDB_REPLACE); } -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/torture/mangle_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 1330477cc5..0396bf267b 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -- cgit From 5e54558c6dea67b56bbfaba5698f3a434d3dffb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 00:52:41 +0000 Subject: r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07) --- source3/torture/mangle_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 0396bf267b..0bcddd6ebd 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "includes.h" -- cgit From 30191d1a5704ad2b158386b511558972d539ce47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Oct 2007 17:40:25 -0700 Subject: RIP BOOL. Convert BOOL -> bool. I found a few interesting bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f) --- source3/torture/mangle_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/torture/mangle_test.c') diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 0bcddd6ebd..00457719a8 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -27,7 +27,7 @@ static TDB_CONTEXT *tdb; static unsigned total, collisions, failures; -static BOOL test_one(struct cli_state *cli, const char *name) +static bool test_one(struct cli_state *cli, const char *name) { int fnum; fstring shortname; @@ -158,11 +158,11 @@ static void gen_name(char *name) } -BOOL torture_mangle(int dummy) +bool torture_mangle(int dummy) { static struct cli_state *cli; int i; - BOOL ret = True; + bool ret = True; printf("starting mangle test\n"); -- cgit