anchor.diff:  %%%===================================================================
   
   open_failure_mock(Worker) ->
  -  % mock for open error - note that error is raised after
  -  % register_open is performed
  -  test_utils:mock_expect(Worker, storage_driver, open,
  -    fun(SDHandle2, Flag) ->
  -      meck:passthrough([SDHandle2, Flag]),
  -      throw(error)
  -    end).
  +    % mock for open error - note that error is raised after
  +    % register_open is performed
  +    test_utils:mock_expect(Worker, storage_driver, open,
  +        fun(SDHandle2, Flag) ->
  +            meck:passthrough([SDHandle2, Flag]),
  +            throw(error)
  +        end).
   
   print_mem_and_disc_docs_diff(Worker, MemEntriesBefore, CacheEntriesBefore,
       MemEntriesAfter, CacheEntriesAfter) ->
  -  MemDiff = pool_utils:get_documents_diff(Worker, MemEntriesAfter,
  -    MemEntriesBefore),
  -  CacheDiff = pool_utils:get_documents_diff(Worker, CacheEntriesAfter,
  -    CacheEntriesBefore),
  -  ct:pal("~n MemRes: ~p ~n~n CacheRes: ~p ~n", [MemDiff, CacheDiff]).
  +    MemDiff = pool_utils:get_documents_diff(Worker, MemEntriesAfter,
  +        MemEntriesBefore),
  +    CacheDiff = pool_utils:get_documents_diff(Worker, CacheEntriesAfter,
  +        CacheEntriesBefore),
  +    ct:pal("~n MemRes: ~p ~n~n CacheRes: ~p ~n", [MemDiff, CacheDiff]).
   
   get_mem_and_disc_entries(Worker) ->
  -  {MemEntries, _} = pool_utils:get_pools_entries_and_sizes(Worker, memory),
  -  {DiscEntries, _} = pool_utils:get_pools_entries_and_sizes(Worker, disc),
  -  {MemEntries, DiscEntries}.
  +    {MemEntries, _} = pool_utils:get_pools_entries_and_sizes(Worker, memory),
  +    {DiscEntries, _} = pool_utils:get_pools_entries_and_sizes(Worker, disc),
  +    {MemEntries, DiscEntries}.
   
   get_session_file_handles_num(W, FileGuid, SessionId) ->
  -  FileUuid = file_id:guid_to_uuid(FileGuid),
  -  {ok, [#document{key = FileUuid, value = FileHandlesRec} | _]} = rpc:call(
  -    W, file_handles, list, []
  -  ),
  -  Descriptors = FileHandlesRec#file_handles.descriptors,
  -  case maps:find(SessionId, Descriptors) of
  -    {ok, HandlesNum} ->
  -      HandlesNum;
  -    error ->
  -      0
  -  end.
  +    FileUuid = file_id:guid_to_uuid(FileGuid),
  +    {ok, [#document{key = FileUuid, value = FileHandlesRec} | _]} = rpc:call(
  +        W, file_handles, list, []
  +    ),
  +    Descriptors = FileHandlesRec#file_handles.descriptors,
  +    case maps:find(SessionId, Descriptors) of
  +        {ok, HandlesNum} ->
  +            HandlesNum;
  +        error ->
  +            0
  +    end.
   
   %% Get guid of given by path file. Possible as root to bypass permissions checks.
   get_guid_privileged(Worker, SessId, Path) ->
  -  get_guid(Worker, SessId, Path).
  +    get_guid(Worker, SessId, Path).
   
   get_guid(Worker, SessId, Path) ->
  -  #fuse_response{fuse_response = #guid{guid = Guid}} =
  -    ?assertMatch(
  -      #fuse_response{status = #status{code = ?OK}},
  -      ?req(Worker, SessId, #resolve_guid{path = Path}),
  -      30
  -    ),
  -  Guid.
  +    #fuse_response{fuse_response = #guid{guid = Guid}} =
  +        ?assertMatch(
  +            #fuse_response{status = #status{code = ?OK}},
  +            ?req(Worker, SessId, #resolve_guid{path = Path}),
  +            30
  +        ),
  +    Guid.
   
   for(From, To, Fun) ->
  -  for(From, To, 1, Fun).
  +    for(From, To, 1, Fun).
   for(From, To, Step, Fun) ->
  -  [Fun(I) || I <- lists:seq(From, To, Step)].
  +    [Fun(I) || I <- lists:seq(From, To, Step)].
   
   measure_execution_time(Fun) ->
  -  StartTime = os:timestamp(),
  -  Ans = Fun(),
  -  Now = os:timestamp(),
  -  {timer:now_diff(Now, StartTime), Ans}.
  +    StartTime = os:timestamp(),
  +    Ans = Fun(),
  +    Now = os:timestamp(),
  +    {timer:now_diff(Now, StartTime), Ans}.
   
   check_run_parallel_ans(0) ->
  -  ok;
  +    ok;
   check_run_parallel_ans(Num) ->
  -  RStatus = receive
  -              run_parallel_ok ->
  -                ok
  -            after
  -              100000 ->
  -                timeout
  -            end,
  -  ?assertEqual(ok, RStatus),
  -  check_run_parallel_ans(Num - 1).
  +    RStatus = receive
  +        run_parallel_ok ->
  +            ok
  +    after
  +        100000 ->
  +            timeout
  +    end,
  +    ?assertEqual(ok, RStatus),
  +    check_run_parallel_ans(Num - 1).
   
   report_success(Master) ->
  -  Master ! run_parallel_ok.
  +    Master ! run_parallel_ok.
   
   wait_for_cache_dump(Workers) ->
  -  lists:foreach(fun(W) ->
  -    rpc:call(W, caches_controller, wait_for_cache_dump, [])
  -                end, Workers).
  +    lists:foreach(fun(W) ->
  +        rpc:call(W, caches_controller, wait_for_cache_dump, [])
  +    end, Workers).
   
   generate_dir(Config, Size) ->
  -  [Worker | _] = ?config(op_worker_nodes, Config),
  -
  -  {SessId1, _UserId1} =
  -    {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  -
  -  MainDir = generator:gen_name(),
  -  MainDirPath = <<"/space_name1/", MainDir/binary, "/">>,
  -  ?assertMatch({ok, _}, lfm_proxy:mkdir(Worker, SessId1, MainDirPath, 8#755)),
  -
  -  case Size of
  -    0 ->
  -      {MainDirPath, []};
  -    _ ->
  -      Files = lists:sort(lists:map(fun(_) ->
  -        generator:gen_name() end, lists:seq(1, Size))),
  -      lists:foreach(fun(F) ->
  -        ?assertMatch({ok, _}, lfm_proxy:create(Worker, SessId1, <<MainDirPath/binary, F/binary>>, 8#755))
  -                    end, Files),
  -
  -      {MainDirPath, Files}
  -  end.
  +    [Worker | _] = ?config(op_worker_nodes, Config),
  +
  +    {SessId1, _UserId1} =
  +        {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  +
  +    MainDir = generator:gen_name(),
  +    MainDirPath = <<"/space_name1/", MainDir/binary, "/">>,
  +    ?assertMatch({ok, _}, lfm_proxy:mkdir(Worker, SessId1, MainDirPath, 8#755)),
  +
  +    case Size of
  +        0 ->
  +            {MainDirPath, []};
  +        _ ->
  +            Files = lists:sort(lists:map(fun(_) ->
  +                generator:gen_name() end, lists:seq(1, Size))),
  +            lists:foreach(fun(F) ->
  +                ?assertMatch({ok, _}, lfm_proxy:create(Worker, SessId1, <<MainDirPath/binary, F/binary>>, 8#755))
  +            end, Files),
  +
  +            {MainDirPath, Files}
  +    end.
   
   verify_attrs(Config, MainDirPath, Files, Limit, ExpectedSize) ->
  -  verify_attrs(Config, MainDirPath, Files, Limit, ExpectedSize, 0).
  +    verify_attrs(Config, MainDirPath, Files, Limit, ExpectedSize, 0).
   
   verify_attrs(Config, MainDirPath, Files, Limit, ExpectedSize, Offset) ->
  -  [Worker | _] = ?config(op_worker_nodes, Config),
  -
  -  {SessId1, _UserId1} =
  -    {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  -
  -  Ans = lfm_proxy:read_dir_plus(Worker, SessId1, {path, MainDirPath}, Offset, Limit),
  -  ?assertMatch({ok, _}, Ans),
  -  {ok, List} = Ans,
  -  ?assertEqual(ExpectedSize, length(List)),
  -
  -  lists:foreach(fun({F1, F2}) ->
  -    ?assertEqual(F1#file_attr.name, F2)
  -                end, lists:zip(List, lists:sublist(Files, Offset + 1, ExpectedSize))).
  +    [Worker | _] = ?config(op_worker_nodes, Config),
  +
  +    {SessId1, _UserId1} =
  +        {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  +
  +    Ans = lfm_proxy:read_dir_plus(Worker, SessId1, {path, MainDirPath}, Offset, Limit),
  +    ?assertMatch({ok, _}, Ans),
  +    {ok, List} = Ans,
  +    ?assertEqual(ExpectedSize, length(List)),
  +
  +    lists:foreach(fun({F1, F2}) ->
  +        ?assertEqual(F1#file_attr.name, F2)
  +    end, lists:zip(List, lists:sublist(Files, Offset + 1, ExpectedSize))).
   
   verify_attrs_with_token(Config, MainDirPath, Files, ExpectedSize, Limit, Offset, IsLast, Token) ->
  -  [Worker | _] = ?config(op_worker_nodes, Config),
  -
  -  {SessId1, _UserId1} =
  -    {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  -
  -  Ans = lfm_proxy:read_dir_plus(Worker, SessId1, {path, MainDirPath}, 0, Limit, Token),
  -  ?assertMatch({ok, _, _, _}, Ans),
  -  {ok, List, Token2, IL} = Ans,
  -  ?assertEqual(ExpectedSize, length(List)),
  -
  -  lists:foreach(fun({F1, F2}) ->
  -    ?assertEqual(F1#file_attr.name, F2)
  -                end, lists:zip(List, lists:sublist(Files, Offset + 1, ExpectedSize))),
  -  ?assertEqual(IsLast, IL),
  -  Token2.
  +    [Worker | _] = ?config(op_worker_nodes, Config),
  +
  +    {SessId1, _UserId1} =
  +        {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  +
  +    Ans = lfm_proxy:read_dir_plus(Worker, SessId1, {path, MainDirPath}, 0, Limit, Token),
  +    ?assertMatch({ok, _, _, _}, Ans),
  +    {ok, List, Token2, IL} = Ans,
  +    ?assertEqual(ExpectedSize, length(List)),
  +
  +    lists:foreach(fun({F1, F2}) ->
  +        ?assertEqual(F1#file_attr.name, F2)
  +    end, lists:zip(List, lists:sublist(Files, Offset + 1, ExpectedSize))),
  +    ?assertEqual(IsLast, IL),
  +    Token2.
   
   verify_with_token(Config, MainDirPath, Files, ExpectedSize, Limit, Offset, IsLast, Token) ->
  -  [Worker | _] = ?config(op_worker_nodes, Config),
  -
  -  {SessId1, _UserId1} =
  -    {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  -
  -  Ans = lfm_proxy:ls(Worker, SessId1, {path, MainDirPath}, 0, Limit, Token),
  -  ?assertMatch({ok, _, _, _}, Ans),
  -  {ok, List, Token2, IL} = Ans,
  -  ?assertEqual(ExpectedSize, length(List)),
  -
  -  lists:foreach(fun({{_, F1}, F2}) ->
  -    ?assertEqual(F1, F2)
  -                end, lists:zip(List, lists:sublist(Files, Offset + 1, ExpectedSize))),
  -  ?assertEqual(IsLast, IL),
  -  Token2.
  +    [Worker | _] = ?config(op_worker_nodes, Config),
  +
  +    {SessId1, _UserId1} =
  +        {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  +
  +    Ans = lfm_proxy:ls(Worker, SessId1, {path, MainDirPath}, 0, Limit, Token),
  +    ?assertMatch({ok, _, _, _}, Ans),
  +    {ok, List, Token2, IL} = Ans,
  +    ?assertEqual(ExpectedSize, length(List)),
  +
  +    lists:foreach(fun({{_, F1}, F2}) ->
  +        ?assertEqual(F1, F2)
  +    end, lists:zip(List, lists:sublist(Files, Offset + 1, ExpectedSize))),
  +    ?assertEqual(IsLast, IL),
  +    Token2.
   
   verify_with_startid(Config, MainDirPath, Files, FilesOffset, ExpectedSize, Offset, Limit, StartId) ->
  -  [Worker | _] = ?config(op_worker_nodes, Config),
  -
  -  {SessId1, _UserId1} =
  -    {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  -
  -  Ans = lfm_proxy:ls(Worker, SessId1, {path, MainDirPath}, Offset, Limit, undefined, StartId),
  -  {ok, List, _, _} = ?assertMatch({ok, _, _, _}, Ans),
  -  ?assertEqual(ExpectedSize, length(List)),
  -
  -  lists:foreach(fun({{_, F1}, F2}) ->
  -    ?assertEqual(F1, F2)
  -  end, lists:zip(List, lists:sublist(Files, FilesOffset + 1, ExpectedSize))),
  -
  -  case List of
  -    [_ | _] ->
  -      {_, NextStartId} = lists:last(List),
  -      NextStartId;
  -    _ ->
  -      undefined
  -  end.
  +    [Worker | _] = ?config(op_worker_nodes, Config),
  +
  +    {SessId1, _UserId1} =
  +        {?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config), ?config({user_id, <<"user1">>}, Config)},
  +
  +    Ans = lfm_proxy:ls(Worker, SessId1, {path, MainDirPath}, Offset, Limit, undefined, StartId),
  +    {ok, List, _, _} = ?assertMatch({ok, _, _, _}, Ans),
  +    ?assertEqual(ExpectedSize, length(List)),
  +
  +    lists:foreach(fun({{_, F1}, F2}) ->
  +        ?assertEqual(F1, F2)
  +    end, lists:zip(List, lists:sublist(Files, FilesOffset + 1, ExpectedSize))),
  +
  +    case List of
  +        [_ | _] ->
  +            {_, NextStartId} = lists:last(List),
  +            NextStartId;
  +        _ ->
  +            undefined
  +    end.
   
   verify_file_content(Config, Handle, FileContent) ->
  -  [Worker | _] = ?config(op_worker_nodes, Config),
  -
  -  case ?config(storage_type, Config) of
  -    posix -> ?assertEqual({ok, FileContent},
  -      lfm_proxy:read(Worker, Handle, 0, 100));
  -    _ -> ?assertEqual({ok, FileContent},
  -      lfm_proxy:read(Worker, Handle, 0, size(FileContent)))
  -  end.
  +    [Worker | _] = ?config(op_worker_nodes, Config),
  +
  +    case ?config(storage_type, Config) of
  +        posix -> ?assertEqual({ok, FileContent},
  +            lfm_proxy:read(Worker, Handle, 0, 100));
  +        _ -> ?assertEqual({ok, FileContent},
  +            lfm_proxy:read(Worker, Handle, 0, size(FileContent)))
  +    end.
   
   verify_file_content(Config, Handle, FileContent, From, To) ->
  -  [Worker | _] = ?config(op_worker_nodes, Config),
  -  ?assertEqual({ok, FileContent}, lfm_proxy:read(Worker, Handle, From, To)).
  +    [Worker | _] = ?config(op_worker_nodes, Config),
  +    ?assertEqual({ok, FileContent}, lfm_proxy:read(Worker, Handle, From, To)).
  
positive.code: %%            ]},
  %%            {description, ""}
  %%        ]},
      {config, [{name, high_level_single_thread_small_dir},
        {parameters, [
          [{name, dir_level}, {value, 100}],
          [{name, dirs_num_per_proc}, {value, 5}]
        ]},
        {description, ""}
      ]},
      {config, [{name, high_level_single_thread_large_dir},
        {parameters, [
          [{name, dir_level}, {value, 100}],
          [{name, dirs_num_per_proc}, {value, 100}]
        ]},
        {description, ""}
      ]},
      {config, [{name, high_level_10_threads_large_dir},
        {parameters, [
          [{name, proc_num}, {value, 10}],
          [{name, dir_level}, {value, 100}],
          [{name, dirs_num_per_proc}, {value, 10}]
        ]},
        {description, ""}
      ]}
  %%        {config, [{name, high_level_many_threads_large_dir},
  %%            {parameters, [
  %%                [{name, proc_num}, {value, 100}],
  
negative.code: -include_lib("ctool/include/test/performance.hrl").
  
  -export([
      fslogic_new_file/1,
      lfm_create_and_unlink/1,
      lfm_create_and_access/1,
      lfm_basic_rename/1,
      lfm_basic_rdwr/1,
      lfm_basic_rdwr_opens_file_once/1,
      lfm_basic_rdwr_after_file_delete/1,
      lfm_write/1,
      lfm_stat/1,
      lfm_synch_stat/1,
      lfm_truncate/1,
      lfm_acl/1,
      rm_recursive/1,
      file_gap/1,
      ls/1, ls_base/1,
      ls_with_stats/1, ls_with_stats_base/1,
      create_share_dir/1,
      create_share_file/1,
      remove_share/1,
      share_getattr/1,
      share_list/1,
      share_read/1,
      share_child_getattr/1,
      share_child_list/1,
      share_child_read/1,
      share_permission_denied/1,
      echo_loop/1,
      echo_loop_base/1,
      storage_file_creation_should_be_delayed_until_open/1,
      delayed_creation_should_not_prevent_mv/1,
      delayed_creation_should_not_prevent_truncate/1,
      new_file_should_not_have_popularity_doc/1,
      new_file_should_have_zero_popularity/1,
      opening_file_should_increase_file_popularity/1,
      file_popularity_should_have_correct_file_size/1,
      readdir_plus_should_return_empty_result_for_empty_dir/1,
      readdir_plus_should_return_empty_result_zero_size/1,
      readdir_plus_should_work_with_zero_offset/1,
      readdir_plus_should_work_with_non_zero_offset/1,
      readdir_plus_should_work_with_size_greater_than_dir_size/1,
      readdir_plus_should_work_with_token/1,
      readdir_plus_should_work_with_token2/1,
      readdir_should_work_with_token/1,
      readdir_should_work_with_token2/1,
      readdir_should_work_with_startid/1,
      lfm_recreate_handle/3,
      lfm_open_failure/1,
      lfm_create_and_open_failure/1,
      lfm_open_in_direct_mode/1,
      lfm_copy_failure/1,
      lfm_open_multiple_times_failure/1,
      lfm_open_failure_multiple_users/1,
      lfm_open_and_create_open_failure/1,
      lfm_copy_failure_multiple_users/1,
      lfm_rmdir/1
  ]).
  
  -define(TIMEOUT, timer:seconds(10)).
  