Re: [PATCH v5 3/6] git-p4: retry kill/cleanup operations in tests with timeout
- From
Luke Diamand <luke@diamand.org>
- Date
- Nov 17, 2015, 09:38 UTC
- Message-ID
- <564AF59F.2070601@diamand.org>
- In-Reply-To
- <90549E9A-205A-4848-B794-23E44F325F1E@gmail.com>
On 17/11/15 08:22, Lars Schneider wrote:
Show 18 quoted lines
> > On 16 Nov 2015, at 09:36, Luke Diamand <luke@diamand.org> wrote: > >> On 15/11/15 13:08, larsxschneider@gmail.com wrote: >>> From: Lars Schneider <larsxschneider@gmail.com> >>> >>> In rare cases kill/cleanup operations in tests fail. Retry these >>> operations with a timeout to make the test less flaky. >> >> Should there be a sleep in that retry_until_success loop so that it doesn't spin sending signals to p4d? > Agreed. I will add a sleep in the next roll! > > >> >> Do we need to worry about the time offset being updated (e.g. NTP) while this is running? > Interesting question! I would consider this an edge case but I can see how it could happen. > Do you see a way to handle that in an easy way? >
You want to somehow call clock_gettime(CLOCK_MONOTONIC). That's not in python until 3.3. Writing a C program seems like overkill but could be a solution if this becomes a problem.