I got my DMV registration renewal in the mail and was going to take the vehicle to a smog check station. I always scan the codes via the OBD-II port first. One oxygen sensor was throwing a code, and there was one other code.
I thought I was in for a costly repair, then the VW scandal made me look at the warranty booklet. Emissions equipment is guaranteed for 15 years or 150K miles. Anything needed to pass a smog check is included. This is for California, YMMV.