aboutsummaryrefslogtreecommitdiffstats
path: root/rb
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2018-01-14 18:46:09 +0100
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2018-01-14 18:46:09 +0100
commitf65d8a06e55882a93f226c96f237921f28169547 (patch)
treebe7afd06d98ccfd4ca4102a41f285051e92d683c /rb
parent633217b7e53e089b3514f38a91c7f310c5ba760f (diff)
downloadlibrb-f65d8a06e55882a93f226c96f237921f28169547.tar.gz
librb-f65d8a06e55882a93f226c96f237921f28169547.tar.bz2
librb-f65d8a06e55882a93f226c96f237921f28169547.zip
limited number of run tests
build machines were crashing due to too big number of concurrent threads
Diffstat (limited to 'rb')
-rw-r--r--rb/tests.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/rb/tests.c b/rb/tests.c
index 8de1ae9..d9592f7 100644
--- a/rb/tests.c
+++ b/rb/tests.c
@@ -321,40 +321,38 @@ static void single_thread(void)
int main(void)
{
- unsigned int t_rblen_max = 1024;
- unsigned int t_readlen_max = 1024;
- unsigned int t_writelen_max = 1024;
- unsigned int t_objsize_max = 1024;
+ unsigned int t_rblen_max = 128;
+ unsigned int t_readlen_max = 128;
+ unsigned int t_writelen_max = 128;
+ unsigned int t_objsize_max = 128;
- unsigned int t_num_producers_max = 256;
- unsigned int t_num_consumers_max = 256;
+ unsigned int t_num_producers_max = 8;
+ unsigned int t_num_consumers_max = 8;
srand(time(NULL));
#if ENABLE_THREADS
- for (t_num_consumers = 2; t_num_consumers < t_num_consumers_max;
- t_num_consumers += rand() % 16)
+ for (t_num_consumers = 1; t_num_consumers <= t_num_consumers_max;
+ t_num_consumers++)
{
- for (t_num_producers = 2; t_num_producers < t_num_producers_max;
- t_num_producers += rand() % 16)
+ for (t_num_producers = 1; t_num_producers <= t_num_producers_max;
+ t_num_producers++)
{
mt_run(multi_producers_consumers);
}
}
#endif
- //mt_return();
-
for (t_rblen = 2; t_rblen < t_rblen_max; t_rblen *= 2)
{
for (t_readlen = 2; t_readlen < t_readlen_max;
- t_readlen += rand() % 512)
+ t_readlen += rand() % 128)
{
for (t_writelen = 2; t_writelen < t_writelen_max;
- t_writelen += rand() % 512)
+ t_writelen += rand() % 128)
{
for (t_objsize = 2; t_objsize < t_objsize_max;
- t_objsize += rand() % 512)
+ t_objsize += rand() % 128)
{
#if ENABLE_THREADS
mt_run(multi_thread);