Skip to content

Comments

Run single subtest from a test file#73

Open
gctony wants to merge 1 commit intofacebook:devfrom
gctony:pick_subtests_to_run
Open

Run single subtest from a test file#73
gctony wants to merge 1 commit intofacebook:devfrom
gctony:pick_subtests_to_run

Conversation

@gctony
Copy link

@gctony gctony commented Feb 19, 2026

Add mechanism to be able to select one or more tests to run from a test file. The test harness will read JEMALLOC_TEST_REGEX env and, if set, compile it as a regex. It will then only run tests whose name match the regex.

@meta-cla meta-cla bot added the cla signed label Feb 19, 2026
@gctony gctony marked this pull request as draft February 19, 2026 20:49
@gctony gctony marked this pull request as ready for review February 19, 2026 20:50
@guangli-dai guangli-dai self-assigned this Feb 19, 2026
@guangli-dai guangli-dai self-requested a review February 19, 2026 21:16
@guangli-dai guangli-dai removed their assignment Feb 19, 2026
@gctony
Copy link
Author

gctony commented Feb 19, 2026

Unfortunately, windows is not happy with regex.h. I don't want to spend too much time on this, I'll just remove the regex feature and only allow a single test to be chosen.

Add mechanism to be able to select one or more tests to run from a test file. The test harness will read JEMALLOC_TEST_REGEX env and, if set, compile it as a regex. It will then only run tests whose name match the regex.
@gctony gctony force-pushed the pick_subtests_to_run branch from 012723a to 3c5f9fd Compare February 19, 2026 23:05
@gctony
Copy link
Author

gctony commented Feb 20, 2026

Example usage:

default behavior:

> bash ./test/test.sh test/unit/hpa
=== test/unit/hpa ===
test_alloc_max (non-reentrant): pass
test_stress (non-reentrant): pass
test_defer_time (non-reentrant): pass
test_purge_no_infinite_loop (non-reentrant): pass
test_no_min_purge_interval (non-reentrant): pass
test_min_purge_interval (non-reentrant): pass
test_purge (non-reentrant): pass
test_experimental_max_purge_nhp (non-reentrant): pass
test_vectorized_opt_eq_zero (non-reentrant): pass
test_starts_huge (non-reentrant): pass
test_start_huge_purge_empty_only (non-reentrant): pass
test_assume_huge_purge_fully (non-reentrant): pass
test_eager_with_purge_threshold (non-reentrant): pass
test_delay_when_not_allowed_deferral (non-reentrant): pass
test_deferred_until_time (non-reentrant): pass
test_eager_no_hugify_on_threshold (non-reentrant): pass
test_hpa_hugify_style_none_huge_no_syscall (non-reentrant): pass
test_experimental_hpa_enforce_hugify (non-reentrant): pass
--- pass: 18/18, skip: 0/18, fail: 0/18 ---

Test suite summary: pass: 1/1, skip: 0/1, fail: 0/1

select one test:

> JEMALLOC_TEST_NAME=test_stress bash ./test/test.sh test/unit/hpa
=== test/unit/hpa ===
test_stress (non-reentrant): pass
--- pass: 1/1, skip: 0/1, fail: 0/1 ---

Test suite summary: pass: 1/1, skip: 0/1, fail: 0/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants