1. Disconnect the negative battery cable.
2. Disconnect the brake switch connector harness.
3. Inspect for continuity between the brake switch connector terminals.


Brake pedal inspection
Brake pedal removal/installationMazda 6 Service Manual: Trunk Lid
WARNING
Never allow a person to ride in the trunk: Allowing a person to ride
in the trunk is dangerous. The person in the trunk could be seriously injured or
killed during sudden braking or a collision.
Do not drive with the trunk lid open: Exhaust gas in the cabin of a vehicle
is dangerous. ...
Mazda 6 Service Manual: Front/rear abs wheel-speed sensor inspection
Visual Inspection
Remove the wheel and tire, and inspect the sensor for looseness and damage.
Replace the sensor if necessary.
Clearance Inspection
Inspect the clearance between the wheel-speed sensor and the sensor rotor.
Clearance
0.3-1.1 mm {0.012-0.043 in}
Resistance Inspection
...