A circuit-under-test can be regarded as a kind of available resource, not only a tested object, in self-feedback testing. By feedback connecting some of the interior nodes of a circuit-under-test to its input terminals, the circuit can generate and apply a test set serially after an initial vector being applied from the outside of the circuit. In this paper, the old grouping method and the feedback nodes assignments are improved. A depth priority algorithm with information matrixes for a common path in a number of directed graphs is presented. The experimental results on ISCAS85 benchmark circuits and MinTest test sets demonstrate that the proposed algorithm can reduce the extra area and improve the fault efficiency.