The perf.py module invokes the run_under.mutateCommandLine member function before mutating its own command line. In a recent refactoring r314239 "litsupport: Rework test module support" the run_test.mutateCommandLine was renamed with a leading _ to make it private. This means that when --use-perf=profile (or all) and --run-under are used simultaneously, as suggested for benchmarking in the lnt manual, we get the error:
test-suite/litsupport/modules/perf.py", line 32, in mutatePlan
    run_under.mutateCommandLine)
AttributeError: 'module' object has no attribute 'mutateCommandLine'For reference the mutatePlan function from perf.py is:
def mutatePlan(context, plan):
    script = context.parsed_runscript
    if context.config.run_under:
        script = testplan.mutateScript(context, script,
                                       run_under.mutateCommandLine)
    script = testplan.mutateScript(context, script, _mutateCommandLine)
    plan.profilescript += script
    plan.metric_collectors.append(
        lambda context: {'profile': context.tmpBase + '.perf_data'})The patch just renames the _mutateCommandLine in run_under.py as I don't think that it should be marked private if run_under.py is calling it.
I've not been able to find an easy way to write a regression test for this. The existing run_under tests in the lnt unit tests run using a fake lit so I couldn't write a failing test. I'm an almost complete novice with lnt development so I'd welcome any suggestions for how to write a unit test.