mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-26 08:41:47 -07:00
Get the mmqa conerr tests working:
* Make sure all the test build and run. * Add output specifications to the passing tests. * New testset/conerr runs them all. Copied from Perforce Change: 187248 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
4372c9d685
commit
5ed62f110b
66 changed files with 396 additions and 554 deletions
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = create an arena and then destroy it, twice!
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = destroy an arena without creating it
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -11,7 +13,7 @@ END_HEADER
|
|||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_arena_t arena = (mps_arena_t)1;
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
comment("Destroy arena.");
|
||||
|
|
|
|||
|
|
@ -4,44 +4,23 @@ TEST_HEADER
|
|||
summary = destroy a format though uncreated
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Format, format)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpscmv.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
|
||||
mps_fmt_t format = (mps_fmt_t)&format;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
|
||||
/* cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
*/
|
||||
|
||||
mps_fmt_destroy(format);
|
||||
comment("Destroyed format.");
|
||||
|
||||
|
|
|
|||
|
|
@ -4,42 +4,24 @@ TEST_HEADER
|
|||
summary = destroy a format twice
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Format, format)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpscmv.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
mps_fmt_destroy(format);
|
||||
comment("Destroyed format.");
|
||||
|
|
|
|||
|
|
@ -10,40 +10,17 @@ END_HEADER
|
|||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
mps_pool_t pool;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_lo(), format),
|
||||
"create pool");
|
||||
cdie(mps_pool_create(&pool, arena, mps_class_lo(), format), "create pool");
|
||||
|
||||
mps_fmt_destroy(format);
|
||||
comment("Destroyed format.");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = create a pool in an uncreated arena
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= global.c
|
||||
assertcond = TESTT(Arena, arena)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = create a pool in a destroyed arena
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = destroy an uncreated pool
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -13,7 +15,7 @@ END_HEADER
|
|||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
mps_pool_t pool = (mps_pool_t)1;
|
||||
size_t extendBy;
|
||||
size_t avgSize;
|
||||
size_t maxSize;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = destroy a pool twice
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Pool, pool)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,56 +1,33 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = destroy a pool though containining an AP
|
||||
summary = destroy a pool though containing an AP
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= ring.c
|
||||
assertcond = ring->next == ring
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return *(mps_addr_t *)object;
|
||||
}
|
||||
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
mps_ap_t ap;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
cdie(mps_pool_create(&pool, arena, mps_class_lo(), format), "create pool");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_lo(), format),
|
||||
"create pool");
|
||||
|
||||
cdie(
|
||||
mps_ap_create(&ap, pool, mps_rank_exact()),
|
||||
"create ap");
|
||||
cdie(mps_ap_create(&ap, pool, mps_rank_exact()), "create ap");
|
||||
|
||||
/*
|
||||
mps_ap_destroy(ap);
|
||||
|
|
|
|||
|
|
@ -10,39 +10,19 @@ END_HEADER
|
|||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return *(mps_addr_t *)object;
|
||||
}
|
||||
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_arena_t arena0;
|
||||
mps_arena_t arena1;
|
||||
mps_pool_t pool;
|
||||
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena 0");
|
||||
cdie(mps_arena_create(&arena1), "create arena 1");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_arena_create(&arena0, mps_arena_class_vm(), mmqaArenaSIZE), "create arena 0");
|
||||
cdie(mps_arena_create(&arena1, mps_arena_class_vm(), mmqaArenaSIZE), "create arena 1");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
mps_fmt_create_k(&format, arena0, mps_args_none),
|
||||
"create format in arena 0");
|
||||
|
||||
cdie(
|
||||
|
|
@ -55,7 +35,7 @@ static void test(void)
|
|||
mps_fmt_destroy(format);
|
||||
comment("Destroyed format.");
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
mps_arena_destroy(arena0);
|
||||
comment("Destroyed arena 0.");
|
||||
mps_arena_destroy(arena1);
|
||||
comment("Destroyed arena 1.");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = alloc in an uncreated pool
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -13,7 +15,7 @@ END_HEADER
|
|||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
mps_pool_t pool = (mps_pool_t)1;
|
||||
size_t extendBy;
|
||||
size_t avgSize;
|
||||
size_t maxSize;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = destroy an arena which isn't an arena
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= global.c
|
||||
assertcond = TESTT(Arena, arena)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = alloc in an destroyed pool
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Pool, pool)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = free in a destroyed pool
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Pool, pool)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = free though not allocated
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= tract.c
|
||||
assertcond = found
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -18,7 +22,7 @@ static void test(void)
|
|||
size_t avgSize;
|
||||
size_t maxSize;
|
||||
|
||||
mps_addr_t obj;
|
||||
mps_addr_t obj = (mps_addr_t)1;
|
||||
|
||||
extendBy = (size_t) 4096;
|
||||
avgSize = (size_t) 32;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = free though not allocated
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= tract.c
|
||||
assertcond = found
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,42 +4,27 @@ TEST_HEADER
|
|||
summary = alloc in pool not supporting alloc
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= poolabs.c
|
||||
assertcond = unreachable code
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
|
||||
mps_addr_t obj;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
mps_fmt_create_k(&format, arena, mps_args_none),
|
||||
"create format");
|
||||
|
||||
cdie(
|
||||
|
|
|
|||
|
|
@ -1,54 +1,37 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = free in pool not supporting alloc (n.b. this means no alloc at the moment)
|
||||
summary = free in pool not supporting free
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= poolabs.c
|
||||
assertcond = unreachable code
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
|
||||
mps_ap_t ap;
|
||||
mps_addr_t obj;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
cdie(mps_pool_create(&pool, arena, mps_class_lo(), format), "create pool");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_lo(), format),
|
||||
"create pool");
|
||||
cdie(mps_ap_create(&ap, pool), "create ap");
|
||||
|
||||
/*
|
||||
cdie(mps_alloc(&obj, pool, 152), "allocate");
|
||||
*/
|
||||
cdie(mps_reserve(&obj, ap, 152), "reserve");
|
||||
mps_commit(ap, &obj, 152);
|
||||
|
||||
mps_free(pool, obj, 152);
|
||||
comment("Freed.");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = free in the wrong pool
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= pool.c
|
||||
assertcond = PoolHasRange(pool, old, AddrAdd(old, size))
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -13,33 +17,21 @@ END_HEADER
|
|||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
mps_pool_t pool0;
|
||||
mps_pool_t pool1;
|
||||
size_t extendBy;
|
||||
size_t avgSize;
|
||||
size_t maxSize;
|
||||
|
||||
mps_addr_t obj;
|
||||
|
||||
extendBy = (size_t) 4096;
|
||||
avgSize = (size_t) 32;
|
||||
maxSize = (size_t) 65536;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_mv(),
|
||||
extendBy, avgSize, maxSize),
|
||||
"create pool 0");
|
||||
cdie(mps_pool_create_k(&pool0, arena, mps_class_mv(), mps_args_none),
|
||||
"create pool 0");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool1, arena, mps_class_mv(),
|
||||
extendBy, avgSize, maxSize),
|
||||
"create pool 1");
|
||||
cdie(mps_pool_create(&pool1, arena, mps_class_mv(), mps_args_none),
|
||||
"create pool 1");
|
||||
|
||||
cdie(mps_alloc(&obj, pool, 152), "allocate in 0");
|
||||
cdie(mps_alloc(&obj, pool0, 152), "allocate in 0");
|
||||
|
||||
mps_free(pool, obj, 512);
|
||||
mps_free(pool1, obj, 512);
|
||||
comment("Freed in 1.");
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = free in the wrong pool (and a destroyed pool at that!)
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Pool, pool)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -13,39 +17,27 @@ END_HEADER
|
|||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
mps_pool_t pool0;
|
||||
mps_pool_t pool1;
|
||||
size_t extendBy;
|
||||
size_t avgSize;
|
||||
size_t maxSize;
|
||||
|
||||
mps_addr_t obj;
|
||||
|
||||
extendBy = (size_t) 4096;
|
||||
avgSize = (size_t) 32;
|
||||
maxSize = (size_t) 65536;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_mv(),
|
||||
extendBy, avgSize, maxSize),
|
||||
"create pool 0");
|
||||
cdie(mps_pool_create_k(&pool0, arena, mps_class_mv(), mps_args_none),
|
||||
"create pool 0");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool1, arena, mps_class_mv(),
|
||||
extendBy, avgSize, maxSize),
|
||||
"create pool 1");
|
||||
cdie(mps_pool_create_k(&pool1, arena, mps_class_mv(), mps_args_none),
|
||||
"create pool 1");
|
||||
|
||||
cdie(mps_alloc(&obj, pool, 152), "allocate in 0");
|
||||
cdie(mps_alloc(&obj, pool0, 152), "allocate in 0");
|
||||
|
||||
mps_pool_destroy(pool1);
|
||||
comment("Pool 1 destroyed.");
|
||||
|
||||
mps_free(pool, obj, 512);
|
||||
mps_free(pool1, obj, 512);
|
||||
comment("Freed in 1.");
|
||||
|
||||
mps_pool_destroy(pool);
|
||||
mps_pool_destroy(pool0);
|
||||
comment("Pool 0 destroyed.");
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,55 +4,26 @@ TEST_HEADER
|
|||
summary = create an AP in an uncreated pool
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return *(mps_addr_t *)object;
|
||||
}
|
||||
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
|
||||
mps_pool_t pool = (mps_pool_t)1;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
mps_ap_t ap;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
|
||||
/*
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_lo(), format),
|
||||
"create pool");
|
||||
*/
|
||||
|
||||
cdie(
|
||||
mps_ap_create(&ap, pool, mps_rank_exact()),
|
||||
"create ap");
|
||||
cdie(mps_ap_create(&ap, pool, mps_rank_exact()), "create ap");
|
||||
|
||||
mps_ap_destroy(ap);
|
||||
comment("Destroyed ap.");
|
||||
|
|
|
|||
|
|
@ -4,56 +4,33 @@ TEST_HEADER
|
|||
summary = create an AP in a destroyed pool
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Pool, pool)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return *(mps_addr_t *)object;
|
||||
}
|
||||
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
mps_ap_t ap;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_lo(), format),
|
||||
"create pool");
|
||||
cdie(mps_pool_create(&pool, arena, mps_class_lo(), format), "create pool");
|
||||
|
||||
mps_pool_destroy(pool);
|
||||
comment("Destroyed pool.");
|
||||
|
||||
cdie(
|
||||
mps_ap_create(&ap, pool, mps_rank_exact()),
|
||||
"create ap");
|
||||
cdie(mps_ap_create(&ap, pool, mps_rank_exact()), "create ap");
|
||||
|
||||
mps_ap_destroy(ap);
|
||||
comment("Destroyed ap.");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = destroy an arena which isn't an arena, with a pointer in
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= global.c
|
||||
assertcond = TESTT(Arena, arena)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -13,7 +17,7 @@ static void test(void)
|
|||
{
|
||||
mps_arena_t arena;
|
||||
|
||||
arena = &arena;
|
||||
arena = (mps_arena_t)&arena;
|
||||
mps_arena_destroy(arena);
|
||||
comment("Destroy arena.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,29 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = create an AP in a destroyed pool
|
||||
summary = destroy an uncreated AP
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return *(mps_addr_t *)object;
|
||||
}
|
||||
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
mps_ap_t ap;
|
||||
mps_ap_t ap = (mps_ap_t)1;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_lo(), format),
|
||||
"create pool");
|
||||
|
||||
/*
|
||||
cdie(
|
||||
mps_ap_create(&ap, pool, mps_rank_exact()),
|
||||
"create ap");
|
||||
*/
|
||||
cdie(mps_pool_create(&pool, arena, mps_class_lo(), format), "create pool");
|
||||
|
||||
mps_ap_destroy(ap);
|
||||
comment("Destroyed ap.");
|
||||
|
|
|
|||
|
|
@ -4,53 +4,30 @@ TEST_HEADER
|
|||
summary = destroy an AP twice
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Buffer, buf)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpsclo.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return *(mps_addr_t *)object;
|
||||
}
|
||||
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
mps_ap_t ap;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
cdie(mps_pool_create(&pool, arena, mps_class_lo(), format), "create pool");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_lo(), format),
|
||||
"create pool");
|
||||
|
||||
cdie(
|
||||
mps_ap_create(&ap, pool, mps_rank_exact()),
|
||||
"create ap");
|
||||
cdie(mps_ap_create(&ap, pool, mps_rank_exact()), "create ap");
|
||||
|
||||
mps_ap_destroy(ap);
|
||||
comment("Destroyed ap.");
|
||||
|
|
|
|||
|
|
@ -4,36 +4,27 @@ TEST_HEADER
|
|||
summary = create AP in a pool that doesn't support it
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= poolabs.c
|
||||
assertcond = unreachable code
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpscmv.h"
|
||||
#include "mpscmfs.h"
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
size_t extendBy;
|
||||
size_t avgSize;
|
||||
size_t maxSize;
|
||||
mps_ap_t ap;
|
||||
|
||||
mps_addr_t obj;
|
||||
|
||||
extendBy = (size_t) 4096;
|
||||
avgSize = (size_t) 32;
|
||||
maxSize = (size_t) 65536;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_mv(),
|
||||
extendBy, avgSize, maxSize),
|
||||
"create pool");
|
||||
cdie(mps_pool_create(&pool, arena, mps_class_mfs(), 64), "create pool");
|
||||
|
||||
cdie(mps_ap_create(&ap, pool, mps_rank_exact()),
|
||||
"create ap");
|
||||
cdie(mps_ap_create(&ap, pool, mps_rank_exact()), "create ap");
|
||||
|
||||
mps_pool_destroy(pool);
|
||||
comment("Destroyed pool");
|
||||
|
|
|
|||
|
|
@ -8,57 +8,29 @@ END_HEADER
|
|||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpscamc.h"
|
||||
|
||||
#define genCOUNT (3)
|
||||
|
||||
static mps_gen_param_s testChain[genCOUNT] = {
|
||||
{ 6000, 0.90 }, { 8000, 0.65 }, { 16000, 0.50 } };
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return *(mps_addr_t *)object;
|
||||
}
|
||||
|
||||
#include "mpscams.h"
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
|
||||
mps_chain_t chain;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
mps_ap_t ap;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 4;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format);
|
||||
cdie(mps_pool_create_k(&pool, arena, mps_class_ams(), args),
|
||||
"create pool");
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_amc(), format, chain),
|
||||
"create pool");
|
||||
|
||||
cdie(
|
||||
mps_ap_create(&ap, pool, mps_rank_ambig()),
|
||||
"create ap");
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_RANK, mps_rank_weak());
|
||||
cdie(mps_ap_create_k(&ap, pool, args), "create ap");
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
mps_ap_destroy(ap);
|
||||
comment("Destroyed ap.");
|
||||
|
|
@ -69,9 +41,6 @@ static void test(void)
|
|||
mps_fmt_destroy(format);
|
||||
comment("Destroyed format.");
|
||||
|
||||
mps_chain_destroy(chain);
|
||||
comment("Destroyed chain.");
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
comment("Destroyed arena.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,64 +8,34 @@ END_HEADER
|
|||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpscamc.h"
|
||||
|
||||
#define genCOUNT (3)
|
||||
|
||||
static mps_gen_param_s testChain[genCOUNT] = {
|
||||
{ 6000, 0.90 }, { 8000, 0.65 }, { 16000, 0.50 } };
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return *(mps_addr_t *)object;
|
||||
}
|
||||
|
||||
#include "mpscams.h"
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_pool_t pool;
|
||||
|
||||
mps_chain_t chain;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
mps_ap_t ap;
|
||||
mps_addr_t p;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 4;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format);
|
||||
cdie(mps_pool_create_k(&pool, arena, mps_class_ams(), args),
|
||||
"create pool");
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_RANK, mps_rank_weak());
|
||||
cdie(mps_ap_create_k(&ap, pool, args), "create ap");
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
cdie(
|
||||
mps_pool_create(&pool, arena, mps_class_amc(), format, chain),
|
||||
"create pool");
|
||||
|
||||
cdie(
|
||||
mps_ap_create(&ap, pool, mps_rank_ambig()),
|
||||
"create ap");
|
||||
|
||||
do
|
||||
{
|
||||
do {
|
||||
cdie(mps_reserve(&p, ap, 0x100), "Reserve: ");
|
||||
}
|
||||
while (!mps_commit(ap, p, 0x100));
|
||||
} while (!mps_commit(ap, p, 0x100));
|
||||
comment("Committed.");
|
||||
|
||||
mps_ap_destroy(ap);
|
||||
|
|
@ -77,9 +47,6 @@ do
|
|||
mps_fmt_destroy(format);
|
||||
comment("Destroyed format.");
|
||||
|
||||
mps_chain_destroy(chain);
|
||||
comment("Destroyed chain.");
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
comment("Destroyed arena.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = allocate in uncreated AP
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -27,7 +29,7 @@ static void test(void)
|
|||
|
||||
mps_chain_t chain;
|
||||
mps_fmt_t format;
|
||||
mps_ap_t ap;
|
||||
mps_ap_t ap = (mps_ap_t)1;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = allocate in destroyed AP
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = TESTT(Buffer, buf)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = destroy AP between reserve and commit
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= buffer.c
|
||||
assertcond = BufferIsReady(buffer)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = reserve and commit with different address
|
||||
summary = reserve and commit (macros) with different address
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = p == mps_ap->init
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = reserve and commit with different address
|
||||
summary = reserve and commit (functions) with different address
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = p == mps_ap->init
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -14,6 +18,11 @@ END_HEADER
|
|||
#undef mps_reserve
|
||||
#undef mps_commit
|
||||
|
||||
#define genCOUNT (3)
|
||||
|
||||
static mps_gen_param_s testChain[genCOUNT] = {
|
||||
{ 6000, 0.90 }, { 8000, 0.65 }, { 16000, 0.50 } };
|
||||
|
||||
void *stackpointer;
|
||||
|
||||
static void test(void)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = reserve and commit with different sizes
|
||||
summary = reserve and commit (macros) with different sizes
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = PointerAdd(mps_ap->init, size) == mps_ap->alloc
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = reserve and commit with different sizes
|
||||
summary = reserve and commit (functions) with different sizes
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = PointerAdd(mps_ap->init, size) == mps_ap->alloc
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -14,6 +18,11 @@ END_HEADER
|
|||
#undef mps_reserve
|
||||
#undef mps_commit
|
||||
|
||||
#define genCOUNT (3)
|
||||
|
||||
static mps_gen_param_s testChain[genCOUNT] = {
|
||||
{ 6000, 0.90 }, { 8000, 0.65 }, { 16000, 0.50 } };
|
||||
|
||||
void *stackpointer;
|
||||
|
||||
static void test(void)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = commit without reserving
|
||||
summary = commit (macro) without reserving
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = p == mps_ap->init
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -28,7 +32,7 @@ static void test(void)
|
|||
mps_chain_t chain;
|
||||
mps_fmt_t format;
|
||||
mps_ap_t ap;
|
||||
mps_addr_t p;
|
||||
mps_addr_t p = (mps_addr_t)1;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
|
|
@ -53,7 +57,7 @@ static void test(void)
|
|||
mps_ap_create(&ap, pool, mps_rank_exact()),
|
||||
"create ap");
|
||||
|
||||
allocone(ap, 0, NULL, NULL, 0x20);
|
||||
allocone(ap, 0, NULL, NULL, 0x100);
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = commit without reserving
|
||||
summary = commit (function) without reserving
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = p == mps_ap->init
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -14,6 +18,11 @@ END_HEADER
|
|||
#undef mps_reserve
|
||||
#undef mps_commit
|
||||
|
||||
#define genCOUNT (3)
|
||||
|
||||
static mps_gen_param_s testChain[genCOUNT] = {
|
||||
{ 6000, 0.90 }, { 8000, 0.65 }, { 16000, 0.50 } };
|
||||
|
||||
void *stackpointer;
|
||||
|
||||
static void test(void)
|
||||
|
|
@ -26,7 +35,7 @@ static void test(void)
|
|||
mps_chain_t chain;
|
||||
mps_fmt_t format;
|
||||
mps_ap_t ap;
|
||||
mps_addr_t p;
|
||||
mps_addr_t p = (mps_addr_t)1;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
|
|
@ -51,7 +60,7 @@ static void test(void)
|
|||
mps_ap_create(&ap, pool, mps_rank_exact()),
|
||||
"create ap");
|
||||
|
||||
allocone(ap, 0, NULL, NULL, 0x20);
|
||||
allocone(ap, 0, NULL, NULL, 0x100);
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = destroy an arena which contains a pool
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= global.c
|
||||
assertcond = RingLength(&arenaGlobals->poolRing) == 5
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = reserve twice without committing
|
||||
summary = reserve (macro) twice without committing
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
END_HEADER
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
/*
|
||||
TEST_HEADER
|
||||
id = $Id$
|
||||
summary = reserve twice without committing
|
||||
summary = reserve (function) twice without committing
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= mpsi.c
|
||||
assertcond = mps_ap->init == mps_ap->alloc
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -14,6 +18,11 @@ END_HEADER
|
|||
#undef mps_reserve
|
||||
#undef mps_commit
|
||||
|
||||
#define genCOUNT (3)
|
||||
|
||||
static mps_gen_param_s testChain[genCOUNT] = {
|
||||
{ 6000, 0.90 }, { 8000, 0.65 }, { 16000, 0.50 } };
|
||||
|
||||
void *stackpointer;
|
||||
|
||||
static void test(void)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = create root in uncreated arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -15,7 +17,7 @@ void *stackpointer;
|
|||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_arena_t arena = (mps_arena_t)1;
|
||||
mps_root_t root;
|
||||
mps_addr_t roottable[10];
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = create root in destroyed arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = destroy root though uncreated
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -16,7 +18,7 @@ void *stackpointer;
|
|||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_root_t root;
|
||||
mps_root_t root = (mps_root_t)1;
|
||||
mps_addr_t roottable[10];
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = destroy root twice
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= root.c
|
||||
assertcond = TESTT(Root, root)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = create register root without registering thread
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -16,7 +18,7 @@ void *stackpointer;
|
|||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_thr_t thread;
|
||||
mps_thr_t thread = (mps_thr_t)1;
|
||||
mps_root_t root;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = register thread in uncreated arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -15,7 +17,7 @@ void *stackpointer;
|
|||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_arena_t arena = (mps_arena_t)1;
|
||||
mps_thr_t thread;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = register thread in destroyed arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = deregister thread without registering it first
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -16,7 +18,7 @@ void *stackpointer;
|
|||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_thr_t thread;
|
||||
mps_thr_t thread = (mps_thr_t)1;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ TEST_HEADER
|
|||
summary = deregister thread twice
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertcond = SigCheck Thread: thread
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,22 +4,16 @@ TEST_HEADER
|
|||
summary = destroy an arena which contains a format
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= global.c
|
||||
assertcond = RingIsSingle(&arena->formatRing)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpscmv.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
|
|
@ -27,18 +21,8 @@ static void test(void)
|
|||
mps_fmt_A_s fmtA;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
comment("Destroy arena.");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = reset ld in uncreated arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -13,7 +15,7 @@ END_HEADER
|
|||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_arena_t arena = (mps_arena_t)1;
|
||||
mps_ld_s ld;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = reset ld in destroyed arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = reset ld again, in destroyed arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = add to ld without resetting
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= ld.c
|
||||
assertcond = ld->_epoch <= arena->epoch
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = is_stale without resetting
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= ld.c
|
||||
assertcond = ld->_epoch <= arena->epoch
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = add to ld in destroyed arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ TEST_HEADER
|
|||
summary = isstale in destroyed arena
|
||||
language = c
|
||||
link = myfmt.o testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -13,20 +13,23 @@ END_HEADER
|
|||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_arena_t arena0;
|
||||
mps_arena_t arena1;
|
||||
mps_ld_s ld;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
cdie(mps_arena_create(&arena1), "create arena 1");
|
||||
cdie(mps_arena_create(&arena0, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
cdie(mps_arena_create(&arena1, mps_arena_class_vm(), mmqaArenaSIZE), "create arena 1");
|
||||
|
||||
mps_ld_reset(&ld, arena);
|
||||
mps_ld_reset(&ld, arena0);
|
||||
comment("Reset ld.");
|
||||
|
||||
mps_ld_add(&ld, arena1, &arena);
|
||||
mps_ld_add(&ld, arena1, &arena0);
|
||||
comment("Added to ld.");
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
mps_arena_destroy(arena0);
|
||||
comment("Destroyed arena.");
|
||||
|
||||
mps_arena_destroy(arena1);
|
||||
comment("Destroyed arena.");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,19 +13,22 @@ END_HEADER
|
|||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_arena_t arena0;
|
||||
mps_arena_t arena1;
|
||||
mps_ld_s ld;
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
cdie(mps_arena_create(&arena1), "create arena 1");
|
||||
cdie(mps_arena_create(&arena0, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
cdie(mps_arena_create(&arena1, mps_arena_class_vm(), mmqaArenaSIZE), "create arena 1");
|
||||
|
||||
mps_ld_reset(&ld, arena);
|
||||
mps_ld_reset(&ld, arena0);
|
||||
comment("Reset ld.");
|
||||
|
||||
report("isstale", "%d", mps_ld_isstale(&ld, arena1, &arena));
|
||||
report("isstale", "%d", mps_ld_isstale(&ld, arena1, &arena0));
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
mps_arena_destroy(arena0);
|
||||
comment("Destroyed arena.");
|
||||
|
||||
mps_arena_destroy(arena1);
|
||||
comment("Destroyed arena.");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = free though not allocated
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= poolmv.c
|
||||
assertcond = unreachable code
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = destroy an arena which contains a root
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= global.c
|
||||
assertcond = RingIsSingle(&arenaGlobals->rootRing)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
@ -27,6 +31,7 @@ static void test(void)
|
|||
mps_stack_scan_ambig, stackpointer, 0),
|
||||
"create root");
|
||||
|
||||
mps_thread_dereg(thread);
|
||||
mps_arena_destroy(arena);
|
||||
comment("Destroy arena.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ TEST_HEADER
|
|||
summary = destroy an arena which contains a thread
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= global.c
|
||||
assertcond = RingIsSingle(&arena->threadRing)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,43 +4,24 @@ TEST_HEADER
|
|||
summary = create a format in an uncreated arena
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
assert = true
|
||||
assertfile P= global.c
|
||||
assertcond = TESTT(Arena, arena)
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpscmv.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
|
||||
arena=malloc(64);
|
||||
|
||||
/* cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
*/
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
comment("Destroy arena.");
|
||||
|
|
|
|||
|
|
@ -4,45 +4,25 @@ TEST_HEADER
|
|||
summary = create a format in a destroyed arena
|
||||
language = c
|
||||
link = testlib.o
|
||||
OUTPUT_SPEC
|
||||
abort = true
|
||||
END_HEADER
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
#include "mpscmv.h"
|
||||
|
||||
static void zilch(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static mps_addr_t myskip(mps_addr_t object)
|
||||
{
|
||||
return object;
|
||||
}
|
||||
|
||||
static void test(void)
|
||||
{
|
||||
mps_arena_t arena;
|
||||
mps_fmt_t format;
|
||||
mps_fmt_A_s fmtA;
|
||||
|
||||
|
||||
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
||||
|
||||
fmtA.align = (mps_align_t) 1;
|
||||
fmtA.scan = &zilch;
|
||||
fmtA.skip = &myskip;
|
||||
fmtA.copy = &zilch;
|
||||
fmtA.fwd = &zilch;
|
||||
fmtA.isfwd = &zilch;
|
||||
fmtA.pad = &zilch;
|
||||
|
||||
mps_arena_destroy(arena);
|
||||
comment("Destroy arena.");
|
||||
|
||||
cdie(
|
||||
mps_fmt_create_A(&format, arena, &fmtA),
|
||||
"create format");
|
||||
cdie(mps_fmt_create_k(&format, arena, mps_args_none), "create format");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
65
mps/test/testsets/conerr
Normal file
65
mps/test/testsets/conerr
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
conerr/0.c
|
||||
conerr/1.c
|
||||
conerr/2.c
|
||||
conerr/3.c
|
||||
conerr/4.c
|
||||
conerr/5.c
|
||||
conerr/6.c
|
||||
conerr/7.c
|
||||
conerr/8.c
|
||||
conerr/9.c
|
||||
conerr/10.c
|
||||
conerr/11.c
|
||||
conerr/12.c
|
||||
conerr/13.c
|
||||
conerr/14.c
|
||||
conerr/15.c
|
||||
conerr/16.c
|
||||
conerr/17.c
|
||||
conerr/18.c
|
||||
conerr/19.c
|
||||
conerr/20.c
|
||||
conerr/21.c
|
||||
conerr/22.c
|
||||
conerr/23.c
|
||||
conerr/24.c
|
||||
conerr/25.c
|
||||
conerr/26.c
|
||||
conerr/27.c
|
||||
conerr/28.c
|
||||
conerr/29.c
|
||||
conerr/30.c
|
||||
conerr/31.c
|
||||
conerr/32.c
|
||||
conerr/33.c
|
||||
conerr/34.c
|
||||
conerr/35.c
|
||||
conerr/36.c
|
||||
conerr/37.c
|
||||
conerr/37f.c
|
||||
conerr/38.c
|
||||
conerr/38f.c
|
||||
conerr/39.c
|
||||
conerr/39f.c
|
||||
conerr/40.c
|
||||
conerr/40f.c
|
||||
conerr/41.c
|
||||
conerr/42.c
|
||||
conerr/43.c
|
||||
conerr/44.c
|
||||
conerr/44a.c
|
||||
conerr/45.c
|
||||
conerr/46.c
|
||||
conerr/47.c
|
||||
conerr/48.c
|
||||
conerr/49.c
|
||||
conerr/50.c
|
||||
conerr/51.c
|
||||
conerr/52.c
|
||||
conerr/53.c
|
||||
conerr/54.c
|
||||
conerr/55.c
|
||||
conerr/56.c
|
||||
conerr/57.c
|
||||
conerr/58.c
|
||||
conerr/59.c
|
||||
Loading…
Add table
Add a link
Reference in a new issue