History log of /6.0.3/platform/tests/ (Results 1 - 25 of 146)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v6.0.3
de77d52719-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
e379ad7619-Mar-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-33351: Don't throw in CoreStore.get()

As we call CoreStore.get() from within the new and delete operators,
we cannot call new or throw anything from inside this function.
Calling

MB-33351: Don't throw in CoreStore.get()

As we call CoreStore.get() from within the new and delete operators,
we cannot call new or throw anything from inside this function.
Calling new would result in a recursive call via the new operator;
this would result in a stack overflow if we were calling new to create
and exception message, in the case where we would throw if our index
is out of range. Throwing from within a delete call would violate
noexcept on linux which results in a std::terminate.

Fix these issues by ensuring we always return something valid from
CoreStore.get(). In this case, something belonging to another core.
We'll get some cache contention, but this is better than crashing.

Change-Id: I56968d46215641787c1d01337c8dea619da0ffc3
Reviewed-on: http://review.couchbase.org/106491
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Tested-by: David Haikney <david.haikney@couchbase.com>

show more ...

Revision tags: v5.5.0
38010ba304-May-2018 Trond Norbye <trond.norbye@gmail.com>

MB-29521: Allow long options with values in getopt_long

getopt_long did not work for --argument=value (or --argument value)

In addition to that optional argument did not work

MB-29521: Allow long options with values in getopt_long

getopt_long did not work for --argument=value (or --argument value)

In addition to that optional argument did not work

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

show more ...

56295be604-May-2018 Trond Norbye <trond.norbye@gmail.com>

Move getopt tests to gtest

Makes it easier to look run the tests and look at the
test failures

Change-Id: Iaee0941e98cc24ebe9b82dd47975e1f1c055ae8e
Reviewed-on: http://revie

Move getopt tests to gtest

Makes it easier to look run the tests and look at the
test failures

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

show more ...

cc62f3a204-May-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: make our getopt impl available as cb::getopt

This makes it easier to run the unit tests on all platforms
to fix bugs (Note that it is still only used on windows
"in product

Refactor: make our getopt impl available as cb::getopt

This makes it easier to run the unit tests on all platforms
to fix bugs (Note that it is still only used on windows
"in production")

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

show more ...

Revision tags: v4.6.5, v5.0.0
72cbf62f20-Jun-2017 Will Gardner <willg@rdner.io>

Add platform abstraction for registering SIGINT signal handlers

Cross-platform compatible support for SIGINT handling is non-trivial
since the cross-platform `signal` API works different

Add platform abstraction for registering SIGINT signal handlers

Cross-platform compatible support for SIGINT handling is non-trivial
since the cross-platform `signal` API works differently on different
platforms.

This patch introduces two functions to the platform API:
cb::set_sigint_handler and cb::clear_sigint_handler.

On Unix platforms this just uses the sigaction API. On Windows
this uses the ConsoleCtrlHandler API.

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

show more ...

e74188b212-Apr-2018 Gerrit Code Review <gerrit@li94-158.members.linode.com>

Merge "Merge couchbase/spock into couchbase/master"


7d934df011-Apr-2018 Jim Walker <jim@couchbase.com>

Merge couchbase/spock into couchbase/master

* couchbase/spock:
MB-29119: N-byte integer class

Change-Id: I53d59d144e87b0c41e97804db8eaf9b98ad63126


27a0140910-Apr-2018 Dave Rigby <daver@couchbase.com>

MB-28941: ScopeTimer: Fix bug where start() called on temporary object

When ScopeTimer is constructed and calls start() on all listeners, it
was incorrectly calling start() on the tempor

MB-28941: ScopeTimer: Fix bug where start() called on temporary object

When ScopeTimer is constructed and calls start() on all listeners, it
was incorrectly calling start() on the temporary (moved from)
object. This caused problems when used in ep-engine, as
TracerStopwatch::start() recorded the spanId the of the selected
Span. As a consequence, when stop() was later called it still had the
default-constructed value of spanId; and hence TracerStopwatch::stop()
recorded the end time into the wrong Span.

Fix by calling start() on the non-temporary member; add testcase.

Change-Id: Id7aa6a3182aeb695c175d0ae5e92bcc1022cc5b9
Reviewed-on: http://review.couchbase.org/92513
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

4abe0d4b05-Apr-2018 Jim Walker <jim@couchbase.com>

MB-29119: N-byte integer class

Add a class which manages an n-byte integer. The class is intended for
use in the referenced MB as a 48-bit counter.

The class can only support 3/

MB-29119: N-byte integer class

Add a class which manages an n-byte integer. The class is intended for
use in the referenced MB as a 48-bit counter.

The class can only support 3/5/6 or 7 bytes and is not atomic.

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

show more ...

1ebd782809-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 ...

9c83cef106-Apr-2018 Dave Rigby <daver@couchbase.com>

MB-28941: Add ScopeTimer classes for timing to multiple listeners

Add ScopeTimer classes: these are timer wrappers which provides a
RAII-style mechanism for timing the duration of sectio

MB-28941: Add ScopeTimer classes for timing to multiple listeners

Add ScopeTimer classes: these are timer wrappers which provides a
RAII-style mechanism for timing the duration of sections of code;
where multiple listeners can record the same duration.

The motiviation for this class is we have regions of code which
multiple listeners want to time - for example the main KV-Engine
functions want to record their duratin in a per-bucket histogram, and
also into the per-Cookie Tracer timings. We don't want to just have
each listener perform it's reading of the clock as that is (a) costly
and (b) gives slightly different time values to each
listener. Instead, this class handles reading the time (just once at
start and stop); and then passes it onto each listener.

Change-Id: I50f87a99ce74fadb61931f1b44011e42207c5020
Reviewed-on: http://review.couchbase.org/92322
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

8b9a714b04-Apr-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-29094: Add implementations for setAdd and setSub to RelaxedAtomic

As shown below, not all base classes have the ability to use the operator
overload methods (+= etc). This patch adds

MB-29094: Add implementations for setAdd and setSub to RelaxedAtomic

As shown below, not all base classes have the ability to use the operator
overload methods (+= etc). This patch adds functional equivalencies to
these which allows for the same behaviour but implemented using the
compare_exchange behaviour of std::atomic.

In file included from /kv_engine/daemon/connection.cc:18:
In file included from /kv_engine/daemon/connection.h:24:
In file included from /kv_engine/daemon/settings.h:31:
/platform/include/relaxed_atomic.h:55:26: error: no member named 'fetch_add' in 'std::__1::atomic<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000> > >'
return value.fetch_add(arg, std::memory_order_relaxed);
~~~~~ ^
/platform/include/relaxed_atomic.h:68:13: note: in instantiation of member function 'Couchbase::RelaxedAtomic<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000> > >::fetch_add' requested here
fetch_add(rhs);
^
/kv_engine/daemon/connection.cc:569:20: note: in instantiation of member function 'Couchbase::RelaxedAtomic<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000> > >::operator+=' requested here
total_cpu_time += ns;
^
1 error generated.

Change-Id: I54fdfd9326e5b771c02554f50ef4f1fda1392db5
Reviewed-on: http://review.couchbase.org/92112
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

7a9658f803-Apr-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-29045: Add setIfSmaller functions to RelaxedAtomic

Change-Id: Ib69d16892acda83c1fa00b7f25e444d7718721b4
Reviewed-on: http://review.couchbase.org/92050
Reviewed-by: Dave Rigby <dav

MB-29045: Add setIfSmaller functions to RelaxedAtomic

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

show more ...

6696145f16-Feb-2018 Dave Rigby <daver@couchbase.com>

Replace INCLUDE_DIRECTORIES with TARGET_INCLUDE_DIRECTORIES

It is preferred to use target_include_directories() instead of
include_directories() to ensure that header dependancies are ex

Replace INCLUDE_DIRECTORIES with TARGET_INCLUDE_DIRECTORIES

It is preferred to use target_include_directories() instead of
include_directories() to ensure that header dependancies are explicit
(and we don't accidently depend on headers). See 'Effective Modern
CMake[1]' for background.

Replace include_directories() with target_include_directories() where
necessary, or simply remove include_directories() where it is
unnecessary - for example where a target already depends on a library
and the library has already declared its public includes.

To assist with this, an explicit 'platform_headers' interface library
has been created, targets which only wish to use platform's headers
(for example tests) can link to that library to get the correct search
paths.

[1]: https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1

Change-Id: I4483fc3d5c888ef7bf1ece2e875df5c90655d1a6
Reviewed-on: http://review.couchbase.org/90742
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

da5130e626-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: Split cJSON_Number into cJSON_Double

We barely use the double part in our code, so it's easier to
jet cJSON_Number mean a signed integer, and cJSON_Double
represent floatin

Refactor: Split cJSON_Number into cJSON_Double

We barely use the double part in our code, so it's easier to
jet cJSON_Number mean a signed integer, and cJSON_Double
represent floating points.

This means that we can use signed 64 integers without caring
about information loss (except for signness issues, but that
require deeper changes to cJSON)

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

show more ...

bac3aa4e21-Feb-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-27661 [2/n]: Add further API methods for cJSON

This adds four new API methods to help adding numbers to the JSON
object.

- cJSON_AddIntegerToObject
This method ad

MB-27661 [2/n]: Add further API methods for cJSON

This adds four new API methods to help adding numbers to the JSON
object.

- cJSON_AddIntegerToObject
This method adds a uint32_t to the cJSON object by casting it
to a double. This is safe as the IEEE-754 spec has 52 bits for
mantissa.

- cJSON_AddInteger64ToObject
This method adds a uint64_t to the cJSON object by casting it
to a double. This method performs a narrowing conversion so it
should be noted there is the potential for malformed data.

- cJSON_AddStringifiedIntegerToObject
This method adds an uint64_t to the cJSON object through the use
of a string representation of the number.

- cJSON_AddStringifiedSignedIntegerToObject
This method adds an int64_t to the cJSON object through the use
of a string representation of the number.

This also adds associated unit tests for these methods.

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

show more ...

017ab79d04-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Add methods to print an integer in hex

This allows for adding hexadecimal integers into our
logs.

Change-Id: I1977a340993dedaaa6628fa3d0676e6af0fac695
Reviewed-on: http://re

Add methods to print an integer in hex

This allows for adding hexadecimal integers into our
logs.

Change-Id: I1977a340993dedaaa6628fa3d0676e6af0fac695
Reviewed-on: http://review.couchbase.org/88827
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...

e594d28801-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

gcc7: Don't inline to_string(cb::const_char_buffer)

gcc7 complains if it encounters this static inline before seeing
the one in kv_engine (for error codes) as it is not static inline.

gcc7: Don't inline to_string(cb::const_char_buffer)

gcc7 complains if it encounters this static inline before seeing
the one in kv_engine (for error codes) as it is not static inline.

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

show more ...

65b52cdf22-Jan-2018 Jim Walker <jim@couchbase.com>

MB-24860: Add CoreStore container class

Add a template class which allows the storage and access of
per core data.

Change-Id: I12b211c3a3417265238f91e7d7e3a34855a96719
Revie

MB-24860: Add CoreStore container class

Add a template class which allows the storage and access of
per core data.

Change-Id: I12b211c3a3417265238f91e7d7e3a34855a96719
Reviewed-on: http://review.couchbase.org/88184
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

b5f07db516-Jan-2018 Jim Walker <jim@couchbase.com>

MB-24860: Add get_cpu_count and get_cpu_index

get_cpu_count returns the number of 'cores' installed in the system
get_cpu_index returns the index of the 'core' the caller is running on

MB-24860: Add get_cpu_count and get_cpu_index

get_cpu_count returns the number of 'cores' installed in the system
get_cpu_index returns the index of the 'core' the caller is running on

Together the methods are intended to assist in building core-local
storage, away to associate data with the running core

Change-Id: I68a4095d47d051660d3472b911053613638325d7
Reviewed-on: http://review.couchbase.org/87905
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

a528b92324-Oct-2017 Eugen-Alexandru Virtan <eugen.virtan@couchbase.com>

MB-26047:[7-b] Refactor histogram.h to work with <chrono> durations

Part of a cross repo change.

Change MicrosecondHistogram to use uint64_t as Rep, to ensure the same
behaviour

MB-26047:[7-b] Refactor histogram.h to work with <chrono> durations

Part of a cross repo change.

Change MicrosecondHistogram to use uint64_t as Rep, to ensure the same
behaviour as provided by hrtime_t which was of the same type. Add new
alias for custom microseconds used.

Introduce cb::duration_limits, which aims to behave similarly to
std::numeric_limits, but for chrono durations.

Add a second template argument to the Histogram class(and to other
related classes and methods), which expects a template class to be
passed(std::numeric_limits for primitive types or cb::duration_limits
for durations).

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

show more ...

53c9a64619-Sep-2017 Dave Rigby <daver@couchbase.com>

MB-26295: NonNegativeCounter: throw exception on CB_DEVELOPMENT_ASSERTS

If CB_DEVELOPMENT_ASSERTS is defined, change the
DefaultUnderflowPolicy for NonNegativeCounter to
ThrowExcepti

MB-26295: NonNegativeCounter: throw exception on CB_DEVELOPMENT_ASSERTS

If CB_DEVELOPMENT_ASSERTS is defined, change the
DefaultUnderflowPolicy for NonNegativeCounter to
ThrowExceptionUnderflowPolicy, so an exception is thrown if the
counter would underflow.

This helps to expose any bugs in objects using this type.

Change-Id: I8c6c7365dd7ca83dd9c45623b53b6f3321ec29ff
Reviewed-on: http://review.couchbase.org/83502
Reviewed-by: Manu Dhundi <manu@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

1460328903-Oct-2017 Eugen-Alexandru Virtan <eugen.virtan@couchbase.com>

MB-26047:[2] Migrate away from using gethrtime()

Replace uses of gethrtime() with ProcessClock::now() and refactor
related code to use typesafe <chrono> time units.

Change-Id: I

MB-26047:[2] Migrate away from using gethrtime()

Replace uses of gethrtime() with ProcessClock::now() and refactor
related code to use typesafe <chrono> time units.

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

show more ...

f8df94f304-Oct-2017 Eugen-Alexandru Virtan <eugen.virtan@couchbase.com>

Remove duplicate of cb::time2text()

Remove duplicate method to_string(). cb::time2text() should be used
when a duration needs to be converted to a human readable form.
Update cb::tim

Remove duplicate of cb::time2text()

Remove duplicate method to_string(). cb::time2text() should be used
when a duration needs to be converted to a human readable form.
Update cb::time2text()'s description.

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

show more ...

123456