‘requirements()’ decorator in PTL is used to specify the PBS cluster configuration necessary to run a PTL test and during the test run this data is evaluated against the cluster data passed in custom parameters of pbs_benchpress. The current format of PBS cluster specification in the decorator specifies PBS daemon counts a and certain set of flags. This causes ambiguity in actual number of nodes needed by the test to run. Hence, this design is to reform the cluster data specification in order to have clear information of the PBS cluster needed to run the test.
Interface 1: ‘--hosts=<hostname>[m-n][:port][@<path to pbs conf>],<hostname>[k-l][:port][@<path to pbs conf>],<hostname>[m-n][:port][@<path to pbs conf>]’ Visibility: Public Change Control: Public Details:
This new option is introduced to specify the hostnames of the cluster to be passed to PTL instead of the current per daemon format. (moms=<host1:host2>,comms=<host3:host4>) In case where single hostname or no hostnames are passed, the local host where pbs_benchpress is being run is considered as single node PBS cluster host and all tests needing single daemon of each type will be executed on this host. Its value should be a comma separated list of hostnames or indexed host names range for greater number of hosts along with the non-default port number or non-default path of pbs.conf file. This non-default port number and non-default pbs.conf file path is same for all the hosts specified in the range. For example:
Interface 2: @requirements() decorator format - “host1=<string>, host2=<string>” Visibility: public Change Control: public Details: New form of requirements decorator uses below mentioned strings to specify the type of nodes the test case needs in order to run.
2 moms, 1 client & comm not running on server: 5 hosts @requirements(host1=”server, sched”, host2=”mom”, host3=”mom”, host4=”comm”, host5=”client”) pbs_benchpress --hosts=x1,x2,x3,x4,x5 Older version: @requirements(num_moms=2, num_clients=1, no_comm_on_server=True)
10 moms, 1 client & comm not running on server: 13 hosts @requirements(host1=”server, sched”, host2_11=”mom”, host12=”client”, host13=”comm”) pbs_benchpress --hosts=x[1-13] / pbs_benchpress --hosts=x1,x[2-11],x12,x13 / pbs_benchpress --hosts=x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13 Older version: @requirements(num_moms=10, num_clients=1, no_comm_on_server=True)
Interface 3: --get-required-hosts Visibility: Public Change Control: Public Details:
This option gives out the number of hosts necessary to execute the tests specified in pbs_benchpress. This also mentions the test cases that will run with the given cluster information. When none of the tests are specified PTL will give the information of all the tests in current tests directory. The test suite information option ‘-i' or '--gen-ts-tree’ will also give out the number of hosts needed by the given test suite or test case along with the test information.
Interface 4: run_test_as in requirements() decorator Visibility: Public Change Control: Public Details:
We now can specify with which user a PTL test needs to be specifically run as. For example, when a test suite should be run as ‘root’, below can be specified. By default all tests run as the test runner who triggers the pbs_benchpress. The test user must be users as specified in PTL like - ROOT_USER, ADMIN_USER, TEST_USER1 etc.