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

Re: [PATCH v4 1/6] t: move reftable/stack_test.c to the unit testing framework

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 4, 2024, 17:17 UTC
Message-ID
<xmqqmskn9w3o.fsf@gitster.g>
In-Reply-To
<20240904150132.11567-2-chandrapratap3519@gmail.com>
Chandra Pratap <chandrapratap3519@gmail.com> writes:
Show 6 quoted lines
>  int cmd__reftable(int argc, const char **argv)
>  {
>  	/* test from simple to complex. */
> -	stack_test_main(argc, argv);
>  	return 0;
>  }
This makes cmd__reftable() a no-op.

Even though you cannot remove t/helpter/test-reftable.c, as it contains the implementation for "test-tool dump-reftable", we should at least be able to do something like this.

--- >8 ---
Subject: [PATCH 7/6] t: clean up leftover reftable test cruft

With migration of the tests of the reftable to the unit-tests framework, "test-tool reftable" has become an expensive no-op.

Retire everything that uses "test-tool reftable", and everything that is used to implement it.

While at it, make the cmds[] list alphabetically sorted again by moving the entry for "dump-reftable".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/helper/test-reftable.c     |  6 ------
 t/helper/test-tool.c         |  3 +--
 t/helper/test-tool.h         |  1 -
 t/t0032-reftable-unittest.sh | 16 ----------------
 4 files changed, 1 insertion(+), 25 deletions(-)
diff --git c/t/helper/test-reftable.c w/t/helper/test-reftable.c
index d27d7ee798..e62298c6a4 100644
--- c/t/helper/test-reftable.c
+++ w/t/helper/test-reftable.c
@@ -9,12 +9,6 @@
 #include "reftable/reftable-tests.h"
 #include "test-tool.h"
 
-int cmd__reftable(int argc, const char **argv)
-{
-	/* test from simple to complex. */
-	return 0;
-}
-
 static void print_help(void)
 {
 	printf("usage: dump [-st] arg\n\n"
diff --git c/t/helper/test-tool.c w/t/helper/test-tool.c
index f8a67df7de..252fa5de63 100644
--- c/t/helper/test-tool.c
+++ w/t/helper/test-tool.c
@@ -26,6 +26,7 @@ static struct test_cmd cmds[] = {
 	{ "drop-caches", cmd__drop_caches },
 	{ "dump-cache-tree", cmd__dump_cache_tree },
 	{ "dump-fsmonitor", cmd__dump_fsmonitor },
+	{ "dump-reftable", cmd__dump_reftable },
 	{ "dump-split-index", cmd__dump_split_index },
 	{ "dump-untracked-cache", cmd__dump_untracked_cache },
 	{ "env-helper", cmd__env_helper },
@@ -61,9 +62,7 @@ static struct test_cmd cmds[] = {
 	{ "read-graph", cmd__read_graph },
 	{ "read-midx", cmd__read_midx },
 	{ "ref-store", cmd__ref_store },
-	{ "reftable", cmd__reftable },
 	{ "rot13-filter", cmd__rot13_filter },
-	{ "dump-reftable", cmd__dump_reftable },
 	{ "regex", cmd__regex },
 	{ "repository", cmd__repository },
 	{ "revision-walking", cmd__revision_walking },
diff --git c/t/helper/test-tool.h w/t/helper/test-tool.h
index e74bc0ffd4..84291318cb 100644
--- c/t/helper/test-tool.h
+++ w/t/helper/test-tool.h
@@ -55,7 +55,6 @@ int cmd__read_graph(int argc, const char **argv);
 int cmd__read_midx(int argc, const char **argv);
 int cmd__ref_store(int argc, const char **argv);
 int cmd__rot13_filter(int argc, const char **argv);
-int cmd__reftable(int argc, const char **argv);
 int cmd__regex(int argc, const char **argv);
 int cmd__repository(int argc, const char **argv);
 int cmd__revision_walking(int argc, const char **argv);
diff --git c/t/t0032-reftable-unittest.sh w/t/t0032-reftable-unittest.sh
deleted file mode 100755
index 471cb37ac2..0000000000
--- c/t/t0032-reftable-unittest.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2020 Google LLC
-#
-
-test_description='reftable unittests'
-
-TEST_PASSES_SANITIZE_LEAK=true
-. ./test-lib.sh
-
-test_expect_success 'unittests' '
-	TMPDIR=$(pwd) && export TMPDIR &&
-	test-tool reftable
-'
-
-test_done
Previous: Chandra PratapNext: Patrick Steinhardt
Message 40 of 72 in “t: port reftable/stack_test.c to the unit testing framework”
  1. Chandra PratapAug 6, 2024
  2. 1/6 t: move reftable/stack_test.c to the unit testing frameworkChandra Pratap, Aug 6, 2024
  3. 2/6 t: harmonize t-reftable-stack.c with coding guidelinesChandra Pratap, Aug 6, 2024
  4. Eric SunshineAug 6, 2024
  5. Patrick SteinhardtAug 7, 2024
  6. 3/6 t-reftable-stack: use Git's tempfile API instead of mkstemp()Chandra Pratap, Aug 6, 2024
  7. Junio C HamanoAug 6, 2024
  8. Patrick SteinhardtAug 7, 2024
  9. 4/6 t-reftable-stack: use reftable_ref_record_equal() to compare ref recordsChandra Pratap, Aug 6, 2024
  10. Patrick SteinhardtAug 7, 2024
  11. Chandra PratapAug 7, 2024
  12. Patrick SteinhardtAug 8, 2024
  13. 5/6 t-reftable-stack: add test for non-default compaction factorChandra Pratap, Aug 6, 2024
  14. 6/6 t-reftable-stack: add test for stack iteratorsChandra Pratap, Aug 6, 2024
  15. Patrick SteinhardtAug 7, 2024
  16. Junio C HamanoAug 6, 2024
  17. Chandra PratapAug 7, 2024
  18. [GSoC][PATCH v2 0/6] t: port reftable/stack_test.c to the unit testing frameworkChandra Pratap, Aug 23, 2024
  19. 1/6 t: move reftable/stack_test.c to the unit testing frameworkChandra Pratap, Aug 23, 2024
  20. 2/6 t: harmonize t-reftable-stack.c with coding guidelinesChandra Pratap, Aug 23, 2024
  21. Patrick SteinhardtAug 26, 2024
  22. 3/6 t-reftable-stack: use Git's tempfile API instead of mkstemp()Chandra Pratap, Aug 23, 2024
  23. 4/6 t-reftable-stack: use reftable_ref_record_equal() to compare ref recordsChandra Pratap, Aug 23, 2024
  24. 5/6 t-reftable-stack: add test for non-default compaction factorChandra Pratap, Aug 23, 2024
  25. 6/6 t-reftable-stack: add test for stack iteratorsChandra Pratap, Aug 23, 2024
  26. Patrick SteinhardtAug 26, 2024
  27. [GSoC][PATCH v3 0/6] t: port reftable/stack_test.c to the unit testing frameworkChandra Pratap, Aug 26, 2024
  28. 1/6 t: move reftable/stack_test.c to the unit testing frameworkChandra Pratap, Aug 26, 2024
  29. 2/6 t: harmonize t-reftable-stack.c with coding guidelinesChandra Pratap, Aug 26, 2024
  30. 3/6 t-reftable-stack: use Git's tempfile API instead of mkstemp()Chandra Pratap, Aug 26, 2024
  31. 4/6 t-reftable-stack: use reftable_ref_record_equal() to compare ref recordsChandra Pratap, Aug 26, 2024
  32. 5/6 t-reftable-stack: add test for non-default compaction factorChandra Pratap, Aug 26, 2024
  33. 6/6 t-reftable-stack: add test for stack iteratorsChandra Pratap, Aug 26, 2024
  34. Junio C HamanoAug 26, 2024
  35. Chandra PratapAug 26, 2024
  36. Junio C HamanoAug 26, 2024
  37. Junio C HamanoAug 26, 2024
  38. [GSoC][PATCH v4 0/6] t: port reftable/stack_test.c to the unit testing frameworkChandra Pratap, Sep 4, 2024
  39. 1/6 t: move reftable/stack_test.c to the unit testing frameworkChandra Pratap, Sep 4, 2024
  40. Junio C HamanoSep 4, 2024
  41. Patrick SteinhardtSep 5, 2024
  42. Chandra PratapSep 5, 2024
  43. Patrick SteinhardtSep 5, 2024
  44. Junio C HamanoSep 5, 2024
  45. Patrick SteinhardtSep 6, 2024
  46. 2/6 t: harmonize t-reftable-stack.c with coding guidelinesChandra Pratap, Sep 4, 2024
  47. 3/6 t-reftable-stack: use Git's tempfile API instead of mkstemp()Chandra Pratap, Sep 4, 2024
  48. Patrick SteinhardtSep 5, 2024
  49. 4/6 t-reftable-stack: use reftable_ref_record_equal() to compare ref recordsChandra Pratap, Sep 4, 2024
  50. Patrick SteinhardtSep 5, 2024
  51. 5/6 t-reftable-stack: add test for non-default compaction factorChandra Pratap, Sep 4, 2024
  52. 6/6 t-reftable-stack: add test for stack iteratorsChandra Pratap, Sep 4, 2024
  53. Patrick SteinhardtSep 5, 2024
  54. [GSoC][PATCH v5 0/7] t: port reftable/stack_test.c to the unit testing frameworkChandra Pratap, Sep 6, 2024
  55. 1/7 t: move reftable/stack_test.c to the unit testing frameworkChandra Pratap, Sep 6, 2024
  56. 2/7 t: harmonize t-reftable-stack.c with coding guidelinesChandra Pratap, Sep 6, 2024
  57. 3/7 t-reftable-stack: use Git's tempfile API instead of mkstemp()Chandra Pratap, Sep 6, 2024
  58. 4/7 t-reftable-stack: use reftable_ref_record_equal() to compare ref recordsChandra Pratap, Sep 6, 2024
  59. 5/7 t-reftable-stack: add test for non-default compaction factorChandra Pratap, Sep 6, 2024
  60. 6/7 t-reftable-stack: add test for stack iteratorsChandra Pratap, Sep 6, 2024
  61. 7/7 t: clean up leftover reftable test cruftChandra Pratap, Sep 6, 2024
  62. Junio C HamanoSep 6, 2024
  63. Junio C HamanoSep 6, 2024
  64. [GSoC][PATCH v6 0/6] t: port reftable/stack_test.c to the unit testing frameworkChandra Pratap, Sep 8, 2024
  65. 1/6 t: move reftable/stack_test.c to the unit testing frameworkChandra Pratap, Sep 8, 2024
  66. 2/6 t: harmonize t-reftable-stack.c with coding guidelinesChandra Pratap, Sep 8, 2024
  67. 3/6 t-reftable-stack: use Git's tempfile API instead of mkstemp()Chandra Pratap, Sep 8, 2024
  68. 4/6 t-reftable-stack: use reftable_ref_record_equal() to compare ref recordsChandra Pratap, Sep 8, 2024
  69. Patrick SteinhardtSep 9, 2024
  70. 5/6 t-reftable-stack: add test for non-default compaction factorChandra Pratap, Sep 8, 2024
  71. 6/6 t-reftable-stack: add test for stack iteratorsChandra Pratap, Sep 8, 2024
  72. Patrick SteinhardtSep 9, 2024

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.