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

Re: [PATCH v4 3/4] git-p4: retry kill/cleanup operations in tests with timeout

From
Lars Schneider <larsxschneider@gmail.com>
Date
Nov 6, 2015, 13:19 UTC
Message-ID
<493416AE-4514-437F-909D-BE2894FF118D@gmail.com>
In-Reply-To
<CAPig+cQiGqo2rNSC_Lw-WXq0ABp6PRFV-2w1wtK+XccQt2RD=w@mail.gmail.com>
Show 26 quoted lines
> On 06 Nov 2015, at 10:28, Eric Sunshine <sunshine@sunshineco.com> wrote:
> 
> On Fri, Nov 6, 2015 at 3:58 AM,  <larsxschneider@gmail.com> wrote:
>> In rare cases kill/cleanup operations in tests fail. Retry these
>> operations with a timeout to make the test less flaky.
>> 
>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
>> ---
>> diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
>> +retry_until_success() {
>> +    timeout=$(($(date +%s) + $RETRY_TIMEOUT))
>> +    until "$@" 2>/dev/null || test $(date +%s) -gt $timeout
>> +    do :
>> +    done
>> +}
>> +
>> +retry_until_fail() {
>> +    timeout=$(($(date +%s) + $RETRY_TIMEOUT))
>> +    until ! "$@" 2>/dev/null || test $(date +%s) -gt $timeout
>> +    do :
>> +    done
>> +}
> 
> I'm confused by this. Patch 2/4 was already calling
> retry_until_fail(), but it's introduction seems to be here in patch
> 3/4. Am I missing something obvious?
No, my fault. I reordered the commits and forgot about this. I will fix the order in the next roll.

Thanks, Lars

Previous: Lars SchneiderNext: larsxschneider@gmail.com
Message 11 of 20 in “Add Travis CI support”
  1. 0/4 Add Travis CI supportlarsxschneider@gmail.com, Nov 6, 2015
  2. 1/4 add function test_must_fail_or_sigpipe and use it to fix flaky testslarsxschneider@gmail.com, Nov 6, 2015
  3. Junio C HamanoNov 6, 2015
  4. Junio C HamanoNov 6, 2015
  5. 2/4 git-p4: add p4d timeout in testslarsxschneider@gmail.com, Nov 6, 2015
  6. Eric SunshineNov 6, 2015
  7. Lars SchneiderNov 6, 2015
  8. 3/4 git-p4: retry kill/cleanup operations in tests with timeoutlarsxschneider@gmail.com, Nov 6, 2015
  9. Eric SunshineNov 6, 2015
  10. Lars SchneiderNov 6, 2015
  11. Lars SchneiderNov 6, 2015
  12. 4/4 Add Travis CI supportlarsxschneider@gmail.com, Nov 6, 2015
  13. Eric SunshineNov 6, 2015
  14. Lars SchneiderNov 6, 2015
  15. Sebastian SchuberthNov 6, 2015
  16. Lars SchneiderNov 6, 2015
  17. Sebastian SchuberthNov 6, 2015
  18. Lars SchneiderNov 6, 2015
  19. Sebastian SchuberthNov 6, 2015
  20. Lars SchneiderNov 6, 2015

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.