From 45136f27bb239a48d696e21d0754cec87e8b05ef Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Mon, 19 Aug 2019 20:34:11 -0500 Subject: [PATCH] test-prune-older: disable background gc The debian buildd's exposed a race between the default automatic background gc and the explict gc in the test, resulting in: git commit --date 1566025987 -qam 1566025987 Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. git gc --aggressive fatal: gc is already running on machine 'zandonai' pid 34323 (use --force if not) Traceback (most recent call last): File "t/test-prune-older", line 190, in save_utcs = create_older_random_saves(save_population, three_years_ago, now) File "t/test-prune-older", line 74, in create_older_random_saves exc(['git', 'gc', '--aggressive']) File "t/test-prune-older", line 41, in exc check_call(cmd, shell=shell) File "/usr/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['git', 'gc', '--aggressive']' returned non-zero exit status 128 Fix it by disabling gc.autoDetach in the git config for the test repo -- something we may well need to do in other tests too. Thanks to Robert Edmonds for reporting the problem and suggesting the fix. Signed-off-by: Rob Browning Tested-by: Rob Browning --- t/test-prune-older | 1 + 1 file changed, 1 insertion(+) diff --git a/t/test-prune-older b/t/test-prune-older index 6adea5b..c460e82 100755 --- a/t/test-prune-older +++ b/t/test-prune-older @@ -155,6 +155,7 @@ with test_tempdir('prune-older-') as tmpdir: three_years_ago = now - (60 * 60 * 24 * 366 * 3) chdir(tmpdir) ex(['git', 'init', 'work']) + ex(['git', 'config', 'gc.autoDetach', 'false']) wvstart('generating ' + str(save_population) + ' random saves') chdir(tmpdir + '/work') -- 2.39.2