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

[PATCH 18/36] t/helper: merge test-mktemp into test-tool

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Mar 17, 2018, 07:54 UTC
Message-ID
<20180317075421.22032-19-pclouds@gmail.com>
In-Reply-To
<20180317075421.22032-1-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 Makefile               | 2 +-
 t/helper/test-mktemp.c | 3 ++-
 t/helper/test-tool.c   | 1 +
 t/helper/test-tool.h   | 1 +
 t/t0070-fundamental.sh | 4 ++--
 5 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 67f37b849e..3145a9b1b2 100644
--- a/Makefile
+++ b/Makefile
@@ -667,13 +667,13 @@ TEST_BUILTINS_OBJS += test-index-version.o
 TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
 TEST_BUILTINS_OBJS += test-match-trees.o
 TEST_BUILTINS_OBJS += test-mergesort.o
+TEST_BUILTINS_OBJS += test-mktemp.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
 TEST_PROGRAMS_NEED_X += test-fake-ssh
 TEST_PROGRAMS_NEED_X += test-line-buffer
-TEST_PROGRAMS_NEED_X += test-mktemp
 TEST_PROGRAMS_NEED_X += test-online-cpus
 TEST_PROGRAMS_NEED_X += test-parse-options
 TEST_PROGRAMS_NEED_X += test-path-utils
diff --git a/t/helper/test-mktemp.c b/t/helper/test-mktemp.c
index 89d9b2f7be..afc9dee91d 100644
--- a/t/helper/test-mktemp.c
+++ b/t/helper/test-mktemp.c
@@ -1,9 +1,10 @@
 /*
  * test-mktemp.c: code to exercise the creation of temporary files
  */
+#include "test-tool.h"
 #include "git-compat-util.h"
 
-int cmd_main(int argc, const char **argv)
+int test_mktemp(int argc, const char **argv)
 {
 	if (argc != 2)
 		usage("Expected 1 parameter defining the temporary file template");
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 4206d96304..4a563e08c3 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -22,6 +22,7 @@ static struct test_cmd cmds[] = {
 	{ "lazy-init-name-hash", test_lazy_init_name_hash },
 	{ "match-trees", test_match_trees },
 	{ "mergesort", test_mergesort },
+	{ "mktemp", test_mktemp },
 	{ "sha1", test_sha1 },
 };
 
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index dff1b804cb..5bbe3e96cf 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -16,6 +16,7 @@ int test_index_version(int argc, const char **argv);
 int test_lazy_init_name_hash(int argc, const char **argv);
 int test_match_trees(int argc, const char **argv);
 int test_mergesort(int argc, const char **argv);
+int test_mktemp(int argc, const char **argv);
 int test_sha1(int argc, const char **argv);
 
 #endif
diff --git a/t/t0070-fundamental.sh b/t/t0070-fundamental.sh
index 70d4d98a2e..ac007938ee 100755
--- a/t/t0070-fundamental.sh
+++ b/t/t0070-fundamental.sh
@@ -13,7 +13,7 @@ test_expect_success 'character classes (isspace, isalpha etc.)' '
 '
 
 test_expect_success 'mktemp to nonexistent directory prints filename' '
-	test_must_fail test-mktemp doesnotexist/testXXXXXX 2>err &&
+	test_must_fail test-tool mktemp doesnotexist/testXXXXXX 2>err &&
 	grep "doesnotexist/test" err
 '
 
@@ -21,7 +21,7 @@ test_expect_success POSIXPERM,SANITY 'mktemp to unwritable directory prints file
 	mkdir cannotwrite &&
 	chmod -w cannotwrite &&
 	test_when_finished "chmod +w cannotwrite" &&
-	test_must_fail test-mktemp cannotwrite/testXXXXXX 2>err &&
+	test_must_fail test-tool mktemp cannotwrite/testXXXXXX 2>err &&
 	grep "cannotwrite/test" err
 '
 
-- 
2.16.2.903.gd04caf5039
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 22 of 110 in “Combine t/helper binaries into a single one”
  1. 00/36 Combine t/helper binaries into a single oneNguyễn Thái Ngọc Duy, Mar 17, 2018
  2. 01/36 t/helper: add an empty test-tool programNguyễn Thái Ngọc Duy, Mar 17, 2018
  3. 03/36 t/helper: merge test-sha1 into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  4. 10/36 t/helper: merge test-dump-cache-tree into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  5. 13/36 t/helper: merge test-genrandom into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  6. 11/36 t/helper: merge test-dump-split-index into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  7. 19/36 t/helper: merge test-online-cpus into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  8. 22/36 t/helepr: merge test-read-cache into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  9. Eric SunshineMar 18, 2018
  10. 26/36 t/helper: merge test-run-command into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  11. 28/36 t/helper: merge test-sha1-array into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  12. 31/36 t/helper: merge test-string-list into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  13. 33/36 t/helper: merge test-subprocess into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  14. 35/36 t/helper: merge test-wildmatch into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  15. 34/36 t/helper: merge test-urlmatch-.. into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  16. Eric SunshineMar 18, 2018
  17. 36/36 t/helper: merge test-write-cache into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  18. 32/36 t/helper: merge test-submodule-config into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  19. 30/36 t/helper: merge test-strcmp-offset into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  20. 27/36 t/helper: merge test-scrap-cache-tree into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  21. 29/36 t/helper: merge test-sigchain into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  22. 18/36 t/helper: merge test-mktemp into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  23. 25/36 t/helper: merge test-revision-walking into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  24. 21/36 t/helper: merge test-prio-queue into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  25. 24/36 t/helper: merge test-regex into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  26. 20/36 t/helper: merge test-path-utils into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  27. 23/36 t/helper: merge test-ref-store into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  28. 12/36 t/helper: merge test-example-decorate into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  29. 14/36 t/helper: merge test-hashmap into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  30. 17/36 t/helper: merge (unused) test-mergesort into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  31. 15/36 t/helper: merge test-index-version into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  32. 16/36 t/helper: merge (unused) test-match-trees into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  33. 08/36 t/helper: merge (unused) test-delta into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  34. 05/36 t/helper: merge test-config into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  35. 02/36 t/helper: merge test-chmtime into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  36. 09/36 t/helper: merge test-drop-caches into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  37. 04/36 t/helper: merge test-lazy-init-name-hash into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  38. Eric SunshineMar 18, 2018
  39. Duy NguyenMar 18, 2018
  40. Eric SunshineMar 18, 2018
  41. Jeff HostetlerMar 19, 2018
  42. Duy NguyenMar 19, 2018
  43. 07/36 t/helper: merge test-date into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  44. 06/36 t/helper: merge test-ctype into test-toolNguyễn Thái Ngọc Duy, Mar 17, 2018
  45. 00/36 Combine t/helper binaries into a single oneNguyễn Thái Ngọc Duy, Mar 24, 2018
  46. 1/7 t7700: have closing quote of a test at the beginning of lineNguyễn Thái Ngọc Duy, Mar 24, 2018
  47. 01/36 t/helper: add an empty test-tool programNguyễn Thái Ngọc Duy, Mar 24, 2018
  48. 2/7 repack: add --keep-pack optionNguyễn Thái Ngọc Duy, Mar 24, 2018
  49. 03/36 t/helper: merge test-sha1 into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  50. 05/36 t/helper: merge test-config into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  51. 4/7 gc: add gc.bigPackThreshold configNguyễn Thái Ngọc Duy, Mar 24, 2018
  52. 06/36 t/helper: merge test-ctype into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  53. 04/36 t/helper: merge test-lazy-init-name-hash into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  54. 07/36 t/helper: merge test-date into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  55. 5/7 gc: handle a corner case in gc.bigPackThresholdNguyễn Thái Ngọc Duy, Mar 24, 2018
  56. 6/7 gc --auto: exclude base pack if not enough mem to "repack -ad"Nguyễn Thái Ngọc Duy, Mar 24, 2018
  57. 7/7 pack-objects: show some progress when counting kept objectsNguyễn Thái Ngọc Duy, Mar 24, 2018
  58. 3/7 gc: add --keep-largest-pack optionNguyễn Thái Ngọc Duy, Mar 24, 2018
  59. Ævar Arnfjörð BjarmasonMar 24, 2018
  60. Duy NguyenMar 24, 2018
  61. Junio C HamanoMar 26, 2018
  62. 02/36 t/helper: merge test-chmtime into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  63. 00/36 Combine t/helper binaries into a single oneNguyễn Thái Ngọc Duy, Mar 24, 2018
  64. 01/36 t/helper: add an empty test-tool programNguyễn Thái Ngọc Duy, Mar 24, 2018
  65. Johannes SchindelinMar 26, 2018
  66. Duy NguyenMar 26, 2018
  67. Johannes SchindelinMar 26, 2018
  68. SZEDER GáborMar 26, 2018
  69. Johannes SchindelinMar 27, 2018
  70. 02/36 t/helper: merge test-chmtime into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  71. 06/36 t/helper: merge test-ctype into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  72. 08/36 t/helper: merge (unused) test-delta into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  73. 07/36 t/helper: merge test-date into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  74. 09/36 t/helper: merge test-drop-caches into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  75. 13/36 t/helper: merge test-genrandom into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  76. 14/36 t/helper: merge test-hashmap into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  77. 16/36 t/helper: merge (unused) test-match-trees into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  78. 12/36 t/helper: merge test-example-decorate into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  79. 26/36 t/helper: merge test-run-command into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  80. 27/36 t/helper: merge test-scrap-cache-tree into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  81. 29/36 t/helper: merge test-sigchain into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  82. 28/36 t/helper: merge test-sha1-array into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  83. 30/36 t/helper: merge test-strcmp-offset into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  84. 33/36 t/helper: merge test-subprocess into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  85. 35/36 t/helper: merge test-wildmatch into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  86. 34/36 t/helper: merge test-urlmatch-normalization into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  87. 36/36 t/helper: merge test-write-cache into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  88. 32/36 t/helper: merge test-submodule-config into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  89. 31/36 t/helper: merge test-string-list into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  90. 15/36 t/helper: merge test-index-version into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  91. 25/36 t/helper: merge test-revision-walking into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  92. 18/36 t/helper: merge test-mktemp into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  93. 24/36 t/helper: merge test-regex into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  94. 23/36 t/helper: merge test-ref-store into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  95. 17/36 t/helper: merge (unused) test-mergesort into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  96. 22/36 t/helper: merge test-read-cache into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  97. 19/36 t/helper: merge test-online-cpus into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  98. 10/36 t/helper: merge test-dump-cache-tree into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  99. 11/36 t/helper: merge test-dump-split-index into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  100. 20/36 t/helper: merge test-path-utils into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  101. 21/36 t/helper: merge test-prio-queue into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  102. 03/36 t/helper: merge test-sha1 into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  103. 05/36 t/helper: merge test-config into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  104. 04/36 t/helper: merge test-lazy-init-name-hash into test-toolNguyễn Thái Ngọc Duy, Mar 24, 2018
  105. Ævar Arnfjörð BjarmasonMar 24, 2018
  106. Duy NguyenMar 24, 2018
  107. Junio C HamanoMar 26, 2018
  108. Johannes SchindelinMar 27, 2018
  109. Junio C HamanoMar 27, 2018
  110. Johannes SchindelinMar 27, 2018

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.