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.


Cargo compartment light inspection
Trunk compartment light bulb removal/installationMazda 6 Service Manual: Scheduled Maintenance (U.S.A., Canada, and Puerto Rico)
Follow Schedule 1 if the vehicle is operated mainly where none of the following
conditions (severe driving conditions) apply.
Repeated short-distance driving
Driving in dusty conditions
Driving with extended use of brakes
Driving in areas where salt or other corrosive materials are used
...
Mazda 6 Service Manual: Theft-deterrent control module inspection
1. Remove the theft-deterrent control module without disconnecting the
connectors.
2. Measure the voltage at the theft-deterrent control module terminals as
indicated below.
3. Disconnect the theft-deterrent control module connector before inspecting
for continuity at terminals L, Q, S, T, a ...