From Fedora Project Wiki

(Created page with "{{QA/Test_Case |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...")
 
No edit summary
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{header|qa}}
{{QA/Test_Case
{{QA/Test_Case
|description=This testcase checks whether kpartx will crash when called with invalid options.
|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.
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.
|actions=
|actions=
# Ensure the device-mapper-multipath package is installed
1.  Ensure the device-mapper-multipath package is installed
# Clone the multipath repository:
    Execute:  dnf -y install device-mapper device-mapper-multipath
   git clone https://github.com/skycastlelily/storage-fedora.git
    Execute: rpm -qa<nowiki>|</nowiki>grep multipath
# cd into the testcase directory
2. Execute the following command to generate the configuration file:
  cd storage-fedora/multipath/kpartx_crash
    Execute:  mpathconf --enable
# run the testcase
3. Restart multipathd service
  ./runtest.sh
    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 <nowiki>|</nowiki> grep segfault
|results=
|results=
# The testcase should pass without any error introduced.
# 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]]

Latest revision as of 00:57, 30 October 2018

QA.png


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.


How to test

1. Ensure the device-mapper-multipath package is installed

    Execute:  dnf -y install device-mapper device-mapper-multipath
    Execute:  rpm -qa|grep multipath

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 | grep segfault

Expected Results

  1. no Segmentation fault, kpartx no longer crashes when called with invalid options.