trace: Improve the trace test number recognition