autotest/virt-test — pull request #983 by chuanchang (2013-10-30 11:02:31+00:00)
Title: Add test cases for creating and destroying node device

The following are test scenarios, please help review, thanks.

Test create/destroy node device

1) Positive testing
1.1) create node device from XML file
1.2) destroy node device
2) Negative testing
2.1) create node device with noexist name of the parent HBA
2.2) create node device with offline port
2.3) create node device with invalid option
2.4) destroy noexist node device
2.5) destroy node device with invalid option
2.6) destroy node device without capable of vport operations

[root@localhost virt-test]# ./run -t libvirt --tests virsh.nodedev_create_destroy --no-downloads
SETUP: PASS (2.05 s)
DATA DIR: /var/lib/virt_test
DEBUG LOG: /home/ajia/Workspace/virt-test/logs/run-2013-10-30-18.59.46/debug.log
TESTS: 7
(1/7) virsh.nodedev_create_destroy.positive_testing.create_destroy_device: PASS (7.14 s)
(2/7) virsh.nodedev_create_destroy.negative_testing.create_node_device.noexist_parent_device: PASS (1.25 s)
(3/7) virsh.nodedev_create_destroy.negative_testing.create_node_device.offline_port: PASS (1.19 s)
(4/7) virsh.nodedev_create_destroy.negative_testing.create_node_device.invalid_option: PASS (1.25 s)
(5/7) virsh.nodedev_create_destroy.negative_testing.destroy_node_device.noexist_device: PASS (2.68 s)
(6/7) virsh.nodedev_create_destroy.negative_testing.destroy_node_device.invalid_option: PASS (2.69 s)
(7/7) virsh.nodedev_create_destroy.negative_testing.destroy_node_device.no_capable_of_vport_ops: PASS (1.54 s)
TOTAL TIME: 17.97 s
TESTS PASSED: 7
TESTS FAILED: 0
SUCCESS RATE: 0.00 %