Skip to content

Commit f3ad2bf

Browse files
avargitster
authored andcommitted
test-lib-functions: remove generate_zero_bytes() wrapper
Since d5cfd14 (tests: teach the test-tool to generate NUL bytes and use it, 2019-02-14) the generate_zero_bytes() functions has been a thin wrapper for "test-tool genzeros". Let's have its only user call that directly instead. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 762ccf9 commit f3ad2bf

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

t/t5318-commit-graph.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ corrupt_graph_and_verify() {
529529
zero_pos=${4:-${orig_size}} &&
530530
printf "$data" | dd of="$objdir/info/commit-graph" bs=1 seek="$pos" conv=notrunc &&
531531
dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" if=/dev/null &&
532-
generate_zero_bytes $(($orig_size - $zero_pos)) >>"$objdir/info/commit-graph" &&
532+
test-tool genzeros $(($orig_size - $zero_pos)) >>"$objdir/info/commit-graph" &&
533533
corrupt_graph_verify "$grepstr"
534534

535535
}

t/test-lib-functions.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,6 @@ remove_cr () {
111111
tr '\015' Q | sed -e 's/Q$//'
112112
}
113113

114-
# Generate an output of $1 bytes of all zeroes (NULs, not ASCII zeroes).
115-
# If $1 is 'infinity', output forever or until the receiving pipe stops reading,
116-
# whichever comes first.
117-
generate_zero_bytes () {
118-
test-tool genzeros "$@"
119-
}
120-
121114
# In some bourne shell implementations, the "unset" builtin returns
122115
# nonzero status when a variable to be unset was not set in the first
123116
# place.

0 commit comments

Comments
 (0)