What kind of paperwork did you get with the truck? Have you inspected the VIN’s tags on the truck like the public vin on the dash, the federal sticker usually somewhere in the door jam? Do they all match to the seemingly legitimate paperwork? My concern is the truck has been stolen and what is known as a “vin switch” performed. That’s where the thief has legit paperwork say from a totaled out truck, and uses that to clone itself using a stolen one. Sometimes they forget to change the ecm which has the vin association with it as well.
So if the smog shop scanned the barcode on the dash to initiate the smog test, then hooked up the OBD2 port and the ecm told the smog machine a different story, then there is definitely something worth looking into.