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


Sunroof switch removal/installationMazda 6 Service Manual: Cargo compartment light switch inspection
1. Remove the liftgate lower trim. (See LIFTGATE LOWER TRIM
REMOVAL/INSTALLATION)
2. Disconnect the cargo compartment light switch connector.
3. Inspect for continuity between the cargo compartment light switch
terminals using an ohmmeter.
If not as specified, replace the liftgate lock.
...
Mazda 6 Service Manual: Supplemental Restraint System Components
(With Front Passenger Occupant Classification System)
(Without Front Passenger Occupant Classification System)
Driver/Front passenger inflators and air bags
Roll-over sensor (some models), crash sensors, and diagnostic module (SAS
unit).
Seat belt pretensioners
Front air bag sensor ...