Skip to content
Closed
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
9 changes: 8 additions & 1 deletion .github/workflows/mutation-test-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
- name: Setup local-data-api
run: make local-data-api-ci

# Same confinement as mutation-test-pr.yml: a mutant that allocates
# without bound must OOM its own test process, not the runner VM.
- name: Run full mutation test suite
env:
FORMAE_TEST_AURORA_CLUSTER_ARN: arn:aws:rds:us-east-1:123456789012:cluster:local
Expand All @@ -66,7 +68,12 @@ jobs:
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_REGION: us-east-1
run: ./scripts/mutation-test.sh
run: |
sudo mkdir /sys/fs/cgroup/mutation
echo 12G | sudo tee /sys/fs/cgroup/mutation/memory.max
echo 0 | sudo tee /sys/fs/cgroup/mutation/memory.swap.max
echo $$ | sudo tee /sys/fs/cgroup/mutation/cgroup.procs
./scripts/mutation-test.sh

- name: Generate coverage diff
run: ./scripts/coverage-diff.sh
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/mutation-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,18 @@ jobs:
- name: Stamp the version
run: make version-semver

# A mutant can turn a bounded loop into one that allocates without
# bound, exhausting the VM before gremlins' per-mutant timeout can
# fire; the runner is then torn down mid-run and gremlins exits 0
# without a report. Confining the run to a memory-capped cgroup makes
# the kernel kill the runaway test process instead: gremlins records
# the mutant as killed and the run completes. The cap leaves the
# 16 GB runner room for the runner agent; swap is denied so a runaway
# dies quickly instead of thrashing.
- name: Run mutation tests on changed packages
run: ./scripts/mutation-test-changed.sh
run: |
sudo mkdir /sys/fs/cgroup/mutation
echo 12G | sudo tee /sys/fs/cgroup/mutation/memory.max
echo 0 | sudo tee /sys/fs/cgroup/mutation/memory.swap.max
echo $$ | sudo tee /sys/fs/cgroup/mutation/cgroup.procs
./scripts/mutation-test-changed.sh
3 changes: 2 additions & 1 deletion internal/cli/status/agentview.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ type panelSpec struct {
lines []string
}

// boxWidth returns the widest line of a rendered box.
// boxWidth returns the widest line of a rendered box, measured as display
// width rather than byte length.
func boxWidth(box string) int {
maxW := 0
for _, l := range strings.Split(box, "\n") {
Expand Down
Loading