Mallory gave the best advice...make sure the engine is fully warmed up. Find out when the smog test facility opens up for business. Drive around for a good while and get there just before they open. You want to be the first guy in line.
Mallory mentioned fresh plugs. Also consider the condition of the air filter. If it's dirty, your mixture will be richer...not good.
Some say that premium gas reads cleaner in these emissions tests. I do not know this to be true. Perhaps someone with some knowledge in this area will confirm/shoot down this idea.
Are your plug wires good?...rotor..distributor cap?
Then there's the O2 sensor and last, but not least the catalytic converter. If it's hosed, kiss it all good-bye.
I don't know what your timeline is, but it might not hurt to run a tankful of Techron or BG-44K thru before you return for round 2. I saw some snake oil at Pep Boys awhile back(don't recall the name), but it clearly indicated it was for helping you pass an emissions test....somebody elses version of Techron.
1991 300-SEL - Model 126
M103 - SOHC
James Madison - Oppressors can tyrannize only when they achieve a standing army, an enslaved press, and a disarmed populace.
Liberty Firearms Training - After years of trying to regulate California criminals with a never ending stream of gun control laws they have still not given up with the belief that if they make something a crime that criminals will miraculously start obeying the law.