one thing I ALWAYS DO here in CA, is make sure the gas tank is 100 percent full of clean fresh gas, and only take my truck to get the smog test when the truck is fully warmed up- even when your favorite smog guy is right down the street- go take a 10 min drive down the freeway and back, and I DONT SHUT THE TRUCK OFF WHILE WAITING MY TURN TO GET SMOGGED. let it idle in the parking lot if need be - the smog tech can shut it off when they pull it in and put it on the dyno... make sure that motor is warm, and the CAT is hot!
I forgot to do this once - and the Owner of the shop came over and said "you failed" as he chuckled... started telling me about how clean it was running 2 years ago, and 2 years before that... and I only put 10-15 thousand miles on it... laugh laugh...
I thought he was joking- he was not. I had barely failed one of the parameters. he said "oh, don't worry... i see cars like this pass and fail in the same day- go change the oil, put fresh gas in the tank, and come back- we will test it again for free. I did all those things- passed the test like a BRAND NEW TRUCK. the technician was giving me funny looks, and later wanted to know what I had done to make such a huge difference. The truck had been sitting for a while. He didn't want to believe that the oil change and fresh gas could make such a drastic change, but it did.
My current K5 is a manual trans, and i have a few other things to worry about on a smog check. when the truck is on the dyno- the technician needs to hold the RPMS in a certain range, and also the wheel speed within a certain range for 30-40 seconds. they do a low speed, and then a high speed test. Problem I have is that with the 465 trans, and with the tires size/ gearing... there is quite a bit of overlap. They can do the low speed test in 2nd gear, but the RPS are towards the high end of the range they have to maintain... some of the guys want to shift into third, but then the RPMS are at the bottom end of the RPM range, while the wheel speed is similar to where it was before.
I worry that if they are lugging the motor, its going to fail the test somehow- always ask them to keep it in 2nd for the low speed, and then shift into 3rd for the high speed. NO actual problems with this so far, but I worry it could make a difference.