PTL: How do I change the default num_attempts for expect()?


#1

Hi,

I thought pbs_benchpress had an option to do this, but I don’t see any. By default, PTL’s expect() and log_match() functions do the check 60 times with a 1 second interval. Most, if not all, of the times that I see an issue with my PBS changes, it doesn’t take more than a few attempts (like 3 or 4) for me to know that there’s an issue, and then there are times when I’m iterating over my fix and run the test to verify whether it’s fixed, and again have to go through the 60 times. So, if there was an option to pbs_benchpress which would allow me to change max_attempts, it’d be great. Is there any such option today? What do you guys feel about adding such an option?


#2

Try this

PTL_EXPECT_MAX_ATTEMPTS=4 pbs_benchpress <your options>

For more info see this https://github.com/PBSPro/pbspro/blob/master/test/fw/ptl/lib/pbs_testlib.py#L221 and http://pbspro.org/ptldocs/ptl.html#ptl.lib.pbs_testlib.PtlConfig


#3

Thanks for the info Hiren, will this also work for log_match? Also, is there a document where all the PTL configuration options are listed?