If your car isn't running the factory software or a tune approved by the California Air Resources Board, you'll fail the test.
https://www.roadandtrack.com/news/a37022836/california-ecu-tune-during-smog-checks/
https://www.roadandtrack.com/news/a37022836/california-ecu-tune-during-smog-checks/