Esempio n. 1
0
Suite *
make_test_libs_iguana_suite(void)
{
    Suite *suite;

    /*
     * During our tests we really want to make sure that the testing program
     * doesn't run out of memory, so we touch a lot of pages on our heap now to
     * make sure we have enough memory
     */
#ifdef CONFIG_LOWMEMORY
    {
        /*
         * Here we are evil and reduce our heap, but make it all mapped, so we
         * won't accidently fault
         */
#define PAGESIZE 0x1000
#define NUM_PAGES 5
        __malloc_top = __malloc_bss + NUM_PAGES * PAGESIZE;
        for (uintptr_t m = __malloc_bss; m < __malloc_top; m += PAGESIZE) {
            *((char *)m) = 'a';
        }
    }
#endif

    suite = suite_create("Iguana tests\n");

    suite_add_tcase(suite, cap_tests());

    suite_add_tcase(suite, pool_tests());
    suite_add_tcase(suite, memsect_tests());
    suite_add_tcase(suite, obj_tests());
#if defined(CONFIG_EAS)
    suite_add_tcase(suite, eas_tests());
#endif
#if defined(CONFIG_SESSIONS)
    suite_add_tcase(suite, session_tests());
#endif
    suite_add_tcase(suite, pd_tests());
    suite_add_tcase(suite, thread_tests());

#if !defined(__i386__)
    /*
     * the i386 link is nondeterministic. Sometimes it creates
     * one segement for the test binary, sometimes two. Disable
     * the test until a customer wants the feature on i386.
     */
    suite_add_tcase(suite, seg_info_tests());
#else
    (void)seg_info_tests;
#endif


    printf("Done create suites...\n");
    return suite;
}
Esempio n. 2
0
int main(int argc, char *argv[])
{
    int max;

    if (argc > 1)
        max = (int)strtol(argv[1], NULL, 10);
    else
        max = 256;

    info("Running basic tests...");
    basic_tests(max);

    info("Running object pool tests...");
    pool_tests();

    return 0;
}