anchor.diff:      run_tests(W, #test_spec{
           root_dir = atom_to_binary(?FUNCTION_NAME, utf8),
           env = #{
  +            <<"file1">> => #{
  +                privs => [?write_attributes],
  +                hook => fun(OwnerSessId, Guid) ->
  +                    lfm_proxy:set_metadata(W, OwnerSessId, {guid, Guid}, json, <<"VAL">>, [])
  +                end
  +            }
  +        },
  +        fn = fun(_, SessId, Path) ->
  +            lfm_proxy:remove_metadata(W, SessId, {path, <<Path/binary, "/file1">>}, json)
  +        end
  +    }, Config).
  +
  +
  +get_xattr_test(Config) ->
  +    [W | _] = ?config(op_worker_nodes, Config),
  +
  +    run_tests(W, #test_spec{
  +        root_dir = atom_to_binary(?FUNCTION_NAME, utf8),
  +        env = #{
  +            <<"file1">> => #{
  +                privs => [?read_attributes],
  +                hook => fun(OwnerSessId, Guid) ->
  +                    lfm_proxy:set_xattr(W, OwnerSessId, {guid, Guid}, #xattr{name = <<"myxattr">>, value = <<"VAL">>})
  +                end
  +            }
  +        },
  +        fn = fun(_, SessId, Path) ->
  +            lfm_proxy:get_xattr(W, SessId, {path, <<Path/binary, "/file1">>}, <<"myxattr">>)
  +        end
  +    }, Config).
  +
  +
  +list_xattr_test(Config) ->
  +    [W | _] = ?config(op_worker_nodes, Config),
  +
  +    run_tests(W, #test_spec{
  +        root_dir = atom_to_binary(?FUNCTION_NAME, utf8),
  +        env = #{
  +            <<"file1">> => #{
  +                hook => fun(OwnerSessId, Guid) ->
  +                    lfm_proxy:set_xattr(W, OwnerSessId, {guid, Guid}, #xattr{name = <<"myxattr">>, value = <<"VAL">>})
  +                end
  +            }
  +        },
  +        fn = fun(_, SessId, Path) ->
  +            lfm_proxy:list_xattr(W, SessId, {path, <<Path/binary, "/file1">>}, false, false)
  +        end
  +    }, Config).
  +
  +
  +set_xattr_test(Config) ->
  +    [W | _] = ?config(op_worker_nodes, Config),
  +
  +    run_tests(W, #test_spec{
  +        root_dir = atom_to_binary(?FUNCTION_NAME, utf8),
  +        env = #{
               <<"file1">> => #{privs => [?write_attributes]}
           },
           fn = fun(_, SessId, Path) ->
  -            lfm_proxy:remove_metadata(W, SessId, {path, <<Path/binary, "/file1">>}, json)
  +            lfm_proxy:set_xattr(
  +                W, SessId, {path, <<Path/binary, "/file1">>},
  +                #xattr{name = <<"myxattr">>, value = <<"VAL">>}
  +            )
  +        end
  +    }, Config).
  +
  +
  +remove_xattr_test(Config) ->
  +    [W | _] = ?config(op_worker_nodes, Config),
  +
  +    run_tests(W, #test_spec{
  +        root_dir = atom_to_binary(?FUNCTION_NAME, utf8),
  +        env = #{
  +            <<"file1">> => #{
  +                privs => [?write_attributes],
  +                hook => fun(OwnerSessId, Guid) ->
  +                    lfm_proxy:set_xattr(W, OwnerSessId, {guid, Guid}, #xattr{name = <<"myxattr">>, value = <<"VAL">>})
  +                end
  +            }
  +        },
  +        fn = fun(_, SessId, Path) ->
  +            lfm_proxy:remove_xattr(W, SessId, {path, <<Path/binary, "/file1">>}, <<"myxattr">>)
           end
       }, Config).
   
  
positive.code:     set_mimetype_test/1,
      get_metadata_test/1,
      set_metadata_test/1,
      remove_metadata_test/1
  ]).
  
  all() ->
  
negative.code: %%% @end
  %%%-------------------------------------------------------------------
  %%% @doc
  %%% This test suite verifies correct behaviour of posix and acl
  %%% permissions with corresponding lfm (logical_file_manager) functions
  %%% @end
  %%%-------------------------------------------------------------------
  