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

[PATCH] t9501: Correctly force over max load everywhere

From
Brian Gernhardt <brian@gernhardtsoftware.com>
Date
Feb 6, 2010, 14:50 UTC
Message-ID
<1265467803-31210-1-git-send-email-brian@gernhardtsoftware.com>
In-Reply-To
<201002061505.13886.jnareb@gmail.com>

The code to check for load returns 0 if it doesn't know how to find load. It also checks to see if the current load is higher than the max load. So to force the script to quit early by setting the maxload variable negative which should work for systems where we can detect load (which should be a positive number) and systems where we can't (where detected load is 0)

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
---
 Tested and works.
 t/t9501-gitweb-standalone-http-status.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh
index 7590f10..d196cc5 100755
--- a/t/t9501-gitweb-standalone-http-status.sh
+++ b/t/t9501-gitweb-standalone-http-status.sh
@@ -117,7 +117,7 @@ test_debug 'cat gitweb.output'
 
 # always hit the load limit
 cat >>gitweb_config.perl <<\EOF
-our $maxload = 0;
+our $maxload = -1;
 EOF
 
 test_expect_success 'load checking: load too high (default action)' '
-- 
1.7.0.rc1.205.g52ece
Previous: Jakub NarebskiNext: Jakub Narebski
Message 5 of 8 in “t9501: Skip testing load if we can't detect it”
  1. t9501: Skip testing load if we can't detect itBrian Gernhardt, Feb 6, 2010
  2. Jakub NarebskiFeb 6, 2010
  3. Brian GernhardtFeb 6, 2010
  4. Jakub NarebskiFeb 6, 2010
  5. t9501: Correctly force over max load everywhereBrian Gernhardt, Feb 6, 2010
  6. Jakub NarebskiFeb 6, 2010
  7. Junio C HamanoFeb 6, 2010
  8. Brian GernhardtFeb 6, 2010

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.