Re: [PATCH 7/8] reftable/merged: drain priority queue on reseek

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Steinhardt <ps@xxxxxx> writes:

> diff --git a/t/unit-tests/t-reftable-merged.c b/t/unit-tests/t-reftable-merged.c
> index 4c25ee5334..99ca33f973 100644
> --- a/t/unit-tests/t-reftable-merged.c
> +++ b/t/unit-tests/t-reftable-merged.c
> @@ -273,6 +273,78 @@ static void t_merged_seek_multiple_times(void)
>  	reftable_free(sources);
>  }
>  
> +static void t_merged_seek_multiple_times_without_draining(void)
> +{
> ...
> +	err = reftable_ref_record_equal(&rec, &r2[0], GIT_SHA1_RAWSZ);
> +	check(err == 1);
> +
> +	err = reftable_iterator_seek_ref(&it, "a");
> +	check(!err);
> +	err = reftable_iterator_next_ref(&it, &rec);
> +	check(!err);
> +	err = reftable_ref_record_equal(&rec, &r1[0], GIT_SHA1_RAWSZ);

Did you mean REFTABLE_HASH_SIZE_SHA1 instead?

diff --git i/t/unit-tests/t-reftable-merged.c w/t/unit-tests/t-reftable-merged.c
index 620803e0ed..a12bd0e1a3 100644
--- i/t/unit-tests/t-reftable-merged.c
+++ w/t/unit-tests/t-reftable-merged.c
@@ -326,14 +326,14 @@ static void t_merged_seek_multiple_times_without_draining(void)
 	check(!err);
 	err = reftable_iterator_next_ref(&it, &rec);
 	check(!err);
-	err = reftable_ref_record_equal(&rec, &r2[0], GIT_SHA1_RAWSZ);
+	err = reftable_ref_record_equal(&rec, &r2[0], REFTABLE_HASH_SIZE_SHA1);
 	check(err == 1);
 
 	err = reftable_iterator_seek_ref(&it, "a");
 	check(!err);
 	err = reftable_iterator_next_ref(&it, &rec);
 	check(!err);
-	err = reftable_ref_record_equal(&rec, &r1[0], GIT_SHA1_RAWSZ);
+	err = reftable_ref_record_equal(&rec, &r1[0], REFTABLE_HASH_SIZE_SHA1);
 	check(err == 1);
 
 	for (size_t i = 0; i < ARRAY_SIZE(bufs); i++)




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux