Shouldn’t the car be warmed up enough and kept running before the smog test? With a head gasket failure it would probably fail the emissions but visual??
Barr’s head gasket sealer will work provided it is not a huge leak.
Obviously, you are on borrowed time but maybe a different tech could help.