Python tests
Hi Coly,
I want to write some mdadm tests for assemblation and incremental regarding duplicated array names in config and I'd like to do it in python. I've seen that some time ago[1] you said that you could try to integrate the python tests framework into the mdadm ci. I was wondering how is it going? Do you need any help with this subject?
Thanks,
Lukasz
Quoted 11 lines
2022年8月24日 16:15,Lukasz Florczak <[email protected]> 写道:
Hi Coly,
I want to write some mdadm tests for assemblation and incremental regarding duplicated array names in config and I'd like to do it in python. I've seen that some time ago[1] you said that you could try to integrate the python tests framework into the mdadm ci. I was wondering how is it going? Do you need any help with this subject?
Quoted 4 lines
Thanks,
Lukasz
Hi Lukasz,
Now I just make some of the existed mdadm test scripts running, which are copied from upstream mdadm. There won’t be any conflict for the python testing code between you and me, because now I am just studying Python again and not do any useful thing yet.
As I said if no one works on the testing framework, I will do it, but it may take time. How about posting out the python code once you make it, then let’s put it into mdadm-test to test mdadm-CI, and improve whole things step by step.
Thanks.
Coly Li
Hi,
Quoted 14 lines · Coly Li
Quoted 14 lines
2022年8月24日 16:15,Lukasz Florczak <[email protected]> 写道:
Hi Coly,
I want to write some mdadm tests for assemblation and incremental regarding duplicated array names in config and I'd like to do it in python. I've seen that some time ago[1] you said that you could try to integrate the python tests framework into the mdadm ci. I was wondering how is it going? Do you need any help with this subject?Thanks,
Lukasz
Quoted 8 lines
Quoted 1 line
Hi Lukasz,
Now I just make some of the existed mdadm test scripts running, which are copied from upstream mdadm. There won’t be any conflict for the python testing code between you and me, because now I am just studying Python again and not do any useful thing yet.
As I said if no one works on the testing framework, I will do it, but it may take time. How about posting out the python code once you make it, then let’s put it into mdadm-test to test mdadm-CI, and improve whole things step by step.
I'm not sure if this is of use to anyone but we are very slowly growing a testing framework written mostly in python. Its focused on raid5 at the moment and still is a fairly sizable mess, but we've caught a lot of bugs with it and continue to run it, clean it up and make improvements.
https://github.com/Eideticom/raid5-tests/
The 'md.py 'file provides a nice interface to setup an array based on ram, loop or block devices and provides methods to degrade, recover or grow the array. 'test3' does grow/degrade tests while running IO, 'test_all' runs all the tests with an array of different settings.
Feel free to use anything from it that you may find useful.
Logan
Quoted 31 lines · Logan Gunthorpe
Hi,
Quoted 14 lines · Coly Li
Quoted 14 lines
2022年8月24日 16:15,Lukasz Florczak <[email protected]> 写道:
Hi Coly,
I want to write some mdadm tests for assemblation and incremental regarding duplicated array names in config and I'd like to do it in python. I've seen that some time ago[1] you said that you could try to integrate the python tests framework into the mdadm ci. I was wondering how is it going? Do you need any help with this subject?Thanks,
LukaszQuoted 8 lines
Quoted 1 line
Hi Lukasz,
Now I just make some of the existed mdadm test scripts running, which are copied from upstream mdadm. There won’t be any conflict for the python testing code between you and me, because now I am just studying Python again and not do any useful thing yet.
As I said if no one works on the testing framework, I will do it, but it may take time. How about posting out the python code once you make it, then let’s put it into mdadm-test to test mdadm-CI, and improve whole things step by step.
I'm not sure if this is of use to anyone but we are very slowly growing a testing framework written mostly in python. Its focused on raid5 at the moment and still is a fairly sizable mess, but we've caught a lot of bugs with it and continue to run it, clean it up and make improvements.
Quoted 9 lines
https://github.com/Eideticom/raid5-tests/
The '
md.py'file provides a nice interface to setup an array based on ram, loop or block devices and provides methods to degrade, recover or grow the array. 'test3' does grow/degrade tests while running IO, 'test_all' runs all the tests with an array of different settings.Feel free to use anything from it that you may find useful.
When developing 'md_monitor' (https://github.com/hreinecke/md_monitor) I've also created an extensive testsuite for it.
The one thing which I found particularly painful is error handling once mdadm fails. It's really hard to figure out _what_ went wrong, and more often than not mdadm simply locked up on me (try to stall I/O on one component device while md is running and you are in a world of pain).
That's when I started to split mdadm into a library, as then we could have a python binding and the life would so much more fun. So maybe I should resurrect that patchset.
Cheers,
Hannes
Signature · 5 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
Quoted 54 lines · On Thu, 25 Aug 2022 08:15:14 +0200 Hannes Reinecke <[email protected]> wrote:
Quoted 37 lines · Logan Gunthorpe
Hi,
Quoted 24 lines · Coly Li
Quoted 12 lines
2022年8月24日 16:15,Lukasz Florczak <[email protected]> 写道:
Hi Coly,
I want to write some mdadm tests for assemblation and incremental regarding duplicated array names in config and I'd like to do it in python. I've seen that some time ago[1] you said that you could try to integrate the python tests framework into the mdadm ci. I was wondering how is it going? Do you need any help with this subject?Quoted 4 lines
Thanks,
LukaszHi Lukasz,
Now I just make some of the existed mdadm test scripts running, which are copied from upstream mdadm. There won’t be any conflict for the python testing code between you and me, because now I am just studying Python again and not do any useful thing yet.
Quoted 4 lines
As I said if no one works on the testing framework, I will do it, but it may take time. How about posting out the python code once you make it, then let’s put it into mdadm-test to test mdadm-CI, and improve whole things step by step.
I'm not sure if this is of use to anyone but we are very slowly growing a testing framework written mostly in python. Its focused on raid5 at the moment and still is a fairly sizable mess, but we've caught a lot of bugs with it and continue to run it, clean it up and make improvements.
Quoted 9 lines
https://github.com/Eideticom/raid5-tests/
The '
md.py'file provides a nice interface to setup an array based on ram, loop or block devices and provides methods to degrade, recover or grow the array. 'test3' does grow/degrade tests while running IO, 'test_all' runs all the tests with an array of different settings.Feel free to use anything from it that you may find useful.
When developing '
md_monitor' (https://github.com/hreinecke/md_monitor)
I've also created an extensive testsuite for it.
The one thing which I found particularly painful is error handling once mdadm fails. It's really hard to figure out _what_ went wrong, and more often than not mdadm simply locked up on me (try to stall I/O on one component device while md is running and you are in a world of pain).
Quoted 4 lines
That's when I started to split mdadm into a library, as then we could have a python binding and the life would so much more fun. So maybe I should resurrect that patchset.
Hi Hannes,
Will be great if you can handle this. Beside library part you did huge code rearrangement and divides one big mdadm.h header into separate ones which is also great improvement. mdadm.h is still growing.
It is hard to do this separately, one by one due to cross references between files.
Thanks,
Mariusz
Quoted 73 lines · Mariusz Tkaczyk
Quoted 59 lines · On Thu, 25 Aug 2022 08:15:14 +0200 Hannes Reinecke <[email protected]> wrote:
Quoted 42 lines · Logan Gunthorpe
Hi,
Quoted 26 lines · Coly Li
Quoted 13 lines
2022年8月24日 16:15,Lukasz Florczak
<[email protected]> 写道:Hi Coly,
I want to write some mdadm tests for assemblation and incremental regarding duplicated array names in config and I'd like to do it in python. I've seen that some time ago[1] you said that you could try to integrate the python tests framework into the mdadm ci. I was wondering how is it going? Do you need any help with this subject?Quoted 4 lines
Thanks,
LukaszHi Lukasz,
Now I just make some of the existed mdadm test scripts running, which are copied from upstream mdadm. There won’t be any conflict for the python testing code between you and me, because now I am just studying Python again and not do any useful thing yet.
Quoted 4 lines
As I said if no one works on the testing framework, I will do it, but it may take time. How about posting out the python code once you make it, then let’s put it into mdadm-test to test mdadm-CI, and improve whole things step by step.
I'm not sure if this is of use to anyone but we are very slowly growing a testing framework written mostly in python. Its focused on raid5 at the moment and still is a fairly sizable mess, but we've caught a lot of bugs with it and continue to run it, clean it up and make improvements.
Quoted 8 lines
The '
md.py'file provides a nice interface to setup an array based on ram, loop or block devices and provides methods to degrade, recover or grow the array. 'test3' does grow/degrade tests while running IO, 'test_all' runs all the tests with an array of different settings.Feel free to use anything from it that you may find useful.
When developing '
md_monitor'
(https://github.com/hreinecke/md_monitor) I've also created an extensive testsuite for it. The one thing which I found particularly painful is error handling once mdadm fails. It's really hard to figure out _what_ went wrong, and more often than not mdadm simply locked up on me (try to stall I/O on one component device while md is running and you are in a world of pain).Quoted 4 lines
That's when I started to split mdadm into a library, as then we could have a python binding and the life would so much more fun. So maybe I should resurrect that patchset.
Hi Hannes,
Will be great if you can handle this. Beside library part you did huge code rearrangement and divides one big
mdadm.hheader into separate ones which is also great improvement.mdadm.his still growing.
Quoted 5 lines
It is hard to do this separately, one by one due to cross references between files.
Thanks,
Mariusz
Hi,
I'm writing with a little update. I was trying to work with python libraries pytest and ctypes. They look promising to me as with them you can load shared objects and create unit tests. Unfortunately I didn't manage to compile mdadm sources as library yet.
I don't think I can manage to work more on this topic anymore due to structural changes on my team at work, so this must be postponed from my side. Maybe one of my collegues will try to take this subject further in the near future.
Thanks,
Lukasz