git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] t5319: add test for MIDX QSORT progress reporting

From
Ayush Chandekar <ayu.chandekar@gmail.com>
Date
Feb 10, 2025, 07:46 UTC
Message-ID
<20250210074623.136599-3-ayu.chandekar@gmail.com>
In-Reply-To
<20250210074623.136599-1-ayu.chandekar@gmail.com>

Add a test to verify that the multi-pack-index verify command shows progress during the QSORT operation. Create 100 test objects, repack them, and verify the progress reaches 100% during sorting

Signed-off-by: Ayush Chandekar <ayu.chandekar@gmail.com>
---

This test makes sure the progress reaches 100%, but I couldn't find a way which could verify that the progress went from 0% to 100% with intermediates. I would like if someone can suggest a method for this.

Thanks, Ayush

 t/t5319-multi-pack-index.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
index 0f215ad2e8..d368e22e3a 100755
--- a/t/t5319-multi-pack-index.sh
+++ b/t/t5319-multi-pack-index.sh
@@ -658,6 +658,20 @@ test_expect_success 'verify incorrect 64-bit offset' '
 		"incorrect object offset"
 '
 
+test_expect_success 'verify shows QSORT progress' '
+	# Create test objects
+	for i in $(test_seq 1 100)
+	do
+		echo "content $i" | \
+			git hash-object -w --stdin \
+			|| return 1
+	done &&
+	git repack -ad &&
+	git multi-pack-index write &&
+	GIT_PROGRESS_DELAY=0 git multi-pack-index verify --progress 2>actual &&
+	grep "Sorting objects by packfile: *100%" actual
+'
+
 test_expect_success 'setup expire tests' '
 	mkdir dup &&
 	(
-- 
2.48.GIT
Previous: Ayush ChandekarNext: Ayush Chandekar
Message 2 of 6 in “midx: implement progress reporting for QSORT operation”
  1. Ayush ChandekarFeb 10, 2025
  2. 2/2 t5319: add test for MIDX QSORT progress reportingAyush Chandekar, Feb 10, 2025
  3. 1/2 midx: show progress during QSORT operationAyush Chandekar, Feb 10, 2025
  4. Junio C HamanoFeb 10, 2025
  5. Ayush ChandekarFeb 11, 2025
  6. Junio C HamanoFeb 11, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.