1. Remove the sunroof switch.
2. Inspect for continuity between the sunroof switch terminals using an ohmmeter.


Sunroof switch removal/installationMazda 6 Service Manual: Operation
System triggering conditions
The horn sounds intermittently and the hazard warning lights flash for about
30 seconds when the system is triggered by any one of the following:
Unlocking a door with the key, door lock switch, or an inside door-lock
knob.
Forcing open a door, the hood or th ...
Mazda 6 Service Manual: Cruise control switch inspection
1. Disconnect the negative battery cable.
2. Remove the driver-side air bag module. (See DRIVER-SIDE AIR BAG MODULE
REMOVAL/INSTALLATION.)
3. Disconnect the cruise control switch connector.
4. Inspect for resistance and continuity between the cruise control switch
terminals using an ohmmeter. ...