Skip to content

Commit 2fb091c

Browse files
committed
Update rev, remove whitelist and change default plan
Updated the `ruby` repo. It enabled more test cases that were disabled before. Removed the whitelist. Now we rely on the exclusion list in `test/.excludes-mmtk` in the `ruby` repo. Changed the default plan to StickyImmix since it has been stable so far. We also run bootstraptest/test_thread.rb with a fixed heap size in debug build because it allocates too aggressively and may cause timeout in CI.
1 parent 08a7e8d commit 2fb091c

File tree

7 files changed

+37
-156
lines changed

7 files changed

+37
-156
lines changed

.github/scripts/ci-btest.sh

+16-8
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,21 @@ echo "============ Bootstrape tests (btest) ($DEBUG_LEVEL) ============="
1010
if test "$DEBUG_LEVEL" == "vanilla"; then
1111
make btest TESTOPTS="-v -j${CI_JOBS}"
1212
else
13-
if test "$DEBUG_LEVEL" == "debug"; then
14-
# One test case in this file is taking too much time to run in debug mode, resulting in timeout.
15-
# It is because the default dynamic heap size does not work well with that pathological use case.
16-
# We simply run it with a fixed heap size and exclude it from the rest of the btests.
17-
TIMEOUT_TEST=../bootstraptest/test_eval.rb
18-
MMTK_GC_TRIGGER=FixedHeapSize:100m make btest RUN_OPTS="--mmtk-plan=$CHOSEN_PLAN" TESTOPTS="-v $TIMEOUT_TEST"
19-
rm $TIMEOUT_TEST
20-
fi
13+
# Some test cases take too much time to run in debug mode, resulting in timeout. It is
14+
# because the default GC trigger (dynamic heap size) does not scale the heap size fast
15+
# enough to keep up with the allocation. We simply run those tests with a fixed heap size
16+
# and exclude them from the rest of the btests.
17+
test_and_delete() {
18+
TEST_NAME=$1
19+
HEAP_SIZE=$2
20+
TEST_PATH=../bootstraptest/test_${TEST_NAME}.rb
21+
MMTK_GC_TRIGGER=FixedHeapSize:${HEAP_SIZE} make btest RUN_OPTS="--mmtk-plan=$CHOSEN_PLAN" TESTOPTS="-v $TEST_PATH"
22+
rm $TEST_PATH
23+
}
24+
25+
test_and_delete eval 100m
26+
test_and_delete thread 400m
27+
28+
# Run other btests in the regular way.
2129
make btest RUN_OPTS="--mmtk-plan=$CHOSEN_PLAN" TESTOPTS="-v -j${CI_JOBS}"
2230
fi

.github/scripts/ci-test-all.sh

-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ case $DEBUG_LEVEL in
1212
echo "Skipping test-all for $DEBUG_LEVEL..."
1313
;;
1414
release)
15-
TEST_CASES=$(cat $BINDING_PATH/ruby-test-cases.txt | grep -v '#' | ruby -ne 'puts "../#{$_}"' | xargs)
1615
make test-all \
17-
TESTS="$TEST_CASES" \
1816
RUN_OPTS="--mmtk-plan=$CHOSEN_PLAN" \
1917
TESTOPTS="-v --excludes-dir=../test/.excludes-mmtk -j${CI_JOBS}"
2018
;;

.github/scripts/common.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ RUBY_PATH=$BINDING_PATH/../ruby
33
RUBY_BUILD_PATH=$RUBY_PATH/build
44
RUBY_INSTALL_PATH=$RUBY_BUILD_PATH/install
55
RUSTUP_TOOLCHAIN=`cat $BINDING_PATH/mmtk/rust-toolchain`
6-
DEFAULT_PLAN=Immix
6+
DEFAULT_PLAN=StickyImmix
77

88
CI_JOBS=4
99

README.md

+17-12
Original file line numberDiff line numberDiff line change
@@ -251,28 +251,33 @@ make btest RUN_OPTS="--mmtk-plan=StickyImmix"
251251

252252
### All tests
253253

254-
Note that currently it is not our priority to support Ractor. Some tests
255-
involving Ractors are not enabled. You can get a list of enabled tests in the
256-
file `ruby-test-cases.txt`.
254+
We excluded some tests when testing against MMTk. Those test cases are listed
255+
in `test/.excludes-mmtk` in the [`mmtk/ruby`](https://github.com/mmtk/ruby.git)
256+
repository.
257257

258-
To run the tests
258+
- Test cases that involve Ractors are excluded because it is currently not a
259+
priority to support Ractors.
260+
- Test cases that involve YJIT are excluded because we have not started
261+
working on YJIT support, yet.
262+
- Some tests involve implementation details of CRuby's default GC, such as
263+
compaction and memsize. Those test cases are excluded, too.
264+
- Other excluded tests involve things that are not yet implemented properly in
265+
the MMTk binding.
259266

260-
```bash
261-
TEST_CASES=$(grep -v '#' ../../mmtk-ruby/ruby-test-cases.txt | awk '{print("../"$1)}' | xargs)
262-
make test-all TESTS="$TEST_CASES" RUN_OPTS="--mmtk-plan=StickyImmix"
263-
```
264-
265-
Or in one line:
267+
To run the tests, run the following command.
266268

267269
```bash
268-
make test-all TESTS="$(grep -v '#' ../../mmtk-ruby/ruby-test-cases.txt | awk '{print("../"$1)}' | xargs)" RUN_OPTS="--mmtk-plan=StickyImmix"
270+
make test-all RUN_OPTS="--mmtk-plan=StickyImmix" TESTOPTS="-v --excludes-dir=../test/.excludes-mmtk"
269271
```
270272

273+
That assumes you are in the `build-debug` or `build-release` directory. Adjust
274+
the path `../test/.excludes-mmtk` if you run it in a different directory.
275+
271276
## Current status
272277

273278
Known working:
274279
- Supports MarkSweep, Immix and StickyImmix GC algorithms
275-
- All test cases in `make btest`
280+
- Most test cases in `make btest`
276281
- Most test cases in `make test-all`
277282
- Liquid benchmark (https://github.com/Shopify/liquid/blob/master/performance/benchmark.rb)
278283

mmtk/Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mmtk/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ edition = "2021"
1212
# Metadata for the Ruby repository
1313
[package.metadata.ci-repos.ruby]
1414
repo = "mmtk/ruby" # This is used by actions/checkout, so the format is "owner/repo", not URL.
15-
rev = "8590762fa53459a8f20e26bd8dd19e1760618f6b"
15+
rev = "8c96eaf5cf4bb39610fc03797a42870f7eb8dca2"
1616

1717
[lib]
1818
name = "mmtk_ruby"

ruby-test-cases.txt

-130
This file was deleted.

0 commit comments

Comments
 (0)