PTL test suite name and log level questions


#1

I followed instructions in the PTL Quick Start Guide and ran

pbs_benchpress -t <TestsuiteName> -o ptl_output.txt

I tried TestFunctional for <TestSuiteName> since it was listed in pbs_benchpress -L output but it did not work. Functional and functional did not work either. How do I run all the functional tests?

Also all the error message

2017-08-29 11:20:19,681 ERROR    unknown testsuite(s): functional

went to the output file ptl_output.txt but was not in my shell output, where as all the INFO level messages appear in both. I had to open the output file to know what was wrong with my command. Is there a way to let all ERROR messages go to both and messages of all other levels go to the output file?

Thanks


#2

Hey Minghui,

Try using the “–follow-child” option:
pbs_benchpress -t TestFunctional --follow-child

I’ve added this info to the documentation: https://pbspro.atlassian.net/wiki/spaces/DG/pages/22642708/PTL+FAQs


#3

I was not aware of that behavior myself, @hirenvadalia and @kjakkali, do you guys know about this?


#4

Thank you, Ravi. I filed a bug yesterday as this is different from the documented behavior of pbs_benchpress.


#5

@minghui :

This looks like bug to me. Can you please log a issue for it?


#6

Hi @kjakkali. I just did : )
The bug is here: PP-951.


#7

Dear all,

I am also a beginner with PTL test, so when I run the sample testcase - SmokeTest. The error is:
setUpClassError: User pbsuser does not exist!

Therefore, I saw that PTLTestSuite impersonates some users for testing but when run this test, these user accounts do not exist. If so, do I need to create these accounts?

Please help me, thank you so much!


#8

@mr.ctminh : PTL needs specific users and groups.

Required users & groups are available

Users are advised to run "pbs_config --make-ug" to create the users and groups that PTL needs.
Run "pbs_config --check-ug" to verify that all the requisite users and groups are present.

https://pbspro.atlassian.net/wiki/spaces/DG/pages/13369353/PTL+Quick+Start+Guide#PTLQuickStartGuide-5.2Assumptions


#9

Thank you so much, kjakkali!
However, when I run: pbs_config --make-ug, I have an error like this:
ERROR:ptl.utils.pbs_dshutils:err: [‘id: +: no such user’]
Traceback (most recent call last):
File “/home/ctminh/pbs/pbspro/test/fw/build/bin/pbs_config”, line 4, in
import(‘pkg_resources’).run_script(‘PbsTestLab==1.0.0’, ‘pbs_config’)
File “/usr/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py”, line 517, in run_script
return dist
File “/usr/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py”, line 1436, in run_script

File “/home/ctminh/pbs/pbspro/test/fw/build/lib/python2.7/site-packages/PbsTestLab-1.0.0-py2.7.egg/EGG-INFO/scripts/pbs_config”, line 438, in
rv = make_users_groups()
File “/home/ctminh/pbs/pbspro/test/fw/build/lib/python2.7/site-packages/PbsTestLab-1.0.0-py2.7.egg/EGG-INFO/scripts/pbs_config”, line 226, in make_users_groups
_, _, g_create, u_create = common_users_groups_ops()
File “/home/ctminh/pbs/pbspro/test/fw/build/lib/python2.7/site-packages/PbsTestLab-1.0.0-py2.7.egg/EGG-INFO/scripts/pbs_config”, line 192, in common_users_groups_ops
gm_actual = du.group_memberships(map(lambda g: str(g), PBS_GROUPS))
File “/home/ctminh/pbs/pbspro/test/fw/build/lib/python2.7/site-packages/PbsTestLab-1.0.0-py2.7.egg/ptl/utils/pbs_dshutils.py”, line 621, in group_memberships
for g in info[‘groups’]:
TypeError: ‘NoneType’ object is not iterable

Do you know what happens? Please help me. With this error, maybe I have to create PBS users or groups by myself on Linux System. As you said, I think this command is to make all of users or groups that we need, and don’t need to create anything else.

Thank you so much kjakkali!