# PP-239 and PP-659: Decorator to skip PTL tests on cpuset mom; Specifying default test case time out value while running PTL tests

**URL:** <https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430>\
**Category:** Developers\
**Created:** [February 3, 2017, 6:05am UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430 "2017-02-03T06:05:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![saritakh](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@saritakh](https://community.openpbs.org/u/saritakh)\
**Post date:** [February 3, 2017, 6:05am UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/1 "2017-02-03T06:05:26Z")

</div>

Hi @developers,

Please review a new design document created for two aspects of PTL framework:

- Ability to skip test execution on cpuset mom setup
- Ability to specify default test case timeout value at command line option for pbs\_benchpress while running PTL tests  
[https://pbspro.atlassian.net/wiki/pages/viewpage.action?pageId=50039997](https://pbspro.atlassian.net/wiki/pages/viewpage.action?pageId=50039997)  
Please do let me know of any comments or suggestions.

Thanks,  
Sarita

---

<div class="post-metadata">

**Author:** ![arungrover](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/arungrover/32/40_2.png) [@arungrover](https://community.openpbs.org/u/arungrover)\
**Post date:** [February 3, 2017, 5:12pm UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/2 "2017-02-03T17:12:20Z")

</div>

@saritakh

We have been seeing that there are bunch of custom decorators related to skipping the test on a specific platform or system.  
Instead of adding a bunch of them can’t we just have a generic decorator? something like “SkipOn” and we pass on values like “Cray”, “cpuset”, “non-cray” etc. to it.

This will save us from creating a bunch of decorators and essentially all these actually do the same thing, which is skip the test when certain condition is met.

My proposal is to make it generic rather than adding plenty of decorators.

---

<div class="post-metadata">

**Author:** ![iestockdale](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/iestockdale/32/72_2.png) [@iestockdale](https://community.openpbs.org/u/iestockdale)\
**Post date:** [February 3, 2017, 10:05pm UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/3 "2017-02-03T22:05:01Z")

</div>

Is a decorator the right approach? Is it possible for the operations that operate on or depend on the presence of a CPUset mom to autodetect the fact that the deployment is running a standard mom and return a useful error that the test can use to skip and exit gracefully?

---

<div class="post-metadata">

**Author:** ![arungrover](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/arungrover/32/40_2.png) [@arungrover](https://community.openpbs.org/u/arungrover)\
**Post date:** [February 3, 2017, 10:45pm UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/4 "2017-02-03T22:45:40Z")

</div>

I think it is best that the test writer mentions where he/she would want to skip the test.

It is possible that a test uses generic PBS interfaces and then does something (platform dependent) outside the scope of PBS to verify whether or not PBS behaved in the correct fashion. In these cases It is only the test writer who knows where to run this test.

---

<div class="post-metadata">

**Author:** ![agrawalravi90](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@agrawalravi90](https://community.openpbs.org/u/agrawalravi90)\
**Post date:** [February 20, 2017, 7:27am UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/5 "2017-02-20T07:27:59Z")

</div>

Hi Sarita, PFB some comments:

"Tests that insert new vnodes  
Tests that alter node resources (like ncpus, memory etc.)"  
I don’t know a lot about the restrictions on cpuset moms, so could you please clarify the following:

- Is it just the tests which insert new vnodes? What about the ones which delete vnodes? should they be skipped too?
- should we skip all test cases which alter ANY resource on a node? The ones that you mentioned are consumable resources, is it bad to alter even non-consumables on cpuset nodes?

“A new option added to pbs\_benchpress command to increase default test case time out value”: I’m guessing that the original motivation for adding this option was to be able to increase the default test case time out, but one can set this to a really small value as well right? So, I’d change ‘increase’ to just ‘change’ or ‘set’.

---

<div class="post-metadata">

**Author:** ![saritakh](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@saritakh](https://community.openpbs.org/u/saritakh)\
**Post date:** [February 27, 2017, 9:00am UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/6 "2017-02-27T09:00:05Z")

</div>

@arungrover @iestockdale  
We plan to enhance the test skip with a newer approach in future. So for this feature the current approach can be taken forward. We will revisit the same when we take up the new approach. A ticket PP-695 has been raised for the new approach:

PP-695: Enhanced approach to run or skip PTL tests based on various reasons

---

<div class="post-metadata">

**Author:** ![saritakh](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@saritakh](https://community.openpbs.org/u/saritakh)\
**Post date:** [February 27, 2017, 9:01am UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/7 "2017-02-27T09:01:46Z")

</div>

@agrawalravi90  
Regarding deleting vnodes when cpuset mom is run:

- Yes, the tests that delete vnode also need to be skipped; although I think its very rare that a test case deletes vnodes without creating them  
Regarding the tests that edit vnode resources or their values:
- PBS automatically examines the topology of the machine, and creates vnodes to represent subsets of the machine while running cpuset mom. Hence, it is not suggested to alter them. But custom resources can be edited on the vnodes.  
Regarding the update of “increase” to “change”/ “set”
- Agreed, I have updated the same in design document

---

<div class="post-metadata">

**Author:** ![arungrover](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/arungrover/32/40_2.png) [@arungrover](https://community.openpbs.org/u/arungrover)\
**Post date:** [February 27, 2017, 9:59pm UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/8 "2017-02-27T21:59:31Z")

</div>

@saritakh it works for me

---

<div class="post-metadata">

**Author:** ![hirenvadalia](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/hirenvadalia/32/19_2.png) [@hirenvadalia](https://community.openpbs.org/u/hirenvadalia)\
**Post date:** [March 13, 2017, 7:41am UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/9 "2017-03-13T07:41:25Z")

</div>

@saritakh Design looks good to me.

---

<div class="post-metadata">

**Author:** ![saritakh](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@saritakh](https://community.openpbs.org/u/saritakh)\
**Post date:** [March 23, 2017, 4:39am UTC](https://community.openpbs.org/t/pp-239-and-pp-659-decorator-to-skip-ptl-tests-on-cpuset-mom-specifying-default-test-case-time-out-value-while-running-ptl-tests/430/10 "2017-03-23T04:39:01Z")

</div>

@developers I have updated the design page with the specification that “default-testcase-timeout” is a parameter to option ‘-p’; which was missing previously. Please review and sign off or let me know of any comments.
