diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-12-23 09:32:08 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-23 09:32:08 -0800 |
commit | f7c607fac3dd906c46d0d86ff174215698912316 (patch) | |
tree | 407e5328ed8704476b3f593b60d8bcdea55cd48c /t/unit-tests/t-reftable-stack.c | |
parent | 19fbad7918f6bd313bdcffc7c71e0729f3a0e0c2 (diff) | |
parent | 49c6b912e2f4c49784d471f8c9364077c423dbf5 (diff) |
Merge branch 'kn/reftable-writer-log-write-verify'
Reftable backend adds check for upper limit of log's update_index.
* kn/reftable-writer-log-write-verify:
reftable/writer: ensure valid range for log's update_index
Diffstat (limited to 't/unit-tests/t-reftable-stack.c')
-rw-r--r-- | t/unit-tests/t-reftable-stack.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/unit-tests/t-reftable-stack.c b/t/unit-tests/t-reftable-stack.c index b2f6c1c37e..e208e156f0 100644 --- a/t/unit-tests/t-reftable-stack.c +++ b/t/unit-tests/t-reftable-stack.c @@ -773,8 +773,12 @@ static void t_reftable_stack_tombstone(void) } logs[i].refname = xstrdup(buf); - /* update_index is part of the key. */ - logs[i].update_index = 42; + /* + * update_index is part of the key so should be constant. + * The value itself should be less than the writer's upper + * limit. + */ + logs[i].update_index = 1; if (i % 2 == 0) { logs[i].value_type = REFTABLE_LOG_UPDATE; t_reftable_set_hash(logs[i].value.update.new_hash, i, |