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

[PATCH 07/16] t/perf/p7519: cleanup coding style

From
JGJeff Hostetler via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 11, 2022, 21:14 UTC
Message-ID
<3482fb79a517d4703b5aa888a8c3d4890d034cf7.1647033303.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1174.git.1647033303.gitgitgadget@gmail.com>
From: Jeff Hostetler <jeffhost@microsoft.com>
fixup! t/perf/p7519: add fsmonitor--daemon test cases
Add "_hook" to name of shell function to set up for Watchman/hook test runs.
Fix code style of added "if then".
Add body of builtin test to a test_expect_success.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
---
 t/perf/p7519-fsmonitor.sh | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
index 5f97edf6a11..7a7981b0e61 100755
--- a/t/perf/p7519-fsmonitor.sh
+++ b/t/perf/p7519-fsmonitor.sh
@@ -141,7 +141,7 @@ test_expect_success "one time repo setup" '
 	fi
 '
 
-setup_for_fsmonitor () {
+setup_for_fsmonitor_hook () {
 	# set INTEGRATION_SCRIPT depending on the environment
 	if test -n "$INTEGRATION_PATH"
 	then
@@ -182,8 +182,7 @@ test_perf_w_drop_caches () {
 }
 
 test_fsmonitor_suite () {
-	if test -n "$USE_FSMONITOR_DAEMON"
-	then
+	if test -n "$USE_FSMONITOR_DAEMON"; then
 		DESC="builtin fsmonitor--daemon"
 	elif test -n "$INTEGRATION_SCRIPT"; then
 		DESC="fsmonitor=$(basename $INTEGRATION_SCRIPT)"
@@ -264,11 +263,11 @@ test_fsmonitor_suite () {
 trace_start fsmonitor-watchman
 if test -n "$GIT_PERF_7519_FSMONITOR"; then
 	for INTEGRATION_PATH in $GIT_PERF_7519_FSMONITOR; do
-		test_expect_success "setup for fsmonitor $INTEGRATION_PATH" 'setup_for_fsmonitor'
+		test_expect_success "setup for fsmonitor $INTEGRATION_PATH" 'setup_for_fsmonitor_hook'
 		test_fsmonitor_suite
 	done
 else
-	test_expect_success "setup for fsmonitor" 'setup_for_fsmonitor'
+	test_expect_success "setup for fsmonitor hook" 'setup_for_fsmonitor_hook'
 	test_fsmonitor_suite
 fi
 
@@ -306,13 +305,15 @@ if test_have_prereq FSMONITOR_DAEMON
 then
 	USE_FSMONITOR_DAEMON=t
 
-	trace_start fsmonitor--daemon--server
-	git fsmonitor--daemon start
+	test_expect_success "setup for builtin fsmonitor" '
+		trace_start fsmonitor--daemon--server &&
+		git fsmonitor--daemon start &&
 
-	trace_start fsmonitor--daemon--client
+		trace_start fsmonitor--daemon--client &&
 
-	git config core.fsmonitor true
-	git update-index --fsmonitor
+		git config core.fsmonitor true &&
+		git update-index --fsmonitor
+	'
 
 	test_fsmonitor_suite
 
-- 
gitgitgadget
Previous: Jeff Hostetler via GitGitGadgetNext: Ævar Arnfjörð Bjarmason
Message 18 of 32 in “Builtin FSMonitor Part 2.5”
  1. 00/16 Builtin FSMonitor Part 2.5Jeff Hostetler via GitGitGadget, Mar 11, 2022
  2. 01/16 t/test-lib: avoid using git on LHS of pipeJeff Hostetler via GitGitGadget, Mar 11, 2022
  3. Junio C HamanoMar 14, 2022
  4. 05/16 fsmonitor--daemon: refactor cookie handling for readabilityJeff Hostetler via GitGitGadget, Mar 11, 2022
  5. Ævar Arnfjörð BjarmasonMar 14, 2022
  6. Derrick StoleeMar 14, 2022
  7. Junio C HamanoMar 14, 2022
  8. Jeff HostetlerMar 21, 2022
  9. 02/16 update-index: convert advise() messages back to warning()Jeff Hostetler via GitGitGadget, Mar 11, 2022
  10. Junio C HamanoMar 14, 2022
  11. Jeff HostetlerMar 21, 2022
  12. 10/16 t7527: delete unused verify_status() functionJeff Hostetler via GitGitGadget, Mar 11, 2022
  13. 11/16 fsmonitor-ipc: add _() to calls to die()Jeff Hostetler via GitGitGadget, Mar 11, 2022
  14. 15/16 fsmonitor--daemon: add _() to calls to error()Jeff Hostetler via GitGitGadget, Mar 11, 2022
  15. 12/16 compat/fsmonitor/fsm-listen-darwin: add _() to calls to error()Jeff Hostetler via GitGitGadget, Mar 11, 2022
  16. 03/16 compat/fsmonitor/fsm-listen-darwin: split out GCC-specific declarationsJeff Hostetler via GitGitGadget, Mar 11, 2022
  17. 06/16 t/perf/p7519: use grep rather than egrep in testJeff Hostetler via GitGitGadget, Mar 11, 2022
  18. 07/16 t/perf/p7519: cleanup coding styleJeff Hostetler via GitGitGadget, Mar 11, 2022
  19. Ævar Arnfjörð BjarmasonMar 14, 2022
  20. 14/16 fsmonitor--daemon: add _() to calls to die()Jeff Hostetler via GitGitGadget, Mar 11, 2022
  21. 09/16 t7527: fix && chaining in matrix_try()Jeff Hostetler via GitGitGadget, Mar 11, 2022
  22. Junio C HamanoMar 14, 2022
  23. 08/16 t7527: add parameters to start_daemon to handle args and subshellJeff Hostetler via GitGitGadget, Mar 11, 2022
  24. Ævar Arnfjörð BjarmasonMar 14, 2022
  25. 04/16 t/helper/fsmonitor-client: cleanup call to parse_options()Jeff Hostetler via GitGitGadget, Mar 11, 2022
  26. Ævar Arnfjörð BjarmasonMar 14, 2022
  27. 13/16 compat/fsmonitor/fsm-listen-win32: add _() to calls to error()Jeff Hostetler via GitGitGadget, Mar 11, 2022
  28. 16/16 fsmonitor-settings: simplify initialization of settings dataJeff Hostetler via GitGitGadget, Mar 11, 2022
  29. Junio C HamanoMar 14, 2022
  30. Jeff HostetlerMar 15, 2022
  31. Junio C HamanoMar 15, 2022
  32. Junio C HamanoMar 13, 2022

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.