History log of /6.0.3/platform/tests/dirutils/dirutils_test.cc (Results 1 - 17 of 17)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.0.3
# de77d527 19-Jul-2019 Trond Norbye <trond.norbye@gmail.com>

MB-35195: cb::io::mkdirp must terminate for non-existent drive

cb::io::mkdirp use recursion and tries to create the parent
directory, but if the directory is a drive mapping for windows

MB-35195: cb::io::mkdirp must terminate for non-existent drive

cb::io::mkdirp use recursion and tries to create the parent
directory, but if the directory is a drive mapping for windows
we'll return '.' (which means the current directory) and
returns true. Then we're back up in the recursion and try
to create the directory, which would fail again and try
the parent directory (.) and we enter an endless loop.

Solution:
Use SHCreateDirectoryEx instead.

Change-Id: I8356f26248ff20bb890ad4d78824f052438cb702
Reviewed-on: http://review.couchbase.org/112261
Well-Formed: Build Bot <build@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Richard de Mellow <richard.demellow@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v5.5.4, v5.5.0
# 1ebd7828 09-Apr-2018 Dave Rigby <daver@couchbase.com>

GTest: Fix signed/unsigned comparision warnings

Change-Id: Ie1387f474088f4de329f0530e968e891a5dc311b
Reviewed-on: http://review.couchbase.org/92415
Tested-by: Build Bot <build@couchb

GTest: Fix signed/unsigned comparision warnings

Change-Id: Ie1387f474088f4de329f0530e968e891a5dc311b
Reviewed-on: http://review.couchbase.org/92415
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>

show more ...


Revision tags: v4.6.5, v5.0.0
# ea4f023d 09-Jun-2017 Jim Walker <jim@couchbase.com>

Make cb::io::rmrf remove sub-directories

Consider a directory e.g.

data/default/0.couch.1
data/default/1.couch.1

cb::io::rmrf('data') failed as it removed 0.couch.1/1.c

Make cb::io::rmrf remove sub-directories

Consider a directory e.g.

data/default/0.couch.1
data/default/1.couch.1

cb::io::rmrf('data') failed as it removed 0.couch.1/1.couch.1 but
didn't then remove 'default', the final remove of data('data') fails
because data contains default.

The fix maintains a list of directories we have emptied whilst we
remove files, once we've removed all files from all sub-directories
we reverse iterate the empty directory list so we correctly remove the
deepest directories first.

e.g.
remove data/default
remove data/

Change-Id: I29ade96717783fa591170da115ab4c0c9d3a8b10
Reviewed-on: http://review.couchbase.org/79311
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# e688f59f 20-May-2017 Sriram Ganesan <sriram@couchbase.com>

MB-24293: throw system error in case removal of a directory fails

Instead of returning false in the case of a failure, throw a system
error with the errno

Change-Id: I16e81f3572

MB-24293: throw system error in case removal of a directory fails

Instead of returning false in the case of a failure, throw a system
error with the errno

Change-Id: I16e81f3572e0b7d58af3d5ee1f7849aec8cabf97
Reviewed-on: http://review.couchbase.org/78374
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# e6d9b496 30-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

Remove define of NOMINMAX (added by tlm)

Change-Id: Ifd858bd562a9d16ebb292f87230740a76b3e7542
Reviewed-on: http://review.couchbase.org/72860
Tested-by: buildbot <build@couchbase.com>

Remove define of NOMINMAX (added by tlm)

Change-Id: Ifd858bd562a9d16ebb292f87230740a76b3e7542
Reviewed-on: http://review.couchbase.org/72860
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v4.6.0, v4.6.0-DP
# e6a1e8c9 24-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Refactor: let mkdirp throw exception when it fails

We've seen unit test failures where mkdirp reports that it
fails, but we have no additional information. Given that
we're using gte

Refactor: let mkdirp throw exception when it fails

We've seen unit test failures where mkdirp reports that it
fails, but we have no additional information. Given that
we're using gtest for our unit tests it would print unexpected
exceptions thrown, we could just throw an exception from
within mkdirp with the full error reason.

Change-Id: If56d97181eca96143313e5877472d3c4f7d8b63c
Reviewed-on: http://review.couchbase.org/69136
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 4fd969f2 24-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Refactor: Convert test program to gtest

The motivation for this is to prepare for the next patch where
we'll be changing the signature of mkdirp to throw exception
if it fails (makin

Refactor: Convert test program to gtest

The motivation for this is to prepare for the next patch where
we'll be changing the signature of mkdirp to throw exception
if it fails (making it easier to use for debugging)

Change-Id: Ifdd3d72849d26bb54e5782350098c6fc6e1e83b2
Reviewed-on: http://review.couchbase.org/69135
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# d3828d9f 17-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Add utility function to set max number of file descriptors

Change-Id: Iffa1f345cbe68ef0b181f7ca219b224cc4424c76
Reviewed-on: http://review.couchbase.org/68804
Tested-by: buildbot <bu

Add utility function to set max number of file descriptors

Change-Id: Iffa1f345cbe68ef0b181f7ca219b224cc4424c76
Reviewed-on: http://review.couchbase.org/68804
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# e47c8823 05-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Refactor: Rename CouchbaseDirectoryUtilities to cb::io

The name CouchbaseDirectoryUtilities is so long that it is hard
to use and keep the line length < 80. (so that we're ending
up

Refactor: Rename CouchbaseDirectoryUtilities to cb::io

The name CouchbaseDirectoryUtilities is so long that it is hard
to use and keep the line length < 80. (so that we're ending
up with a using namespace CouchbaseDirectoryUtilities instead)

Change-Id: I9aa6ec18a4a373b0d6fb189e01efaaa28bcec48a
Reviewed-on: http://review.couchbase.org/68387
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


# 46f2da31 05-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Add helper functions from memcached

memcached_testapp contains an implementation to determine the
current working directory. We've had the use for the method
elsewhere so it should l

Add helper functions from memcached

memcached_testapp contains an implementation to determine the
current working directory. We've had the use for the method
elsewhere so it should live in dirutils.

The C API for cb_mktemp is annoying to use from a C++ context
as the callers need to add to the patternmask for it to
generate the uniqueness. memcached_testapp had a wrapper
function for this to make it easier to use from C++.

Change-Id: I0744a0ee09807d133915a3ba7bfe1db05e9f3d6e
Reviewed-on: http://review.couchbase.org/68386
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v4.5.1-MP1, v4.5.1, v4.5.0
# c681fee5 04-May-2016 Trond Norbye <trond.norbye@gmail.com>

Add isFile() to test if a file exists

Change-Id: I7829ebd5824c94cf8b34e724a442d95f4ed6ed07
Reviewed-on: http://review.couchbase.org/63708
Tested-by: buildbot <build@couchbase.com>

Add isFile() to test if a file exists

Change-Id: I7829ebd5824c94cf8b34e724a442d95f4ed6ed07
Reviewed-on: http://review.couchbase.org/63708
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>

show more ...


# 8238612a 08-Dec-2015 Trond Norbye <trond.norbye@gmail.com>

MB-17001: refactor layout of source files

Change-Id: I7035532eaa3691286ab30e74e10e34cc0f3c2339
Reviewed-on: http://review.couchbase.org/57585
Tested-by: buildbot <build@couchbase.com

MB-17001: refactor layout of source files

Change-Id: I7035532eaa3691286ab30e74e10e34cc0f3c2339
Reviewed-on: http://review.couchbase.org/57585
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v4.1.0, v3.1.2
# f46a036a 12-Mar-2015 Trond Norbye <trond.norbye@gmail.com>

MB-13869: Add mkdirp() to create directories

Change-Id: I0f1d4b8ec635bb34ccc93420da3ecd81430d7f30
Reviewed-on: http://review.couchbase.org/48148
Tested-by: buildbot <build@couchbase.

MB-13869: Add mkdirp() to create directories

Change-Id: I0f1d4b8ec635bb34ccc93420da3ecd81430d7f30
Reviewed-on: http://review.couchbase.org/48148
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


Revision tags: v3.0.3
# 877ba0c5 14-Jan-2015 Trond Norbye <trond.norbye@gmail.com>

Added isDirectory

A function to verify if a given path is a directory

Change-Id: I6037e3e7f92160387ca6b9b6653a8a3a3d18af4b
Reviewed-on: http://review.couchbase.org/45307
Rev

Added isDirectory

A function to verify if a given path is a directory

Change-Id: I6037e3e7f92160387ca6b9b6653a8a3a3d18af4b
Reviewed-on: http://review.couchbase.org/45307
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


Revision tags: v3.1.6, v3.0.0
# bdd91848 03-Jan-2014 Trond Norbye <trond.norbye@gmail.com>

Add stdio.h for dirutils_test.cc

Change-Id: I62f322a4ecfcd46f0475bbe869c179b4d8976e3c
Reviewed-on: http://review.couchbase.org/31578
Reviewed-by: Trond Norbye <trond.norbye@gmail.com

Add stdio.h for dirutils_test.cc

Change-Id: I62f322a4ecfcd46f0475bbe869c179b4d8976e3c
Reviewed-on: http://review.couchbase.org/31578
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# fdfc900b 02-Jan-2014 Trond Norbye <trond.norbye@gmail.com>

Refactor: rename remove() to rmrf()

Due to problems with the namespace of remove

Change-Id: I06a2daec2900841d4dc04376c92f9a672b2b0227
Reviewed-on: http://review.couchbase.org/31

Refactor: rename remove() to rmrf()

Due to problems with the namespace of remove

Change-Id: I06a2daec2900841d4dc04376c92f9a672b2b0227
Reviewed-on: http://review.couchbase.org/31544
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 69030100 28-Dec-2013 Trond Norbye <trond.norbye@gmail.com>

Add dirutils

This is a slight modification of the dirutils
located in ep-engine. It use a different namespace
and:

* does not return "." and ".." in the lists
* Strips

Add dirutils

This is a slight modification of the dirutils
located in ep-engine. It use a different namespace
and:

* does not return "." and ".." in the lists
* Strips multiple \\

Change-Id: I84c4a9aaff16121c2d66127175a14bd0035aca46
Reviewed-on: http://review.couchbase.org/31417
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...