summaryrefslogtreecommitdiff
path: root/reftable/readwrite_test.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-02-08 16:22:07 -0800
committerJunio C Hamano <gitster@pobox.com>2024-02-08 16:22:07 -0800
commit546f8d2dcddd4d92dbef2e2fe7c848ac4830cf84 (patch)
treee86c09decab6583a94d6fd1c85e7a115828f4411 /reftable/readwrite_test.c
parentb471ea3a0d9bfac19b91f7d50240d4bb863f252f (diff)
parentc0cadb0576d4920915eb3bd38a7d1abfcbd25f98 (diff)
downloadgit-546f8d2dcddd4d92dbef2e2fe7c848ac4830cf84.tar.xz
Merge branch 'ps/reftable-fixes' into maint-2.43
Bunch of small fix-ups to the reftable code. * ps/reftable-fixes: reftable/block: reuse buffer to compute record keys reftable/block: introduce macro to initialize `struct block_iter` reftable/merged: reuse buffer to compute record keys reftable/stack: fix use of unseeded randomness reftable/stack: fix stale lock when dying reftable/stack: reuse buffers when reloading stack reftable/stack: perform auto-compaction with transactional interface reftable/stack: verify that `reftable_stack_add()` uses auto-compaction reftable: handle interrupted writes reftable: handle interrupted reads reftable: wrap EXPECT macros in do/while
Diffstat (limited to 'reftable/readwrite_test.c')
-rw-r--r--reftable/readwrite_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/reftable/readwrite_test.c b/reftable/readwrite_test.c
index 469ab79a5a..278663f22d 100644
--- a/reftable/readwrite_test.c
+++ b/reftable/readwrite_test.c
@@ -141,8 +141,8 @@ static void test_log_buffer_size(void)
*/
uint8_t hash1[GIT_SHA1_RAWSZ], hash2[GIT_SHA1_RAWSZ];
for (i = 0; i < GIT_SHA1_RAWSZ; i++) {
- hash1[i] = (uint8_t)(rand() % 256);
- hash2[i] = (uint8_t)(rand() % 256);
+ hash1[i] = (uint8_t)(git_rand() % 256);
+ hash2[i] = (uint8_t)(git_rand() % 256);
}
log.value.update.old_hash = hash1;
log.value.update.new_hash = hash2;
@@ -320,7 +320,7 @@ static void test_log_zlib_corruption(void)
};
for (i = 0; i < sizeof(message) - 1; i++)
- message[i] = (uint8_t)(rand() % 64 + ' ');
+ message[i] = (uint8_t)(git_rand() % 64 + ' ');
reftable_writer_set_limits(w, 1, 1);