Depends on the airline's procedures, local aviation regulators regulations and the nature of the problem.
Agree completely, but I doubt any company would be in their right mind to allow pax onboard for a power assurance run. All it takes is something as simple as a stall at power and the aircraft jumps chocks swinging around. There are many things that could go wrong. The lawers would have a hayday with the company.