linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Python tests
@ 2022-08-24  8:15 Lukasz Florczak
  2022-08-24 16:23 ` Coly Li
  0 siblings, 1 reply; 6+ messages in thread
From: Lukasz Florczak @ 2022-08-24  8:15 UTC (permalink / raw)
  To: Coly Li; +Cc: Mariusz Tkaczyk, linux-raid

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

[1] https://marc.info/?l=linux-raid&m=165277539509464&w=2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Python tests
  2022-08-24  8:15 Python tests Lukasz Florczak
@ 2022-08-24 16:23 ` Coly Li
  2022-08-24 20:40   ` Logan Gunthorpe
  0 siblings, 1 reply; 6+ messages in thread
From: Coly Li @ 2022-08-24 16:23 UTC (permalink / raw)
  To: Lukasz Florczak; +Cc: Mariusz Tkaczyk, linux-raid



> 2022年8月24日 16:15,Lukasz Florczak <lukasz.florczak@linux.intel.com> 写道:
> 
> 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
> 
> [1] https://marc.info/?l=linux-raid&m=165277539509464&w=2

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Python tests
  2022-08-24 16:23 ` Coly Li
@ 2022-08-24 20:40   ` Logan Gunthorpe
  2022-08-25  6:15     ` Hannes Reinecke
  0 siblings, 1 reply; 6+ messages in thread
From: Logan Gunthorpe @ 2022-08-24 20:40 UTC (permalink / raw)
  To: Coly Li, Lukasz Florczak; +Cc: Mariusz Tkaczyk, linux-raid

Hi,

On 2022-08-24 10:23, Coly Li wrote:
> 
> 
>> 2022年8月24日 16:15,Lukasz Florczak <lukasz.florczak@linux.intel.com> 写道:
>>
>> 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
>>
>> [1] https://marc.info/?l=linux-raid&m=165277539509464&w=2
> 
> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Python tests
  2022-08-24 20:40   ` Logan Gunthorpe
@ 2022-08-25  6:15     ` Hannes Reinecke
  2022-08-26  8:12       ` Mariusz Tkaczyk
  0 siblings, 1 reply; 6+ messages in thread
From: Hannes Reinecke @ 2022-08-25  6:15 UTC (permalink / raw)
  To: Logan Gunthorpe, Coly Li, Lukasz Florczak; +Cc: Mariusz Tkaczyk, linux-raid

On 8/24/22 22:40, Logan Gunthorpe wrote:
> Hi,
> 
> On 2022-08-24 10:23, Coly Li wrote:
>>
>>
>>> 2022年8月24日 16:15,Lukasz Florczak <lukasz.florczak@linux.intel.com> 写道:
>>>
>>> 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
>>>
>>> [1] https://marc.info/?l=linux-raid&m=165277539509464&w=2
>>
>> 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.
> 
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
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Python tests
  2022-08-25  6:15     ` Hannes Reinecke
@ 2022-08-26  8:12       ` Mariusz Tkaczyk
  2022-09-26  8:19         ` Lukasz Florczak
  0 siblings, 1 reply; 6+ messages in thread
From: Mariusz Tkaczyk @ 2022-08-26  8:12 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Logan Gunthorpe, Coly Li, Lukasz Florczak, linux-raid

On Thu, 25 Aug 2022 08:15:14 +0200
Hannes Reinecke <hare@suse.de> wrote:

> On 8/24/22 22:40, Logan Gunthorpe wrote:
> > Hi,
> > 
> > On 2022-08-24 10:23, Coly Li wrote:  
> >>
> >>  
> >>> 2022年8月24日 16:15,Lukasz Florczak <lukasz.florczak@linux.intel.com>
> >>> 写道:
> >>>
> >>> 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
> >>>
> >>> [1] https://marc.info/?l=linux-raid&m=165277539509464&w=2  
> >>
> >> 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.
> >   
> 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.
> 
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Python tests
  2022-08-26  8:12       ` Mariusz Tkaczyk
@ 2022-09-26  8:19         ` Lukasz Florczak
  0 siblings, 0 replies; 6+ messages in thread
From: Lukasz Florczak @ 2022-09-26  8:19 UTC (permalink / raw)
  To: Mariusz Tkaczyk; +Cc: Logan Gunthorpe, Hannes Reinecke, Coly Li, linux-raid

On Fri, 26 Aug 2022 10:12:42 +0200, Mariusz Tkaczyk
<mariusz.tkaczyk@linux.intel.com> wrote:

> On Thu, 25 Aug 2022 08:15:14 +0200
> Hannes Reinecke <hare@suse.de> wrote:
> 
> > On 8/24/22 22:40, Logan Gunthorpe wrote:  
> > > Hi,
> > > 
> > > On 2022-08-24 10:23, Coly Li wrote:    
> > >>
> > >>    
> > >>> 2022年8月24日 16:15,Lukasz Florczak
> > >>> <lukasz.florczak@linux.intel.com> 写道:
> > >>>
> > >>> 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
> > >>>
> > >>> [1] https://marc.info/?l=linux-raid&m=165277539509464&w=2    
> > >>
> > >> 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.
> > >     
> > 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.
> >   
> 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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-26  8:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-24  8:15 Python tests Lukasz Florczak
2022-08-24 16:23 ` Coly Li
2022-08-24 20:40   ` Logan Gunthorpe
2022-08-25  6:15     ` Hannes Reinecke
2022-08-26  8:12       ` Mariusz Tkaczyk
2022-09-26  8:19         ` Lukasz Florczak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).