No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
The test steps include:1)install device-mapper device-mapper-multipath 2)restart multipathd service 3)kpartx -l / 4)check dmesg if there is segmentation fault | The test steps include:1)install device-mapper device-mapper-multipath 2)restart multipathd service 3)kpartx -l / 4)check dmesg if there is segmentation fault | ||
|actions= | |actions= | ||
1. Ensure the device-mapper-multipath package is installed | |||
Execute:{{command|dnf -y install device-mapper device-mapper-multipath}} | Execute:{{command|dnf -y install device-mapper device-mapper-multipath}} | ||
Execute:{{command|rpm -qa | grep multipath}} | Execute:{{command|rpm -qa | grep multipath}} | ||
2. Execute the following command to generate the configuration file: | |||
Execute:{{command|mpathconf --enable}} | |||
3. Restart multipathd service | |||
Execute:{{command|service multipathd restart}} | Execute:{{command|service multipathd restart}} | ||
4. kpartx called with invalid options / | |||
4.kpartx called with invalid options / | Execute:kpartx -l / | ||
Execute:kpartx -l / | 5. sleep 1 second | ||
Execute:sleep 1 | |||
5.sleep 1 second | 6. check dmesg if there is segmentation fault | ||
Execute:sleep 1 | Execute:dmesg | grep segfault | ||
6.check dmesg if there is segmentation fault | |||
Execute:dmesg | grep segfault | |||
|results= | |results= | ||
# no Segmentation fault, kpartx no longer crashes when called with invalid options. | # no Segmentation fault, kpartx no longer crashes when called with invalid options. | ||
}} | }} | ||
[[Category:package_device-mapper-multipath_test_cases]] | [[Category:package_device-mapper-multipath_test_cases]] |
Revision as of 07:33, 29 October 2018
Description
This testcase checks whether kpartx will crash when called with invalid options. It is reported in fixed bug that when kpartx was passes something other than a file or a block device or a badly formed pathname, it could read off the end of the device string, and crash. The test steps include:1)install device-mapper device-mapper-multipath 2)restart multipathd service 3)kpartx -l / 4)check dmesg if there is segmentation fault
How to test
1. Ensure the device-mapper-multipath package is installed
Execute:dnf -y install device-mapper device-mapper-multipath
Execute:rpm -qa
2. Execute the following command to generate the configuration file:
Execute:mpathconf --enable
3. Restart multipathd service
Execute:service multipathd restart
4. kpartx called with invalid options /
Execute:kpartx -l /
5. sleep 1 second
Execute:sleep 1
6. check dmesg if there is segmentation fault
Execute:dmesg
Expected Results
- no Segmentation fault, kpartx no longer crashes when called with invalid options.