Ejemplo n.º 1
0
int main(int argc, char * const argv[])
{
	if (initial_check(argc, argv))
		return 1;

	node = argv[1];

	libubi = libubi_open();
	if (libubi == NULL) {
		failed("libubi_open");
		return 1;
	}

	if (ubi_get_dev_info(libubi, node, &dev_info)) {
		failed("ubi_get_dev_info");
		goto close;
	}

	if (test_basic(UBI_DYNAMIC_VOLUME))
		goto close;
	if (test_basic(UBI_STATIC_VOLUME))
		goto close;
	if (test_rsvol(UBI_DYNAMIC_VOLUME))
		goto close;
	if (test_rsvol(UBI_STATIC_VOLUME))
		goto close;

	libubi_close(libubi);
	return 0;

close:
	libubi_close(libubi);
	return 1;
}
Ejemplo n.º 2
0
void test_basic_weight_balanced_tree()
{
    test_basic(wb_dict_new(dict_str_cmp, NULL), keys1, NKEYS1,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
    test_basic(wb_dict_new(dict_str_cmp, NULL), keys2, NKEYS2,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
}
Ejemplo n.º 3
0
void test_basic_skiplist()
{
    test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys1, NKEYS1,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
    test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys2, NKEYS2,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
}
Ejemplo n.º 4
0
void test_basic_red_black_tree()
{
    test_basic(rb_dict_new(dict_str_cmp, NULL), keys1, NKEYS1,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
    test_basic(rb_dict_new(dict_str_cmp, NULL), keys2, NKEYS2,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
}
Ejemplo n.º 5
0
void test_basic_treap()
{
    test_basic(tr_dict_new(dict_str_cmp, NULL, NULL), keys1, NKEYS1,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
    test_basic(tr_dict_new(dict_str_cmp, NULL, NULL), keys2, NKEYS2,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
}
Ejemplo n.º 6
0
void test_basic_weight_balanced_tree()
{
    test_basic(wb_dict_new(dict_str_cmp, NULL), keys1, NKEYS1,
	       cl_infos, N_CL_INFOS);
    test_basic(wb_dict_new(dict_str_cmp, NULL), keys2, NKEYS2,
	       cl_infos, N_CL_INFOS);
}
Ejemplo n.º 7
0
void test_basic_hashtable_nbuckets()
{
    test_basic(hashtable_dict_new(dict_str_cmp, strhash, NULL, 7),
	       keys1, NKEYS1, cl_infos, N_CL_INFOS);
    test_basic(hashtable_dict_new(dict_str_cmp, strhash, NULL, 7),
	       keys2, NKEYS2, cl_infos, N_CL_INFOS);
}
Ejemplo n.º 8
0
void test_basic_splay_tree()
{
    test_basic(sp_dict_new(dict_str_cmp, NULL), keys1, NKEYS1,
	       cl_infos, N_CL_INFOS);
    test_basic(sp_dict_new(dict_str_cmp, NULL), keys2, NKEYS2,
	       cl_infos, N_CL_INFOS);
}
Ejemplo n.º 9
0
void test_basic_treap()
{
    test_basic(tr_dict_new(dict_str_cmp, NULL, NULL), keys1, NKEYS1,
	       cl_infos, N_CL_INFOS);
    test_basic(tr_dict_new(dict_str_cmp, NULL, NULL), keys2, NKEYS2,
	       cl_infos, N_CL_INFOS);
}
Ejemplo n.º 10
0
void test_basic_red_black_tree()
{
    test_basic(rb_dict_new(dict_str_cmp, NULL), keys1, NKEYS1,
	       cl_infos, N_CL_INFOS);
    test_basic(rb_dict_new(dict_str_cmp, NULL), keys2, NKEYS2,
	       cl_infos, N_CL_INFOS);
}
Ejemplo n.º 11
0
void test_basic_skiplist()
{
    test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys1, NKEYS1,
	       cl_infos, N_CL_INFOS);
    test_basic(skiplist_dict_new(dict_str_cmp, NULL, 13), keys2, NKEYS2,
	       cl_infos, N_CL_INFOS);
}
Ejemplo n.º 12
0
void test_basic_hashtable_nbuckets()
{
    test_basic(hashtable_dict_new(dict_str_cmp, strhash, NULL, 7),
	       keys1, NKEYS1);
    test_basic(hashtable_dict_new(dict_str_cmp, strhash, NULL, 7),
	       keys2, NKEYS2);
}
Ejemplo n.º 13
0
void test_basic_path_reduction_tree()
{
    test_basic(pr_dict_new(dict_str_cmp, NULL), keys1, NKEYS1,
	       cl_infos, N_CL_INFOS);
    test_basic(pr_dict_new(dict_str_cmp, NULL), keys2, NKEYS2,
	       cl_infos, N_CL_INFOS);
}
Ejemplo n.º 14
0
int main(int argc, char *argv[])
{
    int n;

    printf("BorodinDB %s stress tests\n", VERSION);

    for (n = 1; n < argc; n++) {
        if (strcmp(argv[n], "-b") == 0)
            _do_benchmarks = 1;
        if (strcmp(argv[n], "-v") == 0)
            verbose = 1;
    }

    if (verbose)
        printf("\nIn-memory trees---------------------\n");

    test_basic(NULL);

    if (verbose)
        printf("\nFile-backed trees------------------------\n");

    test_basic("qq.boro");

    if (_do_benchmarks) {
        printf("\nIn-memory trees---------------------\n");
        boro_benchmark(NULL);
        printf("\nFile-backed trees------------------------\n");
        boro_benchmark("qq.boro");
    }
    else
        printf("(Run with -b to do benchmarks)\n");

    return test_summary();
}
Ejemplo n.º 15
0
void test_basic_hashtable2_nbuckets()
{
    test_basic(hashtable2_dict_new(dict_str_cmp, strhash, NULL, 7),
	       keys1, NKEYS1, closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
    test_basic(hashtable2_dict_new(dict_str_cmp, strhash, NULL, 7),
	       keys2, NKEYS2, closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
}
Ejemplo n.º 16
0
void test_basic_path_reduction_tree()
{
    test_basic(pr_dict_new(dict_str_cmp, NULL), keys1, NKEYS1,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
    test_basic(pr_dict_new(dict_str_cmp, NULL), keys2, NKEYS2,
	       closest_lookup_infos, NUM_CLOSEST_LOOKUP_INFOS);
}
Ejemplo n.º 17
0
int main(int argc, char *argv[])
{
    printf("Borodin stress tests\n");

    if (argc > 1 && strcmp(argv[1], "-b") == 0)
        _do_benchmarks = 1;

    if (verbose)
        printf("\nIn-memory trees---------------------\n");

    test_basic(NULL);

    if (verbose)
        printf("\nFile-backed trees------------------------\n");

    test_basic("qq.qq");

    test_rest();

#if 0
    boroidx_stree_tests();
#endif

    if (_do_benchmarks) {
        printf("\nIn-memory trees---------------------\n");
        brtr_benchmark(NULL);
        printf("\nFile-backed trees------------------------\n");
        brtr_benchmark("qq.qq");
    }
    else
        printf("(Run with -b to do benchmarks)\n");

    return test_summary();
}
Ejemplo n.º 18
0
int main()
{
  test_basic();
  test_capacity();
  test_comparison();
  test_composite_key();
  test_conv_iterators();
  test_copy_assignment();
  test_hash_ops();
  test_iterators();
  test_key_extractors();
  test_list_ops();
  test_modifiers();
  test_mpl_ops();
  test_observers();
  test_projection();
  test_range();
  test_rank_ops();
  test_rearrange();
  test_safe_mode();
  test_serialization();
  test_set_ops();
  test_special_set_ops();
  test_update();

  return boost::report_errors();
}
Ejemplo n.º 19
0
int main()
{
    test_basic();
    test_member();

    return hpx::util::report_errors();
}
Ejemplo n.º 20
0
int main()
{
#ifdef UNIX
    intercept_signal(SIGSEGV, signal_handler);
#else
    SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER) our_top_handler);
#endif

    test_leaks();

    test_basic();

    test_exception();

    test_mismatch_dtr();
    test_mismatch_int();

    std::cout << "bye" << std::endl;

    /* mismatches above end up causing RtlpCoalesceFreeBlocks to crash resulting
     * in failing app exit code: simpler to just exit
     */
    exit(0);

    return 0;
}
Ejemplo n.º 21
0
int main(int argc, char** argv)
{
	printf("KEY META     TESTS\n");
	printf("==================\n\n");

	init (argc, argv);
	test_basic();
	test_iterate();
	test_size();
	test_uid();
	test_dup();
	test_comment();
	test_owner();
	test_mode();
	test_type();
	test_examples();
	test_copy();
	test_ro();
	test_new();
	test_copyall();


	printf("\ntest_ks RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);

	return nbError;
}
Ejemplo n.º 22
0
int main(){
	test_basic();
	test_set_operations();
	test_picking();
	test_removing();
	printf("success\n");
	return 0;
}
Ejemplo n.º 23
0
int aim_main(int argc, char* argv[])
{
    test_bucket();
    test_basic();
    test_all();
    test_list();
    test_find();
    return 0;
}
Ejemplo n.º 24
0
Archivo: arith.c Proyecto: UIKit0/8cc
void testmain(void) {
    print("basic arithmetic");
    test_basic();
    test_relative();
    test_inc_dec();
    test_bool();
    test_ternary();
    test_comma();
}
Ejemplo n.º 25
0
int main(void) {
    test_basic();
    test_streaming();

    /* Normally not necessary to run test_large(), as it
     * deals with very large (3GB) files and is therefore slow.
     * test_large();
     */
    return 0;
}
Ejemplo n.º 26
0
int
main(int argc, char *argv[])
{
	vy_iterator_C_test_init(0);

	test_basic();
	test_iterator_restore_after_insertion();

	vy_iterator_C_test_finish();
	return 0;
}
Ejemplo n.º 27
0
int main (void)
{
    setup_test_environment ();
    test_basic ();
    test_unsubscribe_manual ();
    test_xpub_proxy_unsubscribe_on_disconnect ();
    test_missing_subscriptions ();
    test_unsubscribe_cleanup ();

    return 0;
}
Ejemplo n.º 28
0
int main(int argc, char *argv[]) 
{
	/* Test basic stuff */
	test_basic();
	/* Now test writing a complete xtc file */
	test_xtc();

	test_trr();
		
	return 0;
}
Ejemplo n.º 29
0
int
main(int argc, char **argv)
{
        test_basic();
        test_many_chars();
        test_uint();
        test_char_array();
        test_double();
        test_vec();
        test_vec_array();
        return 0;
}
Ejemplo n.º 30
0
int aim_main(int argc, char* argv[])
{
    (void) argc;
    (void) argv;

    test_basic();
    test_collisions();
    test_random();
    test_mask();

    return 0;
}