from what I know the smog check 2 in california is for most counties, if you live in the more remote areas then smog check 2 hasn't gotten to you yet, but don't worry, the epa will find you soon!
on 1996 and newer cars the smog machine monitors readings via the obd port, IF you have a code in the computer, although the light is turned off, you failed. Of course if the light comes on during the test, you failed too. If the bulb is burned out, you failed.
I've always made sure to do a computer scan then delete anything in the computer before a smog, haven't had any issues with them telling me anything about erasing codes.
They usually let the machine make the determination.
for post 1995 cars, they inject nitrogen into the gas tank trying to force a fuel leak so they can fail you for that too.
I"m all for clean air, but the way they go about doing some of this stuff is ridiculous. Just another liberal who dreams up an idea and makes the epa implement it without thinking of issues or ramifications.
welcome to california.