PURPOSE: To provide a program for testing of a magnetic disk device with the CPU of the magnetic disk device itself readily without the control from a control device.
CONSTITUTION: A data region 4 of a magnetic disk device is divided into system regions 5 for a block from 0 to M and a block from L to N and a user region 6 for a block from M to L. The region from the block from M to K in the user region 6 is secured as a test program region 7. The test program which is transferred from a control device, is written into the test program region 7. Thus, the test program is read with a CPU, which is provided in the magnetic disk device itself, and the test is executed even if the control device is separated from the magnetic disk device. After the end of the test, the test program is erased and the user region 6 is returned into the block from M to L.