def METHOD_NAME(test, params, env):
    """
    Test file transfer between host and vm with passt backend interface
    """
    libvirt_version.is_libvirt_feature_supported(params)
    root = 'root_user' == params.get('user_type', '')
    if root:
        vm_name = params.get('main_vm')
        vm = env.get_vm(vm_name)
        virsh_ins = virsh
        log_dir = params.get('log_dir')
        user_id = params.get('user_id')
    else:
        vm_name = params.get('unpr_vm_name')
        test_user = params.get('test_user', '')
        test_passwd = params.get('test_passwd', '')
        user_id = passt.get_user_id(test_user)
        unpr_vm_args = {
            'username': params.get('username'),
            'password': params.get('password'),
        }
        vm = libvirt_unprivileged.get_unprivileged_vm(vm_name, test_user,
                                                      test_passwd,
                                                      **unpr_vm_args)
        uri = f'qemu+ssh://{test_user}@localhost/session'
        virsh_ins = virsh.VirshPersistent(uri=uri)
        host_session = aexpect.ShellSession('su')
        remote.VMManager.set_ssh_auth(host_session, 'localhost', test_user,
                                      test_passwd)
        host_session.close()
    iface_attrs = eval(params.get('iface_attrs'))
    params['socket_dir'] = socket_dir = eval(params.get('socket_dir'))
    params['proc_checks'] = proc_checks = eval(params.get('proc_checks', '{}'))
    vm_iface = params.get('vm_iface', 'eno1')
    host_iface = params.get('host_iface')
    host_iface = host_iface if host_iface else utils_net.get_net_if(
        state="UP")[0]
    log_file = f'/run/user/{user_id}/passt.log'
    iface_attrs['backend']['logFile'] = log_file
    iface_attrs['source']['dev'] = host_iface
    direction = params.get('direction')
    ip_ver = params.get('ip_ver')
    vmxml = vm_xml.VMXML.new_from_inactive_dumpxml(vm_name,
                                                   virsh_instance=virsh_ins)
    bkxml = vmxml.copy()
    selinux_status = passt.ensure_selinux_enforcing()
    passt.check_socat_installed()
    firewalld = service.Factory.create_service("firewalld")
    try:
        if root:
            passt.make_log_dir(user_id, log_dir)
        passt.vm_add_iface(vmxml, iface_attrs, virsh_ins)
        vm.start()
        LOG.debug(virsh_ins.dumpxml(vm_name).stdout_text)
        session = vm.wait_for_serial_login(timeout=60)
        passt.check_default_gw(session)
        prot = 'TCP' if ip_ver == 'ipv4' else 'TCP6'
        if direction == 'host_to_vm':
            transfer_host_to_vm(session, prot, ip_ver, params, test)
        if direction == 'vm_to_host':
            transfer_vm_to_host(session, prot, ip_ver, vm_iface, firewalld,
                                params, test)
    finally:
        firewalld.start()
        vm.destroy()
        bkxml.sync(virsh_instance=virsh_ins)
        if root:
            shutil.rmtree(log_dir)
        else:
            del virsh_ins
        utils_selinux.set_status(selinux_status)