2009-04-14 20:21:05 +00:00
|
|
|
/*--- This software is copyrighted by the Regents of the University
|
2007-10-22 20:48:12 +00:00
|
|
|
of
|
2006-10-13 04:39:03 +00:00
|
|
|
California, and other parties. The following terms apply to all files
|
|
|
|
associated with the software unless explicitly disclaimed in
|
|
|
|
individual files.
|
|
|
|
|
|
|
|
The authors hereby grant permission to use, copy, modify, distribute,
|
|
|
|
and license this software and its documentation for any purpose,
|
|
|
|
provided that existing copyright notices are retained in all copies
|
|
|
|
and that this notice is included verbatim in any distributions. No
|
|
|
|
written agreement, license, or royalty fee is required for any of the
|
|
|
|
authorized uses. Modifications to this software may be copyrighted by
|
|
|
|
their authors and need not follow the licensing terms described here,
|
|
|
|
provided that the new terms are clearly indicated on the first page of
|
|
|
|
each file where they apply.
|
|
|
|
|
|
|
|
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
|
|
|
|
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
|
|
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
|
|
|
|
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
|
|
|
|
POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
|
|
|
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
|
|
|
|
NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND
|
|
|
|
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
|
|
|
|
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
|
|
|
|
|
|
GOVERNMENT USE: If you are acquiring this software on behalf of the
|
|
|
|
U.S. government, the Government shall have only "Restricted Rights" in
|
|
|
|
the software and related documentation as defined in the Federal
|
|
|
|
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are
|
|
|
|
acquiring the software on behalf of the Department of Defense, the
|
|
|
|
software shall be classified as "Commercial Computer Software" and the
|
|
|
|
Government shall have only "Restricted Rights" as defined in Clause
|
|
|
|
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
|
|
|
|
authors grant the U.S. Government and others acting in its behalf
|
|
|
|
permission to use and distribute the software in accordance with the
|
|
|
|
terms specified in this license.
|
|
|
|
---*/
|
2009-04-14 20:21:05 +00:00
|
|
|
#include "../check_includes.h"
|
|
|
|
|
2007-06-11 21:36:57 +00:00
|
|
|
#include <stasis/io/handle.h>
|
2009-05-08 04:56:34 +00:00
|
|
|
#include <stasis/constants.h>
|
|
|
|
#include <stasis/flags.h>
|
2011-08-31 19:25:09 +00:00
|
|
|
#include <stasis/util/random.h>
|
2006-10-13 04:39:03 +00:00
|
|
|
#include <assert.h>
|
2006-10-18 00:57:36 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
2006-10-13 04:39:03 +00:00
|
|
|
#define LOG_NAME "check_io.log"
|
|
|
|
|
2007-10-23 23:26:33 +00:00
|
|
|
void handle_smoketest(stasis_handle_t * h) {
|
2006-10-13 04:39:03 +00:00
|
|
|
|
|
|
|
const int one = 0x11111111;
|
|
|
|
const int two = 0x22222222;
|
2006-10-26 05:48:30 +00:00
|
|
|
|
2006-10-17 03:28:24 +00:00
|
|
|
assert((!h->num_copies(h)) || (!h->num_copies_buffer(h)));
|
2006-10-13 04:39:03 +00:00
|
|
|
|
|
|
|
assert(! h->write(h, 0, (byte*)&one, sizeof(int)));
|
|
|
|
|
|
|
|
int one_read = 0;
|
2006-10-18 00:57:36 +00:00
|
|
|
int ret = h->read(h, 0, (byte*)&one_read, sizeof(int));
|
|
|
|
assert(!ret);
|
2006-10-13 04:39:03 +00:00
|
|
|
assert(one_read == one);
|
|
|
|
stasis_write_buffer_t * w = h->write_buffer(h, sizeof(int), sizeof(int));
|
|
|
|
*((int*)(w->buf)) = two;
|
|
|
|
w->h->release_write_buffer(w);
|
2009-04-14 20:21:05 +00:00
|
|
|
one_read = 0;
|
2006-10-13 04:39:03 +00:00
|
|
|
stasis_read_buffer_t * r = h->read_buffer(h, 0, sizeof(int));
|
|
|
|
one_read = *((int*)(r->buf));
|
|
|
|
r->h->release_read_buffer(r);
|
|
|
|
assert(one == one_read);
|
|
|
|
|
|
|
|
int two_read = 0;
|
|
|
|
assert(! h->read(h, sizeof(int), (byte*)&two_read, sizeof(int)));
|
|
|
|
assert(two == two_read);
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2006-10-13 04:39:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-04-14 20:21:05 +00:00
|
|
|
typedef struct {
|
2006-10-13 04:39:03 +00:00
|
|
|
int * values;
|
|
|
|
int count;
|
|
|
|
stasis_handle_t * h;
|
|
|
|
} thread_arg;
|
|
|
|
|
|
|
|
#define VALUE_COUNT 100000
|
|
|
|
#define THREAD_COUNT 100
|
|
|
|
#define OPS_PER_THREAD 500000
|
|
|
|
|
|
|
|
lsn_t trunc_val;
|
|
|
|
pthread_mutex_t trunc_mut = PTHREAD_MUTEX_INITIALIZER;
|
|
|
|
void load_handle(thread_arg* t) {
|
2012-12-01 01:15:03 +00:00
|
|
|
lsn_t * offsets = stasis_malloc(t->count, lsn_t);
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2006-10-13 04:39:03 +00:00
|
|
|
stasis_handle_t * h = t->h;
|
|
|
|
|
2011-07-26 19:15:14 +00:00
|
|
|
for(int i = 0; i < t->count; i++) {
|
|
|
|
offsets[i] = i * sizeof(int);
|
2006-10-13 04:39:03 +00:00
|
|
|
}
|
2009-04-14 20:21:05 +00:00
|
|
|
for(int i = 0; i < OPS_PER_THREAD; i++) {
|
2011-08-31 19:25:09 +00:00
|
|
|
int val = stasis_util_random64(t->count);
|
2009-04-14 20:21:05 +00:00
|
|
|
|
|
|
|
if(offsets[val] == -1) {
|
2006-10-13 04:39:03 +00:00
|
|
|
// Need to write it somewhere.
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2011-08-31 19:25:09 +00:00
|
|
|
long choice = stasis_util_random64(2);
|
2009-04-14 20:21:05 +00:00
|
|
|
|
|
|
|
switch(choice) {
|
2006-10-13 04:39:03 +00:00
|
|
|
case 0: { // overwrite old entry with write()
|
2011-08-31 19:25:09 +00:00
|
|
|
long val2 = stasis_util_random64(t->count);
|
2011-07-26 19:15:14 +00:00
|
|
|
offsets[val] = offsets[val2];
|
|
|
|
offsets[val2] = -1;
|
|
|
|
if(offsets[val] != -1) {
|
|
|
|
int ret = h->write(h, offsets[val], (const byte*)&(t->values[val]), sizeof(int));
|
|
|
|
if(ret) {
|
|
|
|
assert(ret == EDOM);
|
|
|
|
offsets[val] = -1;
|
|
|
|
i--;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
i--;
|
2010-04-08 23:50:01 +00:00
|
|
|
}
|
2006-10-13 04:39:03 +00:00
|
|
|
} break;
|
2011-07-26 19:15:14 +00:00
|
|
|
case 1: { // overwrite old entry with write_buffer()
|
2011-08-31 19:25:09 +00:00
|
|
|
long val2 = stasis_util_random64(t->count);
|
2011-07-26 19:15:14 +00:00
|
|
|
offsets[val] = offsets[val2];
|
|
|
|
offsets[val2] = -1;
|
|
|
|
if(offsets[val] != -1) {
|
|
|
|
stasis_write_buffer_t * w = h->write_buffer(h, offsets[val], sizeof(int));
|
2010-04-08 23:50:01 +00:00
|
|
|
if(!w->error) {
|
|
|
|
*((int*)w->buf) = t->values[val];
|
|
|
|
assert(w->len == sizeof(int));
|
2011-07-26 19:15:14 +00:00
|
|
|
assert(w->off == offsets[val]);
|
2010-04-08 23:50:01 +00:00
|
|
|
} else {
|
2011-07-26 19:15:14 +00:00
|
|
|
assert(w->error == EDOM);
|
|
|
|
offsets[val] = -1;
|
|
|
|
i--;
|
2010-04-08 23:50:01 +00:00
|
|
|
}
|
|
|
|
w->h->release_write_buffer(w);
|
2011-07-26 19:15:14 +00:00
|
|
|
} else {
|
|
|
|
i--;
|
2010-04-08 23:50:01 +00:00
|
|
|
}
|
2006-10-13 04:39:03 +00:00
|
|
|
} break;
|
|
|
|
default: {
|
2011-07-26 19:15:14 +00:00
|
|
|
abort();
|
2006-10-13 04:39:03 +00:00
|
|
|
}
|
|
|
|
}
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2006-10-13 04:39:03 +00:00
|
|
|
int check;
|
|
|
|
int ret = h->read(h, offsets[val], (byte*)&check, sizeof(int));
|
2009-04-14 20:21:05 +00:00
|
|
|
if(!ret) {
|
2010-04-08 23:50:01 +00:00
|
|
|
assert(check == t->values[val]);
|
2006-10-13 04:39:03 +00:00
|
|
|
}
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2006-10-13 04:39:03 +00:00
|
|
|
|
|
|
|
} else {
|
|
|
|
// Read the value.
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2011-08-31 19:25:09 +00:00
|
|
|
long choice = stasis_util_random64(2);
|
2009-04-14 20:21:05 +00:00
|
|
|
|
|
|
|
switch(choice) {
|
2006-10-13 04:39:03 +00:00
|
|
|
case 0: { // read
|
2006-10-18 00:57:36 +00:00
|
|
|
int j = -1;
|
2006-10-13 04:39:03 +00:00
|
|
|
int ret = h->read(h, offsets[val], (byte*)&j, sizeof(int));
|
2009-04-14 20:21:05 +00:00
|
|
|
if(!ret) {
|
2006-10-13 04:39:03 +00:00
|
|
|
assert(j == t->values[val]);
|
|
|
|
} else {
|
|
|
|
assert(ret == EDOM);
|
|
|
|
}
|
|
|
|
} break;
|
|
|
|
case 1: { // read_buffer
|
|
|
|
stasis_read_buffer_t * r = h->read_buffer(h, offsets[val], sizeof(int));
|
2009-04-14 20:21:05 +00:00
|
|
|
if(!r->error) {
|
2006-10-13 04:39:03 +00:00
|
|
|
assert(*(int*)(r->buf) == t->values[val]);
|
|
|
|
assert(r->len == sizeof(int));
|
2006-10-17 03:28:24 +00:00
|
|
|
r->h->release_read_buffer(r);
|
2006-10-13 04:39:03 +00:00
|
|
|
} else {
|
|
|
|
assert(r->error == EDOM);
|
2006-10-17 03:28:24 +00:00
|
|
|
r->h->release_read_buffer(r);
|
2006-10-13 04:39:03 +00:00
|
|
|
}
|
|
|
|
} break;
|
|
|
|
default:
|
|
|
|
abort();
|
|
|
|
};
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2006-10-13 04:39:03 +00:00
|
|
|
}
|
2007-10-23 01:51:03 +00:00
|
|
|
// Force 1% of the time.
|
2011-08-31 19:25:09 +00:00
|
|
|
if(!stasis_util_random64(100)) {
|
2007-10-23 01:51:03 +00:00
|
|
|
h->force(h);
|
|
|
|
}
|
2006-10-13 04:39:03 +00:00
|
|
|
}
|
|
|
|
free(offsets);
|
|
|
|
}
|
|
|
|
|
2009-04-14 20:21:05 +00:00
|
|
|
void handle_sequentialtest(stasis_handle_t * h) {
|
2007-10-23 01:51:03 +00:00
|
|
|
time_t seed = time(0);
|
2007-10-22 20:48:12 +00:00
|
|
|
printf("Seed = %ld\n", seed);
|
2006-10-13 04:39:03 +00:00
|
|
|
srandom(seed);
|
|
|
|
|
2012-12-01 01:15:03 +00:00
|
|
|
int * values = stasis_malloc(VALUE_COUNT, int);
|
2006-10-13 04:39:03 +00:00
|
|
|
|
|
|
|
for(int i = 0; i < VALUE_COUNT; i++) {
|
|
|
|
values[i] = i;
|
|
|
|
}
|
|
|
|
trunc_val = 0;
|
|
|
|
thread_arg arg = { values, VALUE_COUNT, h};
|
|
|
|
load_handle(&arg);
|
|
|
|
|
|
|
|
free(values);
|
|
|
|
}
|
|
|
|
|
2009-04-14 20:21:05 +00:00
|
|
|
void handle_concurrencytest(stasis_handle_t * h) {
|
2011-08-31 19:25:09 +00:00
|
|
|
int vc = stasis_util_random64(VALUE_COUNT) + 10;
|
2006-10-13 04:39:03 +00:00
|
|
|
|
2010-04-08 23:50:01 +00:00
|
|
|
printf("Running concurrency test with %d values\n", vc); fflush(stdout);
|
2006-10-13 04:39:03 +00:00
|
|
|
|
2012-12-01 01:15:03 +00:00
|
|
|
int * values = stasis_malloc(vc, int);
|
2006-10-13 04:39:03 +00:00
|
|
|
|
|
|
|
for(int i = 0; i < vc; i++) {
|
|
|
|
values[i] = i;
|
|
|
|
}
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2012-12-01 01:15:03 +00:00
|
|
|
thread_arg * args = stasis_malloc(THREAD_COUNT, thread_arg);
|
|
|
|
pthread_t * threads = stasis_malloc(THREAD_COUNT, pthread_t);
|
|
|
|
stasis_handle_t ** handles = stasis_malloc(THREAD_COUNT / 2, stasis_handle_t*);
|
2009-04-14 20:21:05 +00:00
|
|
|
|
2006-10-13 04:39:03 +00:00
|
|
|
int val_per_thread = vc / THREAD_COUNT;
|
|
|
|
trunc_val = 0;
|
|
|
|
for(int i = 0; i < THREAD_COUNT; i++) {
|
|
|
|
args[i].values = &(values[i * val_per_thread]);
|
|
|
|
args[i].count = val_per_thread;
|
2010-04-08 23:50:01 +00:00
|
|
|
if(!(i % 2)) {
|
|
|
|
handles[i/2] = h->dup(h);
|
|
|
|
h = handles[i/2];
|
|
|
|
}
|
2006-10-13 04:39:03 +00:00
|
|
|
args[i].h = h;
|
|
|
|
pthread_create(&threads[i], 0, (void*(*)(void*))load_handle, &args[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
for(int i = 0; i < THREAD_COUNT; i++) {
|
|
|
|
pthread_join(threads[i], 0);
|
|
|
|
}
|
2010-04-08 23:50:01 +00:00
|
|
|
for(int i = 0; i < THREAD_COUNT / 2; i++) {
|
|
|
|
handles[i]->close(handles[i]);
|
|
|
|
}
|
2006-10-13 04:39:03 +00:00
|
|
|
free(values);
|
|
|
|
free(args);
|
|
|
|
free(threads);
|
2010-04-08 23:50:01 +00:00
|
|
|
free(handles);
|
2006-10-13 04:39:03 +00:00
|
|
|
}
|
|
|
|
/**
|
2009-04-14 20:21:05 +00:00
|
|
|
@test
|
2006-10-13 04:39:03 +00:00
|
|
|
Check the memory I/O handle.
|
|
|
|
*/
|
|
|
|
START_TEST(io_memoryTest) {
|
2007-10-22 20:48:12 +00:00
|
|
|
printf("io_memoryTest\n"); fflush(stdout);
|
2006-10-17 03:28:24 +00:00
|
|
|
stasis_handle_t * h;
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_memory)();
|
2006-10-17 03:28:24 +00:00
|
|
|
// h = stasis_handle(open_debug)(h);
|
2006-10-13 04:39:03 +00:00
|
|
|
handle_smoketest(h);
|
|
|
|
h->close(h);
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_memory)();
|
2006-10-17 03:28:24 +00:00
|
|
|
// h = stasis_handle(open_debug)(h);
|
2006-10-13 04:39:03 +00:00
|
|
|
handle_sequentialtest(h);
|
|
|
|
h->close(h);
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_memory)();
|
2006-10-17 03:28:24 +00:00
|
|
|
// h = stasis_handle(open_debug)(h);
|
2006-10-13 04:39:03 +00:00
|
|
|
handle_concurrencytest(h);
|
|
|
|
h->close(h);
|
|
|
|
} END_TEST
|
|
|
|
|
2009-04-14 20:21:05 +00:00
|
|
|
START_TEST(io_fileTest) {
|
2007-10-22 20:48:12 +00:00
|
|
|
printf("io_fileTest\n"); fflush(stdout);
|
2006-10-18 00:57:36 +00:00
|
|
|
stasis_handle_t * h;
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_file)("logfile.txt", O_CREAT | O_RDWR, FILE_PERM);
|
2006-10-26 05:48:30 +00:00
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_smoketest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2006-10-26 05:48:30 +00:00
|
|
|
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_file)("logfile.txt", O_CREAT | O_RDWR, FILE_PERM);
|
2006-10-26 05:48:30 +00:00
|
|
|
//h = stasis_handle(open_debug)(h);
|
|
|
|
handle_sequentialtest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2006-10-26 05:48:30 +00:00
|
|
|
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_file)("logfile.txt", O_CREAT | O_RDWR, FILE_PERM);
|
2010-04-08 23:50:01 +00:00
|
|
|
// handle_concurrencytest(h); // fails by design
|
2006-10-26 05:48:30 +00:00
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2006-10-26 05:48:30 +00:00
|
|
|
|
|
|
|
} END_TEST
|
|
|
|
|
2007-08-20 16:23:57 +00:00
|
|
|
START_TEST(io_pfileTest) {
|
2007-10-22 20:48:12 +00:00
|
|
|
printf("io_pfileTest\n"); fflush(stdout);
|
2007-08-20 16:23:57 +00:00
|
|
|
|
|
|
|
stasis_handle_t * h;
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_pfile)("logfile.txt", O_CREAT | O_RDWR, FILE_PERM);
|
2007-08-20 16:23:57 +00:00
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_smoketest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2007-08-20 16:23:57 +00:00
|
|
|
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_pfile)("logfile.txt", O_CREAT | O_RDWR, FILE_PERM);
|
2007-08-20 16:23:57 +00:00
|
|
|
//h = stasis_handle(open_debug)(h);
|
|
|
|
handle_sequentialtest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2007-08-20 16:23:57 +00:00
|
|
|
|
2011-07-26 19:15:14 +00:00
|
|
|
h = stasis_handle(open_pfile)("logfile.txt", O_CREAT | O_RDWR, FILE_PERM);
|
2010-04-08 23:50:01 +00:00
|
|
|
handle_concurrencytest(h);
|
2007-08-20 16:23:57 +00:00
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
|
|
|
|
|
|
|
} END_TEST
|
|
|
|
|
|
|
|
START_TEST(io_raid1pfileTest) {
|
|
|
|
printf("io_raid1pfileTest\n"); fflush(stdout);
|
|
|
|
|
|
|
|
const char * A = "vol1.txt";
|
|
|
|
const char * B = "vol2.txt";
|
|
|
|
|
|
|
|
remove(A);
|
|
|
|
remove(B);
|
|
|
|
|
|
|
|
stasis_handle_t *h, *a, *b;
|
2011-07-26 19:15:14 +00:00
|
|
|
a = stasis_handle(open_pfile)(A, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
b = stasis_handle(open_pfile)(B, O_CREAT | O_RDWR, FILE_PERM);
|
2010-12-03 03:51:24 +00:00
|
|
|
h = stasis_handle_open_raid1(a, b);
|
|
|
|
|
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_smoketest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
|
|
|
remove(A);
|
|
|
|
remove(B);
|
|
|
|
|
2011-07-26 19:15:14 +00:00
|
|
|
a = stasis_handle(open_pfile)(A, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
b = stasis_handle(open_pfile)(B, O_CREAT | O_RDWR, FILE_PERM);
|
2010-12-03 03:51:24 +00:00
|
|
|
h = stasis_handle_open_raid1(a, b);
|
|
|
|
|
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_sequentialtest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
|
|
|
remove(A);
|
|
|
|
remove(B);
|
|
|
|
|
2011-07-26 19:15:14 +00:00
|
|
|
a = stasis_handle(open_pfile)(A, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
b = stasis_handle(open_pfile)(B, O_CREAT | O_RDWR, FILE_PERM);
|
2010-12-03 03:51:24 +00:00
|
|
|
h = stasis_handle_open_raid1(a, b);
|
|
|
|
|
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_concurrencytest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
|
|
|
remove(A);
|
|
|
|
remove(B);
|
|
|
|
|
merge in changes from svn[r1572..r1601]
------------------------------------------------------------------------
r1601 | sears.russell@gmail.com | 2012-03-20 18:43:00 -0400 (Tue, 20
Mar 2012) | 1 line
commit bLSM bloom filter to stasis/util, which is where it really
belongs
------------------------------------------------------------------------
r1600 | sears.russell@gmail.com | 2012-03-04 01:58:38 -0500 (Sun, 04
Mar 2012) | 1 line
fix memory leak in skiplist unit test (now it is valgrind clean)
------------------------------------------------------------------------
r1599 | sears.russell@gmail.com | 2012-03-04 01:58:05 -0500 (Sun, 04
Mar 2012) | 1 line
fix typo in finalize type
------------------------------------------------------------------------
r1598 | sears.russell@gmail.com | 2012-03-04 00:59:59 -0500 (Sun, 04
Mar 2012) | 1 line
add comparator and finalizer parameters to skiplist constructor
------------------------------------------------------------------------
r1597 | sears.russell@gmail.com | 2012-03-03 18:23:16 -0500 (Sat, 03
Mar 2012) | 1 line
bugfixes for skiplist
------------------------------------------------------------------------
r1596 | sears.russell@gmail.com | 2012-03-02 15:05:07 -0500 (Fri, 02
Mar 2012) | 1 line
updated concurrentSkipList. Seeing strange crashes
------------------------------------------------------------------------
r1595 | sears.russell@gmail.com | 2012-03-01 16:51:59 -0500 (Thu, 01
Mar 2012) | 1 line
add progress reports
------------------------------------------------------------------------
r1594 | sears.russell@gmail.com | 2012-02-28 13:17:05 -0500 (Tue, 28
Feb 2012) | 1 line
experimental support for automatic logfile preallocation
------------------------------------------------------------------------
r1593 | sears.russell@gmail.com | 2012-02-28 12:10:01 -0500 (Tue, 28
Feb 2012) | 1 line
add histogram reporting to rawIOPS benchmark
------------------------------------------------------------------------
r1592 | sears.russell@gmail.com | 2012-02-24 16:31:36 -0500 (Fri, 24
Feb 2012) | 1 line
userspace raid 0 implementation
------------------------------------------------------------------------
r1591 | sears.russell@gmail.com | 2012-02-12 01:47:25 -0500 (Sun, 12
Feb 2012) | 1 line
add skiplist unit test, fix compile warnings
------------------------------------------------------------------------
r1590 | sears.russell@gmail.com | 2012-02-12 00:52:52 -0500 (Sun, 12
Feb 2012) | 1 line
fix compile error
------------------------------------------------------------------------
r1589 | sears.russell@gmail.com | 2012-02-12 00:50:21 -0500 (Sun, 12
Feb 2012) | 1 line
fix some bugs in hazard.h surrounding thread list management and
overruns of R under high contention
------------------------------------------------------------------------
r1588 | sears.russell@gmail.com | 2012-02-11 14:23:10 -0500 (Sat, 11
Feb 2012) | 1 line
add hazard pointer for get_lock. It was implicitly blowing away the
hazard pointer protecting y in the caller
------------------------------------------------------------------------
r1587 | sears.russell@gmail.com | 2012-02-10 18:51:25 -0500 (Fri, 10
Feb 2012) | 1 line
fix null pointer bug
------------------------------------------------------------------------
r1586 | sears.russell@gmail.com | 2012-02-10 18:03:39 -0500 (Fri, 10
Feb 2012) | 1 line
add simple refcounting scheme to concurrentSkipList. This solves the
problem where a deleted node points to another deleted node, and we
only have a hazard pointer for the first node.
------------------------------------------------------------------------
r1585 | sears.russell@gmail.com | 2012-02-10 14:19:14 -0500 (Fri, 10
Feb 2012) | 1 line
add hazard pointers for update using the smallest free slot first. The
old method left a race condition, since hazard_scan stops at the first
null pointer.
------------------------------------------------------------------------
r1584 | sears.russell@gmail.com | 2012-02-10 02:45:30 -0500 (Fri, 10
Feb 2012) | 1 line
add hazard pointers for update array
------------------------------------------------------------------------
r1583 | sears.russell@gmail.com | 2012-02-10 00:04:50 -0500 (Fri, 10
Feb 2012) | 1 line
skiplist update: concurrent, but broken
------------------------------------------------------------------------
r1582 | sears.russell@gmail.com | 2012-02-09 17:44:27 -0500 (Thu, 09
Feb 2012) | 1 line
skip list implementation. Not concurrent yet.
------------------------------------------------------------------------
r1581 | sears.russell@gmail.com | 2012-02-08 13:33:29 -0500 (Wed, 08
Feb 2012) | 1 line
Commit of a bunch of new, unused code: KISS random number generator,
Hazard Pointers, SUX latches (untested) and bit twiddling for
concurrent b-tree
------------------------------------------------------------------------
r1580 | sears.russell@gmail.com | 2012-01-17 19:17:37 -0500 (Tue, 17
Jan 2012) | 1 line
fix typo
------------------------------------------------------------------------
r1579 | sears.russell@gmail.com | 2012-01-11 18:33:31 -0500 (Wed, 11
Jan 2012) | 1 line
static build fixes for linux. hopefully these do not break macos...
------------------------------------------------------------------------
r1578 | sears.russell@gmail.com | 2012-01-09 19:13:34 -0500 (Mon, 09
Jan 2012) | 1 line
fix cmake under linux
------------------------------------------------------------------------
r1577 | sears.russell@gmail.com | 2012-01-09 18:37:15 -0500 (Mon, 09
Jan 2012) | 1 line
fix linux static binary compilation bugs
------------------------------------------------------------------------
r1576 | sears.russell | 2012-01-09 18:00:08 -0500 (Mon, 09 Jan 2012) |
1 line
port to macos x
------------------------------------------------------------------------
r1575 | sears.russell | 2012-01-09 17:39:43 -0500 (Mon, 09 Jan 2012) |
1 line
add missing _ from sync call name
------------------------------------------------------------------------
r1574 | sears.russell@gmail.com | 2012-01-09 14:26:31 -0500 (Mon, 09
Jan 2012) | 1 line
add -rt flag to static builds
------------------------------------------------------------------------
r1573 | sears.russell@gmail.com | 2011-12-20 23:38:29 -0500 (Tue, 20
Dec 2011) | 1 line
Simple makefile geared toward building libstasis.so and libstasis.a
(and nothing else)
------------------------------------------------------------------------
r1572 | sears.russell@gmail.com | 2011-12-20 22:37:54 -0500 (Tue, 20
Dec 2011) | 1 line
add some missing #include<config.h> lines
2012-04-21 16:52:31 +00:00
|
|
|
} END_TEST
|
|
|
|
START_TEST(io_raid0pfileTest) {
|
|
|
|
printf("io_raid0pfileTest\n"); fflush(stdout);
|
|
|
|
uint32_t stripe_size = PAGE_SIZE;
|
|
|
|
const char * A = "vol1.txt";
|
|
|
|
const char * B = "vol2.txt";
|
|
|
|
|
|
|
|
remove(A);
|
|
|
|
remove(B);
|
|
|
|
|
|
|
|
|
|
|
|
stasis_handle_t *h;
|
|
|
|
stasis_handle_t *hp[2];
|
|
|
|
|
|
|
|
hp[0] = stasis_handle(open_pfile)(A, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
hp[1] = stasis_handle(open_pfile)(B, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
h = stasis_handle_open_raid0(2, hp, stripe_size);
|
|
|
|
|
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_smoketest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
|
|
|
remove(A);
|
|
|
|
remove(B);
|
|
|
|
|
|
|
|
hp[0] = stasis_handle(open_pfile)(A, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
hp[1] = stasis_handle(open_pfile)(B, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
h = stasis_handle_open_raid0(2, hp, stripe_size);
|
|
|
|
|
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_sequentialtest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
|
|
|
remove(A);
|
|
|
|
remove(B);
|
|
|
|
|
|
|
|
hp[0] = stasis_handle(open_pfile)(A, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
hp[1] = stasis_handle(open_pfile)(B, O_CREAT | O_RDWR, FILE_PERM);
|
|
|
|
h = stasis_handle_open_raid0(2, hp, stripe_size);
|
|
|
|
|
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_concurrencytest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
|
|
|
remove(A);
|
|
|
|
remove(B);
|
|
|
|
|
2007-08-20 16:23:57 +00:00
|
|
|
} END_TEST
|
2011-04-20 20:46:38 +00:00
|
|
|
/*
|
|
|
|
static stasis_handle_t * fast_factory(lsn_t off, lsn_t len, void * ignored) {
|
|
|
|
stasis_handle_t * h = stasis_handle(open_memory)(off);
|
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
stasis_write_buffer_t * w = h->append_buffer(h, len);
|
|
|
|
w->h->release_write_buffer(w);
|
2007-08-20 16:23:57 +00:00
|
|
|
|
2011-04-20 20:46:38 +00:00
|
|
|
return h;
|
|
|
|
|
|
|
|
}
|
2006-10-28 03:33:02 +00:00
|
|
|
typedef struct sf_args {
|
|
|
|
char * filename;
|
|
|
|
int openMode;
|
|
|
|
int filePerm;
|
|
|
|
} sf_args;
|
|
|
|
|
2010-01-06 23:44:07 +00:00
|
|
|
static stasis_handle_t * slow_factory_file(void * argsP) {
|
2006-10-28 03:33:02 +00:00
|
|
|
sf_args * args = (sf_args*) argsP;
|
|
|
|
return stasis_handle(open_file)(0, args->filename, args->openMode, args->filePerm);
|
|
|
|
}
|
2010-09-23 19:52:54 +00:00
|
|
|
static stasis_handle_t * slow_pfile_factory(void * argsP) {
|
|
|
|
stasis_handle_t * h = argsP;
|
|
|
|
return h;
|
|
|
|
}
|
|
|
|
static int slow_pfile_close(void * argsP) {
|
|
|
|
stasis_handle_t * h = argsP;
|
|
|
|
return h->close(h);
|
2010-01-06 23:44:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
START_TEST(io_nonBlockingTest_file) {
|
|
|
|
printf("io_nonBlockingTest\n"); fflush(stdout);
|
|
|
|
stasis_handle_t * h;
|
|
|
|
|
|
|
|
sf_args slow_args = {
|
|
|
|
"logfile.txt",
|
|
|
|
O_CREAT | O_RDWR,
|
|
|
|
FILE_PERM
|
|
|
|
};
|
|
|
|
|
|
|
|
h = stasis_handle(open_non_blocking)(slow_factory_file, 0, &slow_args, 0,
|
|
|
|
fast_factory, 0,
|
|
|
|
5, 1024*1024, 100);
|
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_smoketest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2010-01-06 23:44:07 +00:00
|
|
|
|
|
|
|
h = stasis_handle(open_non_blocking)(slow_factory_file, 0, &slow_args, 0,
|
|
|
|
fast_factory, 0,
|
|
|
|
5, 1024*1024, 100);
|
|
|
|
//h = stasis_handle(open_debug)(h);
|
|
|
|
handle_sequentialtest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2010-01-06 23:44:07 +00:00
|
|
|
|
|
|
|
h = stasis_handle(open_non_blocking)(slow_factory_file, 0, &slow_args, 0,
|
|
|
|
fast_factory, 0,
|
|
|
|
5, 1024 * 1024, 100);
|
|
|
|
handle_concurrencytest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2010-01-06 23:44:07 +00:00
|
|
|
|
|
|
|
} END_TEST
|
|
|
|
|
2006-10-28 03:33:02 +00:00
|
|
|
|
2010-01-06 23:44:07 +00:00
|
|
|
START_TEST(io_nonBlockingTest_pfile) {
|
2007-10-22 20:48:12 +00:00
|
|
|
printf("io_nonBlockingTest\n"); fflush(stdout);
|
2006-10-26 05:48:30 +00:00
|
|
|
stasis_handle_t * h;
|
|
|
|
|
2006-10-28 03:33:02 +00:00
|
|
|
sf_args slow_args = {
|
|
|
|
"logfile.txt",
|
2009-04-14 20:21:05 +00:00
|
|
|
O_CREAT | O_RDWR,
|
2006-10-28 03:33:02 +00:00
|
|
|
FILE_PERM
|
|
|
|
};
|
|
|
|
|
2010-09-23 19:52:54 +00:00
|
|
|
stasis_handle_t * pfile_singleton = slow_factory_file(&slow_args);
|
|
|
|
|
|
|
|
h = stasis_handle(open_non_blocking)(slow_pfile_factory, slow_pfile_close, pfile_singleton, 0,
|
2006-10-28 03:33:02 +00:00
|
|
|
fast_factory, 0,
|
2006-11-21 06:49:16 +00:00
|
|
|
5, 1024*1024, 100);
|
2006-10-18 00:57:36 +00:00
|
|
|
// h = stasis_handle(open_debug)(h);
|
|
|
|
handle_smoketest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2006-10-18 00:57:36 +00:00
|
|
|
|
2010-09-23 19:52:54 +00:00
|
|
|
pfile_singleton = slow_factory_file(&slow_args);
|
|
|
|
h = stasis_handle(open_non_blocking)(slow_pfile_factory, slow_pfile_close, pfile_singleton, 0,
|
2007-10-23 01:51:03 +00:00
|
|
|
fast_factory, 0,
|
2006-11-21 06:49:16 +00:00
|
|
|
5, 1024*1024, 100);
|
2006-10-18 00:57:36 +00:00
|
|
|
//h = stasis_handle(open_debug)(h);
|
|
|
|
handle_sequentialtest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2006-10-18 00:57:36 +00:00
|
|
|
|
2010-09-23 19:52:54 +00:00
|
|
|
pfile_singleton = slow_factory_file(&slow_args);
|
|
|
|
h = stasis_handle(open_non_blocking)(slow_pfile_factory, slow_pfile_close, pfile_singleton, 0,
|
2007-10-23 01:51:03 +00:00
|
|
|
fast_factory, 0,
|
2006-11-21 06:49:16 +00:00
|
|
|
5, 1024 * 1024, 100);
|
2006-10-18 00:57:36 +00:00
|
|
|
handle_concurrencytest(h);
|
|
|
|
h->close(h);
|
|
|
|
|
2010-12-03 03:51:24 +00:00
|
|
|
remove("logfile.txt");
|
2006-10-18 00:57:36 +00:00
|
|
|
|
|
|
|
} END_TEST
|
2011-04-20 20:46:38 +00:00
|
|
|
*/
|
2006-10-26 05:48:30 +00:00
|
|
|
|
2009-04-14 20:21:05 +00:00
|
|
|
/**
|
2006-10-13 04:39:03 +00:00
|
|
|
Add suite declarations here
|
|
|
|
*/
|
|
|
|
Suite * check_suite(void) {
|
|
|
|
Suite *s = suite_create("io");
|
|
|
|
/* Begin a new test */
|
|
|
|
TCase *tc = tcase_create("io_test");
|
2009-08-08 07:50:06 +00:00
|
|
|
// tcase_set_timeout(tc, 1800); // thirty minute timeout
|
2006-10-13 04:39:03 +00:00
|
|
|
|
|
|
|
/* Sub tests are added, one per line, here */
|
2006-11-22 05:03:32 +00:00
|
|
|
tcase_add_test(tc, io_memoryTest);
|
|
|
|
tcase_add_test(tc, io_fileTest);
|
2007-08-20 16:23:57 +00:00
|
|
|
tcase_add_test(tc, io_pfileTest);
|
2010-12-03 03:51:24 +00:00
|
|
|
tcase_add_test(tc, io_raid1pfileTest);
|
merge in changes from svn[r1572..r1601]
------------------------------------------------------------------------
r1601 | sears.russell@gmail.com | 2012-03-20 18:43:00 -0400 (Tue, 20
Mar 2012) | 1 line
commit bLSM bloom filter to stasis/util, which is where it really
belongs
------------------------------------------------------------------------
r1600 | sears.russell@gmail.com | 2012-03-04 01:58:38 -0500 (Sun, 04
Mar 2012) | 1 line
fix memory leak in skiplist unit test (now it is valgrind clean)
------------------------------------------------------------------------
r1599 | sears.russell@gmail.com | 2012-03-04 01:58:05 -0500 (Sun, 04
Mar 2012) | 1 line
fix typo in finalize type
------------------------------------------------------------------------
r1598 | sears.russell@gmail.com | 2012-03-04 00:59:59 -0500 (Sun, 04
Mar 2012) | 1 line
add comparator and finalizer parameters to skiplist constructor
------------------------------------------------------------------------
r1597 | sears.russell@gmail.com | 2012-03-03 18:23:16 -0500 (Sat, 03
Mar 2012) | 1 line
bugfixes for skiplist
------------------------------------------------------------------------
r1596 | sears.russell@gmail.com | 2012-03-02 15:05:07 -0500 (Fri, 02
Mar 2012) | 1 line
updated concurrentSkipList. Seeing strange crashes
------------------------------------------------------------------------
r1595 | sears.russell@gmail.com | 2012-03-01 16:51:59 -0500 (Thu, 01
Mar 2012) | 1 line
add progress reports
------------------------------------------------------------------------
r1594 | sears.russell@gmail.com | 2012-02-28 13:17:05 -0500 (Tue, 28
Feb 2012) | 1 line
experimental support for automatic logfile preallocation
------------------------------------------------------------------------
r1593 | sears.russell@gmail.com | 2012-02-28 12:10:01 -0500 (Tue, 28
Feb 2012) | 1 line
add histogram reporting to rawIOPS benchmark
------------------------------------------------------------------------
r1592 | sears.russell@gmail.com | 2012-02-24 16:31:36 -0500 (Fri, 24
Feb 2012) | 1 line
userspace raid 0 implementation
------------------------------------------------------------------------
r1591 | sears.russell@gmail.com | 2012-02-12 01:47:25 -0500 (Sun, 12
Feb 2012) | 1 line
add skiplist unit test, fix compile warnings
------------------------------------------------------------------------
r1590 | sears.russell@gmail.com | 2012-02-12 00:52:52 -0500 (Sun, 12
Feb 2012) | 1 line
fix compile error
------------------------------------------------------------------------
r1589 | sears.russell@gmail.com | 2012-02-12 00:50:21 -0500 (Sun, 12
Feb 2012) | 1 line
fix some bugs in hazard.h surrounding thread list management and
overruns of R under high contention
------------------------------------------------------------------------
r1588 | sears.russell@gmail.com | 2012-02-11 14:23:10 -0500 (Sat, 11
Feb 2012) | 1 line
add hazard pointer for get_lock. It was implicitly blowing away the
hazard pointer protecting y in the caller
------------------------------------------------------------------------
r1587 | sears.russell@gmail.com | 2012-02-10 18:51:25 -0500 (Fri, 10
Feb 2012) | 1 line
fix null pointer bug
------------------------------------------------------------------------
r1586 | sears.russell@gmail.com | 2012-02-10 18:03:39 -0500 (Fri, 10
Feb 2012) | 1 line
add simple refcounting scheme to concurrentSkipList. This solves the
problem where a deleted node points to another deleted node, and we
only have a hazard pointer for the first node.
------------------------------------------------------------------------
r1585 | sears.russell@gmail.com | 2012-02-10 14:19:14 -0500 (Fri, 10
Feb 2012) | 1 line
add hazard pointers for update using the smallest free slot first. The
old method left a race condition, since hazard_scan stops at the first
null pointer.
------------------------------------------------------------------------
r1584 | sears.russell@gmail.com | 2012-02-10 02:45:30 -0500 (Fri, 10
Feb 2012) | 1 line
add hazard pointers for update array
------------------------------------------------------------------------
r1583 | sears.russell@gmail.com | 2012-02-10 00:04:50 -0500 (Fri, 10
Feb 2012) | 1 line
skiplist update: concurrent, but broken
------------------------------------------------------------------------
r1582 | sears.russell@gmail.com | 2012-02-09 17:44:27 -0500 (Thu, 09
Feb 2012) | 1 line
skip list implementation. Not concurrent yet.
------------------------------------------------------------------------
r1581 | sears.russell@gmail.com | 2012-02-08 13:33:29 -0500 (Wed, 08
Feb 2012) | 1 line
Commit of a bunch of new, unused code: KISS random number generator,
Hazard Pointers, SUX latches (untested) and bit twiddling for
concurrent b-tree
------------------------------------------------------------------------
r1580 | sears.russell@gmail.com | 2012-01-17 19:17:37 -0500 (Tue, 17
Jan 2012) | 1 line
fix typo
------------------------------------------------------------------------
r1579 | sears.russell@gmail.com | 2012-01-11 18:33:31 -0500 (Wed, 11
Jan 2012) | 1 line
static build fixes for linux. hopefully these do not break macos...
------------------------------------------------------------------------
r1578 | sears.russell@gmail.com | 2012-01-09 19:13:34 -0500 (Mon, 09
Jan 2012) | 1 line
fix cmake under linux
------------------------------------------------------------------------
r1577 | sears.russell@gmail.com | 2012-01-09 18:37:15 -0500 (Mon, 09
Jan 2012) | 1 line
fix linux static binary compilation bugs
------------------------------------------------------------------------
r1576 | sears.russell | 2012-01-09 18:00:08 -0500 (Mon, 09 Jan 2012) |
1 line
port to macos x
------------------------------------------------------------------------
r1575 | sears.russell | 2012-01-09 17:39:43 -0500 (Mon, 09 Jan 2012) |
1 line
add missing _ from sync call name
------------------------------------------------------------------------
r1574 | sears.russell@gmail.com | 2012-01-09 14:26:31 -0500 (Mon, 09
Jan 2012) | 1 line
add -rt flag to static builds
------------------------------------------------------------------------
r1573 | sears.russell@gmail.com | 2011-12-20 23:38:29 -0500 (Tue, 20
Dec 2011) | 1 line
Simple makefile geared toward building libstasis.so and libstasis.a
(and nothing else)
------------------------------------------------------------------------
r1572 | sears.russell@gmail.com | 2011-12-20 22:37:54 -0500 (Tue, 20
Dec 2011) | 1 line
add some missing #include<config.h> lines
2012-04-21 16:52:31 +00:00
|
|
|
tcase_add_test(tc, io_raid0pfileTest);
|
2010-12-03 03:51:24 +00:00
|
|
|
//tcase_add_test(tc, io_nonBlockingTest_file);
|
|
|
|
//tcase_add_test(tc, io_nonBlockingTest_pfile);
|
2006-10-13 04:39:03 +00:00
|
|
|
/* --------------------------------------------- */
|
|
|
|
tcase_add_checked_fixture(tc, setup, teardown);
|
|
|
|
suite_add_tcase(s, tc);
|
|
|
|
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "../check_setup.h"
|