libvirt.tests: add testcases about hotplug serial for char device

[root@localhost virt-test]# ./run -t libvirt --no-downloads -k --keep-image-between-tests  --tests "type_specific.io-github-autotest-libvirt.hotplug_serial" 
SETUP: PASS (0.20 s)
DATA DIR: /var/lib/virt_test
DEBUG LOG: /root/osc/virt-test/logs/run-2014-12-18-17.32.56/debug.log
TESTS: 20
(1/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.file_dev.normal_test: PASS (13.32 s)
(2/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.file_dev.error_test.dup_charid: PASS (13.07 s)
(3/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.file_dev.error_test.dup_devid: PASS (13.30 s)
(4/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.file_dev.error_test.one_charid_two_devid: PASS (13.05 s)
(5/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.sock_dev.normal_test: PASS (13.53 s)
(6/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.sock_dev.error_test.dup_charid: PASS (13.14 s)
(7/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.sock_dev.error_test.dup_devid: PASS (13.05 s)
(8/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.sock_dev.error_test.one_charid_two_devid: PASS (13.05 s)
(9/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.pty_dev.normal_test: PASS (14.27 s)
(10/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.pty_dev.error_test.dup_charid: PASS (13.11 s)
(11/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.pty_dev.error_test.dup_devid: PASS (13.09 s)
(12/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.pty_dev.error_test.one_charid_two_devid: PASS (13.02 s)
(13/20) type_specific.io-github-autotest-libvirt.hotplug_serial.qmp.all_dev.normal_test: PASS (14.88 s)
(14/20) type_specific.io-github-autotest-libvirt.hotplug_serial.at_dt_device.file_dev.normal_test: PASS (13.28 s)
(15/20) type_specific.io-github-autotest-libvirt.hotplug_serial.at_dt_device.file_dev.error_test.dup_devid: PASS (13.06 s)
(16/20) type_specific.io-github-autotest-libvirt.hotplug_serial.at_dt_device.sock_dev.normal_test: PASS (13.50 s)
(17/20) type_specific.io-github-autotest-libvirt.hotplug_serial.at_dt_device.sock_dev.error_test.dup_devid: PASS (13.07 s)
(18/20) type_specific.io-github-autotest-libvirt.hotplug_serial.at_dt_device.pty_dev.normal_test: PASS (13.96 s)
(19/20) type_specific.io-github-autotest-libvirt.hotplug_serial.at_dt_device.pty_dev.error_test.dup_devid: PASS (13.06 s)
(20/20) type_specific.io-github-autotest-libvirt.hotplug_serial.at_dt_device.all_dev.normal_test: PASS (15.02 s)
TOTAL TIME: 268.87 s (04:28)
TESTS PASSED: 20
TESTS FAILED: 0
SUCCESS RATE: 100.00 %

you have created the `pty` part with xml module, so I think you can create `file` and `socket` with xml module too.