def METHOD_NAME(vm, name):
    addr = "18.0"
    # hotplug serial adapter
    pci_serial_add(vm, "test-serial", addr, name)
    session.cmd_status("sleep 1")
    session.cmd_status("udevadm settle")
    msg_add = session.cmd("dmesg -c | grep %s" % addr)
    for line in msg_add.splitlines():
        test.log.debug("[dmesg add] %s", line)
    lspci = session.cmd("lspci -vs %s" % addr)
    for line in lspci.splitlines():
        test.log.debug("[lspci] %s", line)
    # send message
    device = session.cmd("ls /sys/bus/pci/devices/*%s/tty" % addr)
    device = device.strip()
    test.log.info("guest tty device is '%s'", device)
    session.cmd("test -c /dev/%s" % device)
    session.cmd("echo 'Hello virttest world' > /dev/%s" % device)
    # unplug serial adapter
    device_del(vm, "test-serial")
    session.cmd_status("sleep 1")
    msg_del = session.cmd("dmesg -c")
    for line in msg_del.splitlines():
        test.log.debug("[dmesg del] %s", line)