anchor.diff:  %% Check if stress test should be stopped because of error.
   %% @end
   %%--------------------------------------------------------------------
  --spec check_error(Rep :: integer(), FailedReps :: map()) -> ok | error.
  -check_error(Rep, _FailedReps) when Rep < ?STRESS_ERRORS_TO_STOP ->
  -    ok;
  +-spec check_error(Rep :: integer(), FailedReps :: map()) -> integer() | permanent_error.
   check_error(Rep, FailedReps) ->
       check_error(Rep - 1, Rep, FailedReps).
   
  +%%--------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Check if stress test should be stopped because of error.
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec check_error(Rep :: integer(), Start :: integer(), FailedReps :: map()) -> integer() | permanent_error.
   check_error(Check, Start, _FailedReps) when Start - ?STRESS_ERRORS_TO_STOP > Check ->
  -    error;
  +    permanent_error;
  +check_error(0, Start, _FailedReps) ->
  +    Start - 1;
   check_error(Check, Start, FailedReps) ->
       case maps:is_key(integer_to_binary(Check), FailedReps) of
           false ->
  -            ok;
  +            Start - Check - 1;
           _ ->
               check_error(Check - 1, Start, FailedReps)
       end.
  
positive.code:     hd(lists:filtermap(fun(#xmlElement{name = copyright, content = [Copyright]}) ->
          {true, list_to_binary(Copyright#xmlText.value)};
          (_) -> false
     end, Doc#xmlElement.content)).
  
  %%--------------------------------------------------------------------
  %% @private
  
negative.code:     ct:timetrap({seconds, Timeout + ?STRESS_TIMEOUT_EXTENSION_SECONDS}), % add 10 minutes to let running tests end
  
      AnsList = lists:foldl(fun(Case, Ans) ->
          [{{history, Case}, {Rep, FailedReps, LastFails}}] = ets:lookup(?STRESS_ETS_NAME, {history, Case}),
          case LastFails of
              permanent_error ->
                  SkipMessage = str_utils:format("Case: ~p, skipped (too many fails)", [Case]),
                  [{error, list_to_binary(SkipMessage)} | Ans];
              _ ->
                  CaseAns = try
                                ExtendedConfig =
                                    [{rep_num, Rep}, {failed_num, FailedReps}, {last_fails, LastFails}] ++ Config,
                                NewConfig = try
                                                apply(Suite, init_per_testcase, [Case, ExtendedConfig])
                                            catch
                                                error:undef ->
                                                    ExtendedConfig
                                            end,
                                case apply(Suite, Case, [NewConfig]) of
                                    {ok, TmpAns} ->
  %%                           TmpAns2 = lists:map(fun(Param) ->
  %%                               PName = Param#parameter.name,
  %%                               Param#parameter{name = concat_atoms(Case, PName)}
  %%                           end, TmpAns),
  %%                           [{ok, TmpAns2} | Ans];
                                        [{ok, TmpAns} | Ans];
                                    {error, E} ->
                                        Message = str_utils:format("Case: ~p, error: ~p", [Case, E]),
                                        [{error, list_to_binary(Message)} | Ans]
                                end
                            catch
                                E1:E2 ->
                                    % only init_per_testcase can throw (case has catch inside)
                                    ct:print("Case: ~p, init_per_testcase error: ~p:~p", [Case, E1, E2]),
                                    Message2 = str_utils:format("Case: ~p, init_per_testcase error: ~p:~p", [Case, E1, E2]),
                                    [{error, list_to_binary(Message2)} | Ans]
                            end,
                  try
                      apply(Suite, end_per_testcase, [Case, Config])
                  catch
                      error:undef ->
                          ok;
                      E1_2:E2_2 ->
                          ct:print("Case: ~p, end_per_testcase error: ~p:~p", [Case, E1_2, E2_2])
                  end,
                  CaseAns
          end
      end, [], Cases),
      lists:reverse(AnsList).
  
  