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


Sunroof switch removal/installationMazda 6 Service Manual: Dtc c1145, c1155, c1165, c1175
Caution
When attaching the tester lead to the DSC HU/CM connector the SST
(49 G066 004) must be used.
Diagnostic procedure
...
Mazda 6 Service Manual: To Turn Off an Armed System
An armed system can be turned off using any one of the following methods:
Pressing the unlock button on the transmitter.
Starting the engine with the push button start.
(With the advanced keyless function)
Pressing a request switch on the doors.
The hazard warning lights will flash twic ...