WARNING: This is the _old_ Lustre wiki, and it is in the process of being retired. The information found here is all likely to be out of date. Please search the new wiki for more up to date information.

Testing Lustre Code: Difference between revisions

From Obsolete Lustre Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
Create test at beginning of development process – test often as you develop code
- Overview of testing framework (acceptance-small.sh, etc.)


We recommend a "test early, test often" approach to testing.


If you are developing a new feature for Lustre, designing tests to exercise the new feature early in the development process will allow you to test your code as you develop it.  
Start your work with the development of a test to reproduce the problem or test the new feature. This allows you to verify that the problem you are working to fix is the same one hit by the customer.
 
This will also allow you to verify that the change you make is actually fixing the problem.
You can add failure hooks with the OBD_FAIL_CHECK() or OBD_FAIL_TIMEOUT() hooks in Lustre if needed.  


For details, consult [[Testing Framework]].
If you are fixing a bug in Lustre, creating a regression test up front will ensure that you can reproduce the reported problem and then verify that it has been fixed. And it will save you the effort of testing the fix manually and then creating a separate regression test later to submit with your bug fix.


There is a script in lustre/tests called "acceptance-small.sh", which can automatically run a bunch of tests.  
''Note:'' You can use the OBD_FAIL_CHECK() or OBD_FAIL_TIMEOUT() hooks in Lustre to monitor failures.  


Make sure acceptance-small.sh passes on your workstation. It can be run directly from the lustre/tests directory and it is a good idea to run it often.
Before you submit code, it must pass the Lustre acceptance test suite called "acceptance-small". You can run it directly on your system from the lustre/tests directory. We recommend you run it often so that you can find out as soon as possible if your code is adding a regression.
 
This allows you to know as soon as possible if your code is adding a regression.  
''Note:'' Please set the "acc-sm passed" flag on the attachment for each individual branch that was tested in Bugzilla to indicate this. [[refer to submitting code topic]]
 
Writing regression tests early to reproduce a bug will allow you to confirm you are hitting the bug.
 
Having a specific regression test before fixing the bug will allow you to verify that the bug is actually fixed.  


This saves you the effort of testing a fix manually AND writing a regression test.
Your code must pass acceptance-small you commit it to CVS.


Please set the "acc-sm passed" flag on the attachment for each individual branch that was tested in Bugzilla to indicate this.


[[Acceptance_Small_(acc-sm)_Testing_on_Lustre]]  
[[Acceptance_Small_(acc-sm)_Testing_on_Lustre]]  


[[POSIX Testing]]
[[POSIX Testing]]

Revision as of 15:47, 29 August 2009

We recommend a "test early, test often" approach to testing.

If you are developing a new feature for Lustre, designing tests to exercise the new feature early in the development process will allow you to test your code as you develop it.

If you are fixing a bug in Lustre, creating a regression test up front will ensure that you can reproduce the reported problem and then verify that it has been fixed. And it will save you the effort of testing the fix manually and then creating a separate regression test later to submit with your bug fix.

Note: You can use the OBD_FAIL_CHECK() or OBD_FAIL_TIMEOUT() hooks in Lustre to monitor failures.

Before you submit code, it must pass the Lustre acceptance test suite called "acceptance-small". You can run it directly on your system from the lustre/tests directory. We recommend you run it often so that you can find out as soon as possible if your code is adding a regression.

Note: Please set the "acc-sm passed" flag on the attachment for each individual branch that was tested in Bugzilla to indicate this. refer to submitting code topic


Acceptance_Small_(acc-sm)_Testing_on_Lustre

POSIX Testing