lol

nixos tests: retry: Count down to 0, and pass remaining attempts to the sub

Allows test functions to output diagnostic information on failure.

+2 -2
+2 -2
nixos/lib/test-driver/Machine.pm
··· 219 219 sub retry { 220 220 my ($coderef) = @_; 221 221 my $n; 222 - for ($n = 0; $n < 900; $n++) { 223 - return if &$coderef; 222 + for ($n = 899; $n >=0; $n--) { 223 + return if &$coderef($n); 224 224 sleep 1; 225 225 } 226 226 die "action timed out after $n seconds";