Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
run: make
- name: make test
run: make test
- name: make testmmqa
run: make testmmqa

build-windows:

Expand All @@ -39,5 +41,5 @@ jobs:
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd code
nmake /f w3i6mv.nmk
nmake /f w3i6mv.nmk testci testansi testpollnone testmmqa
shell: cmd
10 changes: 10 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ test-xcode-build:

test: @TEST_TARGET@

# [Running the MMQA test suite seems to have the side effects of
# cleaning, so I'm keeping it separate rather than just appending
# "mmqa" to the normal make, for now. RB 2023-01-14]

testmmqa-make-build:
$(MAKE) $(TARGET_OPTS) testmmqa

# [How can we run MMQA with Xcode? RB 2023-01-14]

testmmqa: testmmqa-make-build

# C. COPYRIGHT AND LICENSE
#
Expand Down
2 changes: 1 addition & 1 deletion test/function/104.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static mps_res_t area_scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit, void
{
mycell *obj = base;
mps_res_t res;
mps_addr_t p, q;
mps_addr_t p;

switch (obj->tag & 0x3)
{
Expand Down
22 changes: 18 additions & 4 deletions test/function/136.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TEST_HEADER
link = testlib.o
OUTPUT_SPEC
assert = true
limit < 160000
limit_grains < 40
END_HEADER
*/

Expand Down Expand Up @@ -155,22 +155,36 @@ static void test(void *stack_pointer)
{
mps_thr_t thread;
int symm;
size_t grainSize = 4096;
size_t grainSize, smallSize = 8;
size_t comlimit;
mps_bool_t slotHigh, arenaHigh, firstFit;
mps_pool_t pool;
mps_addr_t addr;

MPS_ARGS_BEGIN(args) {
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, 1024*1024*50);
MPS_ARGS_ADD(args, MPS_KEY_ARENA_GRAIN_SIZE, grainSize);
cdie(mps_arena_create_k(&arena, mps_arena_class_vm(), args),
"create arena");
} MPS_ARGS_END(args);

/* Deduce arena grain size by creating an MVFF pool, allocating a
* small object, and querying the total size. */
MPS_ARGS_BEGIN(args) {
MPS_ARGS_ADD(args, MPS_KEY_EXTEND_BY, smallSize);
MPS_ARGS_ADD(args, MPS_KEY_MEAN_SIZE, smallSize);
die(mps_pool_create_k(&pool, arena, mps_class_mvff(), args),
"create MVFF pool");
} MPS_ARGS_END(args);
die(mps_alloc(&addr, pool, smallSize), "allocate small object");
grainSize = mps_pool_total_size(pool);
mps_free(pool, addr, smallSize);
mps_pool_destroy(pool);

cdie(mps_thread_reg(&thread, arena), "register thread");

for (comlimit = 128 * grainSize; comlimit > 0; comlimit -= grainSize) {
mps_arena_commit_limit_set(arena, comlimit);
report("limit", "%d", comlimit);
report("limit_grains", "%d", comlimit / grainSize);
symm = ranint(8);
slotHigh = (symm >> 2) & 1;
arenaHigh = (symm >> 1) & 1;
Expand Down
2 changes: 1 addition & 1 deletion test/function/97.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static mps_res_t area_scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit, void
{
mycell *obj = base;
mps_res_t res;
mps_addr_t p, q;
mps_addr_t p;

switch (obj->tag & 0x3)
{
Expand Down
4 changes: 3 additions & 1 deletion test/test/testlib/myfmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct mps_fmt_A_s fmtA =
&mypad
};

void fmtargs(mps_arg_s args[MPS_ARGS_MAX])
void fmtargs(mps_arg_s args[FMTARGS_ARGS_MAX])
{
args[0].key = MPS_KEY_ALIGN;
args[0].val.align = MPS_PF_ALIGN;
Expand All @@ -62,6 +62,8 @@ void fmtargs(mps_arg_s args[MPS_ARGS_MAX])
args[5].key = MPS_KEY_FMT_PAD;
args[5].val.fmt_pad = mypad;
args[6].key = MPS_KEY_ARGS_END;
/* FIXME: Is asserts appropriate here? RB 2023-01-17 */
asserts(FMTARGS_ARGS_MAX > 6, "not enough room for format arguments");
}

mycell *allocheader(mps_ap_t ap, mps_word_t data,
Expand Down
3 changes: 2 additions & 1 deletion test/test/testlib/myfmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ mycell *allocone(mps_ap_t ap, mps_word_t data,
mycell *allocheader(mps_ap_t ap, mps_word_t data,
mycell *ref0, mycell *ref1, size_t size, size_t header);

void fmtargs(mps_arg_s args[MPS_ARGS_MAX]);
#define FMTARGS_ARGS_MAX 7
void fmtargs(mps_arg_s args[FMTARGS_ARGS_MAX]);

#endif