diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b19f395c..498ce7e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,8 @@ jobs: strategy: fail-fast: false matrix: - # tests/scripts/unit-groups.sh splits the packages by recorded run time - group: [1, 2, 3] + # tests/scripts/unit-groups.sh splits the tests by recorded run time + group: [1, 2, 3, 4] steps: - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -83,6 +83,8 @@ jobs: mkdir -p "$TMPDIR" dd if=/dev/zero of="$TMPDIR/odirect-check" bs=4096 count=1 oflag=direct pkgs=$(tests/scripts/unit-groups.sh packages ${{ strategy.job-total }} ${{ matrix.group }}) + UNIT_RUN=$(tests/scripts/unit-groups.sh run ${{ strategy.job-total }} ${{ matrix.group }}) + export UNIT_RUN make test-unit UNIT_PKGS="$pkgs" UNIT_TIMEOUT=8m COVER_PROFILE=coverage-${{ matrix.group }}.out 2>&1 | tee unit-test-${{ matrix.group }}.log timeout-minutes: 10 @@ -101,24 +103,17 @@ jobs: runs-on: ubuntu-latest needs: unit-tests steps: + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Download coverage uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: pattern: unit-tests-* merge-multiple: true - # The groups test disjoint packages, so their profiles concatenate. - name: Coverage summary - run: | - { - echo "## Unit test coverage" - echo - echo "**Total: $(awk 'FNR > 1 { n += $2; if ($3 > 0) c += $2 } END { printf "%.1f%%", 100 * c / n }' coverage-*.out)**" - echo - echo "| Package | Coverage |" - echo "| --- | --- |" - awk '$1 == "ok" && $4 == "coverage:" {print "| " $2 " | " $5 " |"}' unit-test-*.log | sort - } >> "$GITHUB_STEP_SUMMARY" + run: tests/scripts/coverage-summary.sh coverage-*.out >> "$GITHUB_STEP_SUMMARY" lint: name: Lint diff --git a/Makefile b/Makefile index 97f366db..62ceaf8f 100644 --- a/Makefile +++ b/Makefile @@ -63,9 +63,10 @@ dashboard: # Unit tests (fast, no FUSE needed) test: test-unit +# UNIT_RUN in the environment limits the tests to a -run regex; CI uses it for split packages test-unit: @echo "Running unit tests with race detector..." - $(GOTEST) -v -race -timeout $(UNIT_TIMEOUT) -covermode=atomic -coverprofile=$(COVER_PROFILE) $(UNIT_PKGS) + $(GOTEST) -v -race -timeout $(UNIT_TIMEOUT) -run "$${UNIT_RUN:-.}" -covermode=atomic -coverprofile=$(COVER_PROFILE) $(UNIT_PKGS) # Full integration suite, including what CI's -short skips (requires FUSE and built binary) test-integration: check-fuse build diff --git a/tests/scripts/coverage-summary.sh b/tests/scripts/coverage-summary.sh new file mode 100755 index 00000000..261b4ddf --- /dev/null +++ b/tests/scripts/coverage-summary.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# Prints a markdown coverage summary from Go cover profiles. A package that CI splits +# by test appears in several profiles, so each block counts once, covered if any +# profile ran it. +# +# coverage-summary.sh ... +set -euo pipefail + +awk ' + FNR == 1 { next } + { stmts[$1] = $2; hits[$1] += $3 } + END { + for (b in stmts) { + pkg = b + sub(/\/[^\/]*:.*/, "", pkg) + n[pkg] += stmts[b] + total += stmts[b] + if (hits[b] > 0) { + c[pkg] += stmts[b] + covered += stmts[b] + } + } + printf "## Unit test coverage\n\n**Total: %.1f%%**\n\n| Package | Coverage |\n| --- | --- |\n", total ? 100 * covered / total : 0 + fflush() + for (p in n) printf "| %s | %.1f%% |\n", p, 100 * c[p] / n[p] | "sort" + close("sort") + }' "$@" diff --git a/tests/scripts/unit-groups.sh b/tests/scripts/unit-groups.sh index 45bf9c57..0a7a4e90 100755 --- a/tests/scripts/unit-groups.sh +++ b/tests/scripts/unit-groups.sh @@ -1,14 +1,20 @@ #!/usr/bin/env bash -# Splits the unit test packages into CI groups of about equal run time, -# using unit-timings.txt. +# Splits the unit tests into CI groups of about equal run time, using unit-timings.txt. +# A package with a shard count after its time there gets that many groups to itself, +# split by test name and balanced with unit-test-timings.txt; the other packages share +# the remaining groups. # # unit-groups.sh packages packages for one group, space separated -# unit-groups.sh check fail unless every package is in exactly one group +# unit-groups.sh run -run regex for one group; . runs whole packages +# unit-groups.sh check fail unless every package, and every test of a +# split package, is in exactly one group set -euo pipefail cd "$(dirname "$0")/../.." timings=tests/scripts/unit-timings.txt +test_timings=tests/scripts/unit-test-timings.txt default_seconds=5 +default_test_seconds=1 list_packages() { local out @@ -16,39 +22,91 @@ list_packages() { echo "$out" } -# Longest package first, each into the group with the least time so far. -assign() { +# "package shards" for each package to split by test. +split_packages() { + awk '$1 !~ /^#/ && NF >= 3 { print $1, $3 }' "$timings" +} + +list_tests() { + local out + out=$(go test -list "${2:-.}" "$1") + grep -E '^(Test|Example|Fuzz)' <<<"$out" || true +} + +# Longest first, each into the shard with the least time so far. +balance() { + sort -k1,1nr -k2,2 | + awk -v n="$1" -v first="$2" '{ m = 1; for (i = 2; i <= n; i++) if (load[i] < load[m]) m = i; load[m] += $1; print first + m - 1, $2 }' +} + +# One line per assignment: " " or " ". +plan() { + local groups=$1 next=1 pkg shards + local -a split=() + while read -r pkg shards; do + split+=("$pkg") + list_tests "$pkg" | + awk -v def="$default_test_seconds" -v pkg="$pkg" 'NR == FNR { if ($1 == pkg) w[$2] = $3; next } { print ($1 in w ? w[$1] : def), $1 }' "$test_timings" - | + balance "$shards" "$next" | + awk -v pkg="$pkg" '{ print $1, pkg, $2 }' + next=$((next + shards)) + done < <(split_packages) + if ((next > groups)); then + echo "unit-groups.sh: split packages need $((next - 1)) groups, leaving none of $groups for the rest" >&2 + exit 1 + fi list_packages | + grep -vxF -f <(printf '%s\n' "${split[@]+"${split[@]}"}") | awk -v def="$default_seconds" 'NR == FNR { if ($1 !~ /^#/) w[$1] = $2; next } { print ($1 in w ? w[$1] : def), $1 }' "$timings" - | - sort -k1,1nr -k2,2 | - awk -v n="$1" '{ m = 1; for (i = 2; i <= n; i++) if (load[i] < load[m]) m = i; load[m] += $1; print m, $2 }' + balance $((groups - next + 1)) "$next" } packages() { - assign "$1" | awk -v g="$2" '$1 == g { print $2 }' + plan "$1" | awk -v g="$2" '$1 == g && !seen[$2]++ { print $2 }' +} + +# The -run regex for group $2 of the plan in $1. +regex() { + awk -v g="$2" '$1 == g && NF == 3 { names = names sep $3; sep = "|" } END { print (names == "" ? "." : "^(" names ")$") }' <<<"$1" +} + +run() { + regex "$(plan "$1")" "$2" } check() { - local all got + local groups=$1 p all got pkg shards + p=$(plan "$groups") all=$(list_packages | sort) if [[ -z "$all" ]]; then echo "found no unit test packages" exit 1 fi - got=$(for g in $(seq 1 "$1"); do packages "$1" "$g"; done | sort) + got=$(awk 'NF == 2 { print $2 } NF == 3 && !seen[$2]++ { print $2 }' <<<"$p" | sort) if [[ "$all" != "$got" ]]; then echo "unit test groups miss or repeat packages (< missing, > repeated):" diff <(echo "$all") <(echo "$got") || true exit 1 fi - echo "each of $(echo "$all" | wc -l | tr -d ' ') unit test packages is in exactly one of $1 groups" + echo "each of $(wc -l <<<"$all" | tr -d ' ') unit test packages is in exactly one of $groups groups" + while read -r pkg shards; do + all=$(list_tests "$pkg" | sort) + got=$(for g in $(awk -v pkg="$pkg" '$2 == pkg { print $1 }' <<<"$p" | sort -u); do list_tests "$pkg" "$(regex "$p" "$g")"; done | sort) + if [[ "$all" != "$got" ]]; then + echo "the $shards groups of $pkg miss or repeat tests (< missing, > repeated):" + diff <(echo "$all") <(echo "$got") || true + exit 1 + fi + echo "each of the $(wc -l <<<"$all" | tr -d ' ') tests of $pkg is in exactly one of its $shards groups" + done < <(split_packages) } case "${1:-}" in packages) packages "$2" "$3" | paste -sd ' ' - ;; +run) run "$2" "$3" ;; check) check "$2" ;; *) - echo "usage: $0 packages | check " >&2 + echo "usage: $0 packages | run | check " >&2 exit 2 ;; esac diff --git a/tests/scripts/unit-test-timings.txt b/tests/scripts/unit-test-timings.txt new file mode 100644 index 00000000..9f8df96b --- /dev/null +++ b/tests/scripts/unit-test-timings.txt @@ -0,0 +1,141 @@ +# Seconds per test in CI (-race) for packages unit-timings.txt splits by test, from main 48d1e51. +# Parallel tests overlap, so a package's tests add up to more than its run time. Tests not listed count as 1s. +github.com/supporttools/GoClusterFS/internal/goclusterfs FuzzSFBContainer 0.02 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestAllocErrno 0.00 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestAllocationReportsStuckBitmapLockAsEIO 30.70 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestClaimErrno 0.00 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestConcurrentCopyOnWriteAcrossNodes 0.44 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestConcurrentDirReadsDoNotDelayCreateOrUnlink 0.51 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestConcurrentFirstWritesToFallocatedBlock 5.53 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestConcurrentRefcountReadsDoNotDelaySnapshots 0.40 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestConcurrentWritersShareReserve 3.38 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestCopyOnWriteKeepsConcurrentInPlaceWrite 0.40 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestCountedFreesAndSharesAcrossNodes 4.37 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestCrashBetweenClaimAndNameReplaysTheName 1.13 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestCreateHoldsAFileAPeerUnlinksAtOnce 0.46 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestCreateNameErrors 0.73 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestCreateReplaysAfterCheckpointAndCrash 0.38 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestCreateReportsStuckInodeLockAsEIO 30.68 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestCreateWithoutExclOpensTheFileItFinds 0.42 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestDeadHolderLetsGoOfAnOrphan 0.45 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestDeepCloneChainDeletedFromTwoNodes 9.18 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestDeletingUnsharedFilesTakesNoRefcountLock 0.61 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestDirAttr 0.02 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestDirChangesRefuseRemovedDirectory 0.38 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestDirFsyncSurvivesPowerCut 15.59 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestDirSetattrKeepsOtherNodesMkdir 1.42 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestEndedShutdownWatchDoesNotDump 0.18 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFailedMkdirFreesItsBlock 0.33 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFailedWriteCrashKeepsReusedBlock 0.54 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFailedWriteFreesItsBlocks 0.33 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFailedWriteFreesUnusedCopy 0.23 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFailedWriteKeepsBlocksCommittedMidWrite 0.13 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFailedWriteReleasesCommittedCopiesOnce 0.85 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFailingPeerKeepsAFullListWaiting 0.60 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFallocatedBlocksReadZerosAfterPartialWrite 0.19 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFileSetattrKeepsOtherNodesSize 0.39 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFileSystemInterface 0.00 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFileUnlinkedByAPeerWhileOpenStaysUntilLastClose 0.62 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckAcceptsRuntimeImage 4.27 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRebuildsCorruptRefcountSector 0.57 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairFreesCrashedNodesReserveOnce 0.48 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairFreesEmptySFBContainers 0.67 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairFreesInodeReplayLeftUnnamed 16.41 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairFreesUnnamedInodeKeepsCloneBlocks 16.21 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairKeepsBlocksOfOddExtents 0.78 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairKeepsLeaksItCannotPlace 0.00 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairKeepsUnnamedInodesItCannotPlace 4.89 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairKeepsUnnamedSnapshotTarget 16.04 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairReclaimsInterruptedSubdirectoryUnlink 0.92 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairReclaimsInterruptedTruncate 0.81 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairReclaimsLeakedBlocks 1.85 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairRewritesDamagedSnapshotSector 1.61 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckRepairsOlderSharing 1.81 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckReportsCrashedNodesReserve 0.37 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFsckReportsSharingPastRefcountTable 1.39 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFullBitmapWaitsForPeersReserve 1.32 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFullBitmapWithoutReservesIsENOSPC 12.46 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFullOrphanListFailsUnlinkCleanly 0.37 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestFullOrphanListMakesRoomForFreedOrphans 0.27 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestIdleReserveGoesBack 1.22 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestInPlaceWriteRefusesTheNextFileInItsSlot 0.37 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestInPlaceWriteStepsAsideForReplay 0.17 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestInitRoot 0.02 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestInodeLockHoldersDoNotWaitForRefill 0.53 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestLastUnlinkOfAClosedFileFreesIt 0.66 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestMkdirReplaysAfterCrash 0.48 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestNewFS 0.00 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestNodeAloneListsAnOrphanItHoldsOpen 0.43 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestOldSharingCopiesWithoutReleasing 0.29 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestOldSnapshotAndCloneNeverFreeSharedBlocks 0.28 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestOneFailedWriteKeepsAcknowledgedResults 30.21 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestOnlySlowShutdownStepsAreLogged 0.06 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestOrphanSnapshotListedAndDeletable 0.85 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestOwnPassKeepsAReservedOrphan 0.28 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPeerReleasesAnOrphanItSawBeforeTheDrop 0.39 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringClone 13.94 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringCopyOnWrite 32.56 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringFirstWriteIntoAReusedBlock 18.39 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringReserveRefill 9.17 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringReserveReturn 2.57 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringReservedWriteThatCopies 25.61 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringSnapshotCreate 21.45 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringSnapshotDelete 24.63 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringTruncateIntoABlock 23.66 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringTwoBlockWriteFromReserve 10.35 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringUnlinkThenTrimAfterReuse 11.82 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestPowerCutDuringWriteFromReserve 6.52 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestReadDataInPhysicalBlockZero 0.04 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestReaderNeverSeesUncommittedBlocks 3.42 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestReadsNeverShowStaleBytes 3.98 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestRemoveIfHoldsDirectoryLockWhileChecking 1.38 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestRemoveRacesPeerRecreate 2.73 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestReplayFreesCrashedNodesUnusedReserve 0.41 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestReplayKeepsMappedBlocksOfCrashedNodesReserve 0.56 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestReplayKeepsReservedBlockUsedFreedAndRetaken 0.49 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestReserveRecordDoesNotFillJournal 9.93 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestReservedBlockNeverShowsStaleBytes 0.42 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestRmdirFreesDirectoryInode 0.62 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestRmdirRacesPeerAddingEntry 0.59 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestRootDir 0.02 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestRootUnlinkReplayFreesFileAndBlocks 0.51 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSFBFileTruncatedThenGrownReadsZeros 0.08 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSFBInodeReadable 0.06 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSFBMigrationKeepsData 0.09 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSFBSlotFreed 0.23 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotDuringInPlaceWriteAcrossNodes 0.86 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotKeepsDataThroughWrites 1.44 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotMarkKeepsConcurrentAppend 0.38 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotRecoveryAfterCrash 0.40 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotRefusesBlocksPastRefcountRegion 0.30 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotRefusesUncountedSharing 0.25 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotRetriesWhenFileChangesWhileSharing 2.72 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotStaysWithItsFile 0.62 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestSnapshotWithoutBirthIsOrphan 0.38 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestStaleCopyCannotUndoCopyOnWrite 0.35 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestStaleFileNodeNeverReachesTheNextFileInItsSlot 0.38 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestStaleFileNodeOpensAsStale 0.35 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestStalledShutdownLogsGoroutines 0.10 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestStatfs 0.00 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestStatfsCountsOwnReserveAsFree 0.35 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestTruncateRacingWrite 4.75 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestTruncateReplayKeepsMappedBlocks 0.64 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestTruncateReplayKeepsSnapshotBlocks 0.58 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestTruncateWhileAppending 4.47 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUnlinkCrashAfterBlockFreeKeepsReusedBlock 0.78 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUnlinkCrashAfterInodeFreeKeepsCloneBlocks 0.86 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUnlinkCrashBeforeInodeFreeKeepsCloneBlocks 0.96 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUnlinkCrashKeepsFileInReusedSlot 0.89 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUnlinkFreesBlocksWrittenAfterNameRemoved 0.40 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUnlinkReplayFreesFileAndBlocks 0.57 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUnlinkSucceedsWhilePeerWrites 0.46 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUpdateInodeLockedWaitsForOtherNode 0.49 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestUpdateInodeRetriesTreeConflict 0.12 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestWholeSectorWriteSurvivesPeerPartialWrite 0.37 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestWriteBeyondTwoExtents 0.81 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestWriteFailsWhenLockIsNotFreed 30.40 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestWriteFinishesAfterInterruptDuringLockWait 0.84 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestWriteReplayKeepsLaterTruncate 0.66 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestWriteReplayMapsBlocksAndSize 0.50 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestWriteWhenInodeAndBlockShareLockRecord 0.29 +github.com/supporttools/GoClusterFS/internal/goclusterfs TestWritesTakeBlocksFromReserve 0.99 diff --git a/tests/scripts/unit-timings.txt b/tests/scripts/unit-timings.txt index 6c416916..29f068e0 100644 --- a/tests/scripts/unit-timings.txt +++ b/tests/scripts/unit-timings.txt @@ -1,24 +1,31 @@ -# Seconds per unit test package in CI (-race), averaged over main 9c19263, 8d02d3b, ba5668b, 29feedb. +# Seconds per unit test package in CI (-race), from main 48d1e51. # unit-groups.sh balances CI groups with these; packages not listed count as 5s. -github.com/supporttools/GoClusterFS/internal/api 2.2 +# A third field splits that package by test into that many groups of its own (see unit-test-timings.txt). +github.com/supporttools/GoClusterFS/internal/api 2.4 github.com/supporttools/GoClusterFS/internal/bitmap 2.4 -github.com/supporttools/GoClusterFS/internal/cache 1.1 +github.com/supporttools/GoClusterFS/internal/cache 10.2 github.com/supporttools/GoClusterFS/internal/cache/broadcast 2.5 -github.com/supporttools/GoClusterFS/internal/dir 43.8 -github.com/supporttools/GoClusterFS/internal/extent 4.1 -github.com/supporttools/GoClusterFS/internal/fileops 1.0 -github.com/supporttools/GoClusterFS/internal/fsck 44.9 -github.com/supporttools/GoClusterFS/internal/goclusterfs 328.2 -github.com/supporttools/GoClusterFS/internal/inode 6.0 -github.com/supporttools/GoClusterFS/internal/journal 4.0 -github.com/supporttools/GoClusterFS/internal/lock 58.4 +github.com/supporttools/GoClusterFS/internal/cli 1.0 +github.com/supporttools/GoClusterFS/internal/dir 5.1 +github.com/supporttools/GoClusterFS/internal/extent 2.5 +github.com/supporttools/GoClusterFS/internal/fileops 1.1 +github.com/supporttools/GoClusterFS/internal/fsck 197.2 +github.com/supporttools/GoClusterFS/internal/goclusterfs 406.6 2 +github.com/supporttools/GoClusterFS/internal/inode 3.3 +github.com/supporttools/GoClusterFS/internal/journal 5.0 +github.com/supporttools/GoClusterFS/internal/lock 53.9 +github.com/supporttools/GoClusterFS/internal/logging 1.1 github.com/supporttools/GoClusterFS/internal/metrics 1.1 -github.com/supporttools/GoClusterFS/internal/node 14.6 -github.com/supporttools/GoClusterFS/internal/refcount 1.3 +github.com/supporttools/GoClusterFS/internal/node 39.9 +github.com/supporttools/GoClusterFS/internal/refcount 6.1 +github.com/supporttools/GoClusterFS/internal/reserve 4.0 github.com/supporttools/GoClusterFS/internal/sfb 1.0 -github.com/supporttools/GoClusterFS/internal/snapshot 4.6 +github.com/supporttools/GoClusterFS/internal/snapshot 2.9 github.com/supporttools/GoClusterFS/internal/stats 1.2 -github.com/supporttools/GoClusterFS/internal/storage 1.9 +github.com/supporttools/GoClusterFS/internal/storage 1.5 github.com/supporttools/GoClusterFS/internal/superblock 1.2 github.com/supporttools/GoClusterFS/internal/trim 1.4 +github.com/supporttools/GoClusterFS/internal/version 1.0 github.com/supporttools/GoClusterFS/internal/webui 1.0 +github.com/supporttools/GoClusterFS/tests/integration/history 1.0 +github.com/supporttools/GoClusterFS/tests/soak 35.7