...before getting the safety inspection? I occasionally get a P0442 code (small evap leak), and it popped up yesterday, a day before I go in for a safety/emissions retest (failed because of brake wear, since rectified).

Hopefully its’s just the gas cap. If so, is there anything that can be done to make a better seal? Ages ago I thought I heard/read something about petroleum jelly on the seal to rejuvenate it and seal better.