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

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?

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 1. API documentation — PbsTestLab 1.0.0 documentation

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?

Ok, I tried it myself and the answer it no. There doesn’t seem to be an option to change the max_attempts for log_match. I think we should just have one way of changing max_attempts for everything.