This paper describes two algorithms for generating test signals to efficiently test the linearity of ADCs. Linearity is an important testing item for ADCs, and it takes a long time (hence is costly) to test especially low-sampling-rate, high-resolution ADCs. We have proposed to generate a test signal consisting of multiple-sine waves, to precisely test the linearity for specific important codes (such as around the center of the output codes), using an arbitrary waveform generator (AWG) and an analog filter in our previous studies. Here, we formulate them for general use. Their verification is performed on a single sine wave, and good results are obtained to show the validity of the derivation algorithm.