JP3838998B2 - Automatic test program generation system - Google Patents

Automatic test program generation system Download PDF

Info

Publication number
JP3838998B2
JP3838998B2 JP2003176621A JP2003176621A JP3838998B2 JP 3838998 B2 JP3838998 B2 JP 3838998B2 JP 2003176621 A JP2003176621 A JP 2003176621A JP 2003176621 A JP2003176621 A JP 2003176621A JP 3838998 B2 JP3838998 B2 JP 3838998B2
Authority
JP
Japan
Prior art keywords
instruction
setting
test
program
control unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003176621A
Other languages
Japanese (ja)
Other versions
JP2003330752A (en
Inventor
裕信 大浦
寛 後藤
亮太郎 林
信輔 寺西
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003176621A priority Critical patent/JP3838998B2/en
Publication of JP2003330752A publication Critical patent/JP2003330752A/en
Application granted granted Critical
Publication of JP3838998B2 publication Critical patent/JP3838998B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【産業上の利用分野】
本発明は、情報処理装置を試験するシステムに関し、特にテストプログラムを自動的に生成するテストプログラム自動生成システムに関するものである。
【0002】
【従来の技術】
従来のテストプログラム自動生成システムにおいては、次のようにしてテストプログラムを自動生成していた。
(1)機能指定によるテスト生成
テストプログラムの自動生成においては、レジスタ干渉試験、オペランド干渉試験、例外事象試験等の試験の対象となる機能毎にテストプログラムを生成している。
【0003】
上記のような機能毎のテストプログラムを生成するに際し、従来のテストプログラム自動生成システムでは、被試験対象の機能毎の生成手段を独立した制御プログラム単位に分割し、被試験対象の命令もロード命令、ストア命令、分岐命令、演算命令等の命令タイプ(命令形式)別に分けて制御することなく、1つの出現頻度の設定テーブルで制御していた。
【0004】
図16は、従来の独立した制御プログラム単位の1例として、試験機能指定によるのテストプログラムの自動生成を説明する図である。
同図において、11は画面制御部、13は画面情報ファイル、15は初期設定部、18は命令生成機構部、22はテスト命令列、24は実行制御部をそれぞれ示している。
【0005】
キーボード、ディスプレイ等から構成される画面制御部11から試験機能Aの人手操作12により、機能Aについて任意に設定された情報を画面情報ファイル13の試験機能A指定値14に格納する。
初期設定部15は、乱数発生器16、出現頻度操作部17から構成されており、出現頻度操作部17は、試験機能A指定値14に基づき、出現頻度設定部19に記述されている命令の出現頻度を変更する。
【0006】
命令生成機構部18は、命令を格納した命令生成テーブル20、生成命令設定部21から構成されている。そして、乱数発生器16からの乱数値と出現頻度設定部19の内容に基づいて命令生成テーブル20から命令を生成し、生成命令設定部21により、テスト命令列22を設定する。
実行制御部24は、生成命令組込み制御部25、生成命令の実行制御部26、ソフトシミュレータ27、正解情報の収集・組込み制御部28、テストプログラム域29から構成されている。
【0007】
生成命令組込み制御部25は、テスト命令列22をテストプログラム域29に組み込み、テストプログラム域29のテスト命令列はソフトシミュレータ27を用いて生成命令の実行制御部26により実行される。そして、実行した結果を、正解情報の収集・組込み制御部28により正解情報としてテストプログラム域29に組み込む。
(2)試験項目単位の命令生成
従来のテストプログラム自動生成システムでは、被試験対象の機能ごとに命令生成手段が変更になる場合は、制御プログラム単位に分割し、生成手段を独立した構成とし、特殊な制御処理に対応していた。
(3)プログラム名の設定
従来のテストプログラム自動生成システムでは、任意に指定されたプログラム番号をプログラム名としていた。また、複数本のテストプログラム名(番号で指定)を指定する場合には、任意に指定されたプログラム番号から順番に設定していた。
【0008】
図17は、従来のプログラム名の設定を説明する図である。同図において、31は画面制御部、35は画面情報ファイル、40は試験項目制御部、41は出現頻度制御部、43は命令生成制御部、44はテスト命令列、52は番号制御部、45は実行制御部をそれぞれ示している。
画面制御部31の試験機能Aの人手操作32により任意に設定された情報を画面情報ファイル35の試験機能A指定値36に格納する。
【0009】
更にテストプログラム本数の人手操作33、テストプログラム名の人手操作34により、画面情報ファイル35にテストプログラム本数37、テストプログラム名38(例えば、テストプログラム番号の上位3桁)を設定する。
番号制御部52は、末尾カウンタ53、レジスタ54、プログラム番号設定部55、次生成繰返し制御部56、から構成されている。
【0010】
テストプログラム名38をレジスタ54に設定し、テストプログラム本数37を末尾カウンタ53に設定することにより、第1番目のテストプログラムをレジスタ54に設定する。
また、試験項目制御部40、出現頻度制御部41、命令生成制御部43によりテスト命令列44を生成し、実行制御部45により生成された1テストプログラム50に対し、レジスタ54に設定されているテストプログラム名をプログラム番号設定部55により付与する。
【0011】
次生成繰返し制御部56では、末尾カウンタ53がゼロになるまで、命令生成制御部43からの、テストプログラムの生成を繰り返す。
これにより、例えば、人手により設定された上位3桁と、プログラム本数に応じて定まる下位3桁の番号を持つプログラム名が設定される。
(4)初期値(シード値)の設定
従来のテストプログラム自動生成システムでは、シード値は自動的に設定していた。図18は、従来の初期値(シード値)の設定を説明する図である。
【0012】
同図において、60はタイマー、61は画面情報ファイル、63は疑似乱数発生器、64は試験項目制御部、65は出現頻度制御部、67は命令生成制御部、70はテスト命令列、77は実行制御部をそれぞれ示している。
タイマー60から得られたデータを初期値(シード値)62として設定し、疑似乱数発生器63の初期値として使用する。
【0013】
疑似乱数発生器63の乱数値に基づき、試験項目制御部64、出現頻度制御部65、命令生成制御部67によってテスト命令列70を求め、求められたテスト命令列70を実行制御部75により実行し、テストプログラムを生成する。
(5)命令IDに基づくプログラム生成
従来のテストプログラム自動生成システムでは、▲1▼命令IDの設定、▲2▼被試験命令数、▲3▼被試験対象プログラム構成の設定、▲4▼アクセス命令のオペランド設定、▲5▼分岐命令のオペランド設定、▲6▼オペランドの範囲設定、▲7▼実行結果(正解情報)の格納、▲8▼チェック・ポイント用命令の設定、▲9▼初期設定を次のように行っていた。
▲1▼命令IDの設定
命令IDはロード、ストア等の各命令に1対1に対応して付与された番号(例えば、00,01,02…等)であり、出現頻度制御部は命令IDを出力し、命令生成テーブルでオペランド部を付加し、命令IDに対応した命令が出力される。
【0014】
上記被試験命令を生成するための命令IDは、常にランダム・データ発生器からランダム・データを求めて設定していた。
▲2▼被試験命令数
被試験命令数は、設定する領域が固定であるため、固定域の範囲に設定できる被試験命令を対象としていた。
▲3▼被試験対象プログラム構成の設定
テストプログラム域における初期処理部、割込みテーブル、アドレス空間テーブルの先頭アドレスは、固定の領域を設定して使用していた。また、アクセス域、命令生成域、生成された命令列のシミュレータによる実行結果(以下、正解情報という)格納域の先頭アドレスと領域範囲も固定の領域で使用していた。
▲4▼アクセス命令のオペランド設定
アクセス・データ域を固定に設定しているため、その先頭アドレスと領域範囲に基づいて、アクセス命令を生成していた。
▲5▼分岐命令のオペランド設定
分岐するためのオペランド(論理アドレス)は、アドレス空間テーブルに基づく値から算出した分岐範囲に基づいて、分岐命令を生成していた。
▲6▼オペランドの範囲設定
アクセス命令や分岐命令のオペランド範囲はすべてランダムに設定していた。▲7▼正解情報(実行結果)の格納
生成された命令列の正解情報(実行結果)の格納は、指定されている固定の格納域に各種の正解情報(実行結果)を格納していた。
▲8▼チェック・ポイント用命令の設定
割り込みを発生する命令(例えば、SVC等)等のチェック・ポイント用命令の設定個数は、固定の値で設定されていた。また、設定個数は、固定の被試験命令域の大きさにより決定されていた。
▲9▼初期設定部
従来のテストプログラム生成システムにおいては、1つの初期設定部ですべての被試験対象の機能についての制御を行っていた。
【0015】
図19は、命令IDに基づくプログラム生成を説明する図である。
同図において、81は疑似乱数発生器、82は出現頻度制御部、86は命令生成制御部、89はテスト命令列、98は実行制御部をそれぞれ示している。
出現頻度制御部82は、試験11〜nn専用出現頻度テーブル83、判定部84、試験項目11〜nn制御部85から構成されている。
【0016】
疑似乱数発生器81からの乱数値と、試験項目11〜nn制御部85の設定指示とを判定部84で判断し、試験11〜nn専用出現頻度テーブル83から試験項目11〜nnに応じた生成対象となる命令IDを取り出す。
命令生成制御部86は、命令生成テーブル87、生成命令設定部88、チェック・ポイント制御部96、生成命令数カウンタ97から構成されている。
【0017】
生成対象の命令IDに基づいて、疑似乱数発生器81からの乱数値と命令生成テーブル87から被試験命令を生成し、生成命令設定部88によりテスト命令列89に設定する。
生成命令設定部88では、チェック・ポイント制御部96により、被試験命令列間にチェック・ポイント命令の挿入と、固定値が設定されている生成命令数カウンタ97により、最大値までの被試験命令を生成する。
【0018】
命令生成テーブル87は、テストプログラム域95の固定番地Eに定めるアクセス・データ域の範囲のみにアクセスするように設定されている。
実行制御部98は、生成命令組込み制御部91、生成命令実行制御部92、ソフトシミュレータ93、正解情報の収集・組込み制御部94から構成されている。
【0019】
テスト命令列89の被試験命令1〜nを生成命令組込み制御部91により、テストプログラム域95の固定番地Fに設定する。
テストプログラム域95の初期処理部、割込みテーブル、アドレス変換テーブルは、所定の定められた番地に設定されている。
テストプログラム域95の正解域には、生成命令実行制御部92とソフトシミュレータ93により実行された結果が、正解情報の収集・組込み制御部94により固形番地Dに設定される。
(6)指定操作
従来のテストプログラム自動生成システムでは、指定操作は、生成画面のみで操作していた。すなわち、図17に示したように画面制御部31により人手操作により指定すると、画面情報ファイルに指定値が設定され、指定値に基づいてテスト生成を行っていた。
【0020】
【発明が解決しようとする課題】
以上のように、従来のテストプログラム自動生成システムでは、次のような問題をもっていた。
(1)被試験対象の命令を命令タイプ別に分けて制御することなく、出現頻度の設定テーブルも1つで制御していたため命令タイプの指定ができなかった。
(2)被試験対象の機能ごとに生成手段が違うため機能ごと分割した構成となり、制御が複雑、規模が大きくなった。
(3)テストプログラム名は、任意に指定されたプログラム番号をプログラム名とし、複数本の指定の場合には、任意に指定されたプログラム番号から順番に設定していたため、テストプログラム名を自己管理する必要があり煩雑であった。
(4)テストプログラムを生成するための初期データであるシード値は、ランダムな値で自動的に設定していたため、再生成するのが困難であった。
(5)被試験の命令数は、指定の命令域(固定)に設定できる命令数を対象としていたため、テストプログラム実行時間への対応(長くしたり短くしたり)が容易にできなかった。
(6)被試験命令を生成するための命令IDは、常に疑似乱数発生器から、ランダム・データを求めて設定していたため、意図した命令IDの設定が困難であった。
(7)被試験対象プログラムの共通制御部の構成として、初期処理部、割込みテーブル、アドレス空間テーブルの先頭アドレスが、固定の領域を設定して使用しているため、被試験条件により各処理部を移動したい場合には、共通制御部に変更が必要となった。
(8)アクセス域、命令生成域、正解情報(実行結果)格納域の先頭アドレスと領域範囲が固定であるため、テストプログラム実行時間への対応(長くしたり短くしたり)が容易にでず、大小のテストプログラム生成が必要な場合にも生成が困難である欠点があッた。
(9)アクセス命令のオペランドアドレスは、アクセス域を固定に設定しているため、その先頭アドレスと領域範囲に基づいたアクセス命令の生成しかできなかった。また、分岐するためのオペランド(論理アドレス)は、アドレス空間テーブルに基づく値から算出した分岐範囲に基づいた分岐命令の生成しかできなかった。さらに、アクセス命令や分岐命令のオペランド範囲をすべてランダムに設定すると、被試験命令の実行時、TLB(アドレス変換バッファ)に対するヒット率が非常に悪くなるといった欠点があった。
(10)被試験命令の正解情報(実行結果)の格納は、指定された固定の格納域に各種の正解情報(実行結果)を格納しているため、特殊な実行結果域がオーバーするなどの欠点があった。
(11)チェック・ポイント用命令の設定個数は、固定の値で設定され、固定の被試験命令域の大きさにより決定されているため、チェック・ポイント用命令の設定を容易に変更することができなかった。
(12)被試験対象のテストプログラムは、1つの初期設定部ですべての被試験対象の機能についての制御を行っているため、被試験機能の機能追加等により、初期設定部が膨大になる傾向の欠点があった。
(13)指定操作は、生成画面のみで操作しており、複数の生成画面にした場合には、すべての設定操作が必要となり、操作が複雑化し困難となると言った問題を生じていた。
【0021】
本発明は上記した従来技術の欠点を改善するためになされたものであって、本発明の第1の目的は、テストプログラム域における初期処理部、割込みテーブル、アドレス空間テーブルの先頭アドレスと、アクセス域、命令生成域、正解情報(実行結果)格納域の先頭アドレスと領域範囲の変更が容易で、テストプログラム実行時間への対応(長くしたり短くしたり)が可能なテストプログラム自動生成システムを提供することにある。
【0022】
本発明の第2の目的は、アクセス命令のオペランドアドレスや分岐するためのオペランド(論理アドレス)アドレスに対応した命令の生成を可能とし、被試験命令の実行時、TLB(アドレス変換バッファ)に対するヒット率の向上を図ったテストプログラム自動生成システムを提供することにある。
本発明の第3の目的は、被試験命令の正解情報(実行結果)の格納において、特殊な正解情報格納域がオーバーすることのないテストプログラム自動生成システムを提供することにある。
【0023】
本発明の第4の目的は、被試験命令内のチェック・ポイント用命令の設定個数に対して、設定が容易に変更可能なテストプログラム自動生成システムを提供することにある。
本発明の第5の目的は、被試験機能の機能追加等により、初期設定部の機能が膨大になっても機能ごとに対応可能なテストプログラム自動生成システムを提供
【0024】
【課題を解決するための手段】
図1〜図3は本発明の原理図であり、図1は本発明において被試験対象を命令タイプ、 機能に分けて制御することを可能としたテストプログラム自動生成システムの概略構成を示し、図2は本発明の請求項1〜請求項8の構成を示し、図3は、指定操作の生成画面が複数であっても操作が複雑化しないテストプログラム自動生成システムの概略構成を示している。
図1〜図3において、1は操作手段6で指定される試験機能と命令タイプを結合し出現頻度を選定するための出力を発生する結合制御手段、2は被試験対象を試験する命令の出現頻度を設定する出現頻度設定手段、3は被試験対象の命令を生成する命令生成手段、4は命令生成手段3により生成された被試験命令列を実行させ、正解情報を被試験対象プログラムに組込む命令実行/実行結果組込み手段、5は生成されたテストプログラムである。
【0025】
図1において、以下のようにテストプログラムを自動生成する。
(1)図1に示すように、被試験対象の機能を指定する機能指定手段と、被試験対象の命令タイプを指定する命令タイプ指定手段と、指定された機能と指定された命令タイプとを結合する結合制御手段と、上記制御手段の出力に基づき、上記指定された命令タイプの命令を選択できるように命令の出現頻度を設定する出現頻度設定手段と、被試験対象の機能ごとに、オペランドの値、レジスタ番号の値を特定の値に設定する特化制御手段と、上記出現頻度設定手段により設定された命令と、上記特化制御手段により選定されたオペランドの値、レジスタ番号の値に基づき、被試験対象の命令を生成する命令生成手段と、上記命令生成手段により生成された被試験命令列を実行させ、正解情報を被試験対象プログラムに組込む命令実行/実行結果組込み手段とを設け、被試験対象の試験を行うテストプログラムを自動的に生成する。
【0026】
(2)図1に示すように、被試験対象の機能に対応して付与される番号と、命令タイプに対応して付与される番号とに基づき、被試験対象プログラムにプログラム名を付与するプログラム名設定手段と、指令された上記機能と命令タイプに基づき、被試験対象の命令を生成する命令生成手段と、上記生成手段により生成された被試験命令列を実行させ、正解情報を被試験対象プログラムに組込む命令実行/実行結果組込み手段とを設け、被試験対象の試験を行うテストプログラムを自動的に生成する。
【0027】
(3)図1に示すように、生成する被試験対象プログラムの本数を設定するプログラム本数設定手段と、上記設定された本数に応じて各被試験対象プログラムに被試験対象プログラム番号を自動的に設定するプログラム名設定手段を設ける。
(4)図1に示すように、テストプログラムを自動的に生成するシステムにおいて、初期値を自動的に設定する自動設定手段と、初期値を任意値に設定する人手操作指示手段と、上記自動設定手段と人手操作指示手段の出力を切り替える切替え手段と、上記指定された機能と指定された命令タイプと、上記切り替え手段が出力する初期値に基づき、被試験対象の命令を生成する命令生成手段と、該命令生成手段により生成された被試験命令列を実行させ、正解情報を被試験対象プログラムに組込む命令実行/実行結果組込み手段とを設け、被試験対象の試験を行うテストプログラムを自動的に生成する。
【0028】
(5)図1に示すように、被試験対象の命令に対応して定められた命令IDをランダムな値に設定する第1の命令ID設定手段と、上記命令IDを定められた指定値に設定する第2の命令ID設定手段と、上記第1、第2の設定手段の出力を切り替える切替え手段と、上記指定された機能と指定された命令タイプと、上記切り替え手段が出力する命令IDから被試験対象の命令を生成する命令生成手段と、上記生成手段により生成された被試験命令列を実行させ、正解情報を被試験対象プログラムに組込む命令実行/実行結果組込み手段とを設け、被試験対象の試験を行うテストプログラムを自動的に生成する。
【0029】
(6)図1に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象命令の命令数を指定する命令数設定手段と、上記指定された機能と指定された命令タイプと、上記指定された命令数に基づき、被試験対象の命令を生成する命令生成手段と、該命令生成手段により生成された被試験命令列を実行させ、正解情報を被試験対象プログラムに組込む命令実行/実行結果組込み手段とを設け、被試験対象の試験を行うテストプログラムを自動的に生成する。
【0030】
図2は本発明の原理図であり、本発明の請求項1の発明は、図2に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象プログラムの初期処理部の先頭番地を任意に設定する第1の設定手段と、割込みテーブルの先頭番地を任意に設定する第2の設定手段と、アドレス空間テーブルの先頭を任意に設定する第3の設定手段と、 アドレス空間テーブルの先頭番地を任意に設定する第3の設定手段と、指定された機能と指定された命令タイプとを結合する結合制御手段と、上記結合制御手段の出力に基づき、上記指定された命令タイプの命令を選択できるように命令の出現頻度を設定する出現頻度設定手段とを備え、上記出現頻度設定手段により設定された命令と、命令に対応したオペランドの値、レジスタ番号の値と、上記第1、第2、第3の設定手段の指定に従い、被試験対象の命令を生成する命令生成手段と、上記命令生成手段により生成された被試験命令列をソフトシミュレータに実行させ、実行した結果を正解情報として被試験対象プログラムに組込むとともに、上記第1、第2、第3の設定手段の指定に従って初期処理部、テーブル等を、被試験対象プログラムに組み込む命令実行/実行結果組込み制御手段とを設け、被試験対象の試験を行うテストプログラムを自動的に生成する。
【0031】
本発明の請求項2の発明は、図2に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象プログラムのアクセス・データ域の先頭番地を設定する第1の設定手段と、アクセス・データ域の範囲を設定する第2の設定手段と、命令生成域の先頭番地を設定する第3の設定手段と、命令生成域の範囲を設定する第4の設定手段と、正解情報格納域の先頭番地を設定する第5の設定手段と、正解情報格納域の範囲を設定する第6の設定手段とを備え前記命令生成手段は、上記第1、第2、第3、第4、第5、第6の設定手段の設定位置に従い、被試験対象の命令を生成し、前記命令実行/実行結果組込み制御手段は、命令および前記正解情報等を、上記第1、第2、第3、第4、第5、第6の設定手段の設定位置に従って被試験対象プログラムに組込む。
【0032】
本発明の請求項3の発明は、図2に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象プログラムのアクセスデータ域を任意に設定する第1の設定手段と、被試験対象のアクセス命令に対するアクセス範囲を設定する第2の設定手段を設け前記命令生成手段は、上記第1、第2の設定手段による指定の範囲で上記指定された機能と指定された命令タイプに基づき、被試験対象のアクセス命令を生成する。
【0033】
本発明の請求項4の発明は、図2に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象命令の分岐命令に対する分岐範囲を指定する分岐範囲指定手段を備え前記命令生成手段は、該記分岐範囲指定手段による指定の分岐範囲で上記指定された機能と指定された命令タイプに基づき、被試験対象の分岐命令を生成する。
【0034】
本発明の請求項5発明は、図2に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象プログラムのアクセスデータ域を任意に設定する第1の設定手段と、被試験対象のアクセス命令に対するアクセス範囲を指定する第2の設定手段と、被試験対象命令の分岐命令に対する分岐範囲を指定する第3の設定手段と、生成される被試験対象の命令に対し範囲指定をランダムな値に設定する第4の設定手段と、範囲指定を固定の値に設定する第5の設定手段と、該第4、第5の設定手段の切替え手段とを備え、前記命令生成手段は、上記第1、第2、第3の設定手段による指定の範囲で、被試験対象のアクセス/分岐命令を生成し、上記切り替え手段により上記第4、第5の設定手段を切り替え、命令のアクセス範囲/分岐範囲をランダムもしくは固定の範囲とする。
【0035】
本発明の請求項6の発明は、図2に示すように、テストプログラムを自動的に生成するシステムにおいて、実行した結果を得られた正解情報の大きさに従って、被試験対象プログラムに組み込む設定位置を自動的に変化させる制御手段を有する。
【0036】
本発明の請求項7の発明は、図2に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象の命令列に挿入するチェック・ポイント用命令の数値を設定する設定手段と、上記チェック・ポイント数と被試験命令数から、チェック・ポイント用命令の設定箇所を得る設定箇所取得手段とを備え、前記命令生成手段は、上記指定された機能と指定された命令タイプと、上記設定箇所取得手段により得られたチェック・ポイント用命令の設定箇所に基づき、被試験対象の命令を生成する。
【0037】
本発明の請求項8の発明は、図2に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象の各機能毎に被試験対象プログラムの初期処理部を設定し格納する設定制御手段を備え、前記命令実行/実行結果組込み制御手段は、前記機能指定手段により指定された被試験対象の機能に応じて設定制御手段により格納された初期制御部を自動的に読み出し被試験対象プログラムに組み込む。
【0038】
また、図3に示すように、テストプログラムを自動的に生成するシステムにおいて、被試験対象の機能を指定する機能指定手段と、被試験対象の命令タイプを指定する命令タイプ指定手段と、上記機能と、命令タイプを指定する第1の指定操作と、被試験対象プログラムの構成を指定する第2の指定操作とを表示する画面制御部と、上記第2の指定操作による指定形式を格納する格納手段と、上記第1の指定操作により指定された機能と命令タイプに基づき、上記格納手段から第2の指定操作による指定形式を読み出す呼び出し設定制御手段と、上記指定された機能と指定された命令タイプと、上記格納手段から読み出された指定形式に基づき、被試験対象の命令を生成する命令生成手段と、該命令生成手段により生成された被試験命令列を実行させ、正解情報を被試験対象プログラムに組込む命令実行/実行結果組込み手段とを設け、被試験対象の試験を行うテストプログラムを自動的に生成することもできる。
【0039】
【作用】
図1〜図3において、次のようにしてテストプログラムを生成する。
▲1▼ 図1において、結合制御手段1は操作手段6により指定される被試験対象の機能と、命令タイプを結合して、出現頻度を選定するための出力を出現頻度設定手段2に与える。出現頻度設定手段2は、上記機能と命令タイプに基づき、テストプログラムにおける命令の出現頻度を設定し命令生成手段3に与える。
【0040】
命令生成手段3は操作手段6から与えられる命令数、初期値、命令IDの設定等に基づき、被試験対象を試験するための命令を生成する。なお、上記初期値、命令IDの設定は、切り替え手段6a,6bによりそれぞれ自動/任意値、ランダム値/指定値に切り替えることができる。
命令生成手段3により生成された命令列は命令実行/実行結果組み込み手段4に与えられ、命令実行/実行結果組み込み手段4はシミュレータにより上記命令列を実行し、正解情報(実行結果)を得てテストプログラム中に組み込み、テストプログラム5を生成する。
【0041】
プログラム名自動設定手段5aは前記した操作手段6により設定される試験機能、命令タイプ、操作手段6により設定されるテストプログラムの本数等に基づき、生成されるテストプログラムにプログラム番号を付与する。
上記のようにしてテストプログラムを生成することにより、制御を複雑化したり規模を大きくすることなく、指定された機能、命令タイプに応じたテストプログラムを生成することができ、また、指定された機能、命令タイプに応じたテストプログラム名を付与することができる。
【0042】
さらに、命令数、初期値、命令ID等を指定することが可能となり、テストプログラムの実行時間への対応を容易化し、テストプログラムの再生成、テストプログラムへの意図した命令IDの設定が可能となる。
▲2▼ 図2に示すように、操作手段6によりテストプログラムにおけるアクセス範囲、分岐範囲を指定し、指定されたアクセス範囲/分岐範囲の命令を生成したり、操作手段6によりチェック・ポイント用命令の挿入位置等を指定し、チェック・ポイント用命令挿入位置制御手段3aにより指定された位置にチェック・ポイント用命令を挿入することができる。
【0043】
また、切り替え手段6cを設け、アクセス/分岐範囲をランダム値もしくは固定値に切り替えて設定することもできる。
さらに、操作手段6により、初期処理部先頭位置、割り込みテーブル先頭位置、アドレス空間テーブル先頭位置、アクセス・データ域先頭位置およびその範囲、命令生成域先頭位置およびその範囲、正解情報格納位置先頭位置およびその範囲等を指定し、テストプログラムにおける初期処理部、割り込みテーブル、アドレス空間テーブル、アクセス・データ域先頭位置等の位置および/または範囲を指定することもできる。
【0044】
上記のように、アクセス範囲/分岐範囲を任意に指定したり、初期処理部先頭位置、割り込みテーブル先頭位置、アドレス空間テーブル先頭位置を設定可能とすることにより、試験条件に応じたテストプログラムを生成することができる。また、アクセス命令のアクセス範囲を固定値に設定することができるので、TLB(アドレス変換バッファ)に対するヒット率を向上させることができる。
【0045】
さらに、チェック・ポイント用命令の設定位置を制御できるようにすることにより、ラフなチェックあるいは詳細なチェックを行うテストプログラムを生成でき、目的に応じたテストプログラムを容易に生成することができる。
▲3▼ 図2に示すように、正解位置情報設定位置を変化させる手段4aを設け、正解情報(実行結果)の大きさに応じてテストプログラムにおける正解情報の組み込み位置を変化させる。これにより、実行結果の大きさに応じて、自動的に正解情報の組み込み位置を変化させることができ、正解情報が大きい場合にも領域をオーバ−することなく正解情報を設定することができる。
【0046】
また、初期処理部設定手段5bを設け、予め用意された初期処理部A〜Zを機能指定値に応じて選択し、テストプログラム5に組み込む。これにより、機能指定値に応じた初期処理部を持つテストプログラム5を自動的に生成することが可能となる。
▲4▼ 図3に示すように、試験機能、命令タイプ等の被試験プログラムの生成条件を指定する第1の指定操作6−1と、被試験対象プログラムにおける処理部、テーブル等の先頭位置、範囲等の被試験対象プログラムの構成を指定する第2の指定操作6−2,6−3,…とを分割して表示する操作手段6と、上記第2の指定操作による指定形式を格納する格納手段6eを設ける。
【0047】
そして、読み出し制御手段6dにより、上記第1の指定操作による指定値に基づき上記格納手段6aから第2の指定操作による指定値を自動的に読み出し、テストプログラムを自動的に生成する。
上記のように、上記第1の指定操作による指定値に基づき、第2の指定操作による指定値を自動的に読み出すことにより、テストプログラム自動生成システムの操作性を向上させることができる。
【0048】
【実施例】
以下、本発明の実施例を説明する。
(1)機能指定と命令タイプ指定制御を用いたテストプログラムの生成
図4、図5は、同図は、機能指定と命令タイプ指定によるテストプログラムの生成を説明する図である。
【0049】
図4、図5において、211は画面制御部、220は画面情報ファイル、230は試験項目制御部、240は出現頻度制御部、250は命令生成制御部、260はテスト命令列、270は実行制御部をそれぞれ示している。
図4において、画面制御部210の試験機能1〜nの人手操作211、命令タイプ1〜nの人手操作212により設定された情報を画面情報ファイル220の試験機能1〜n指定値221、命令タイプ1〜n指定値222に格納する。
【0050】
試験項目制御部230は、試験機能231、命令タイプ232、結合処理部233、結合テーブル234から構成されている。
試験機能1〜n指定値221、命令タイプ1〜n指定値222に基づき定められた試験機能231、命令タイプ232から選択された値により、結合処理部233は結合テーブル234を選択する。例えば、機能が1、命令タイプが2の場合には、結合テーブル234の2行目が選択される。
【0051】
そして、選択された結合テーブル234により、出現頻度制御部240の出現頻度テーブル241を選択(出現11制御〜出現nn制御)し、命令IDの設定を行う。例えば、出現頻度テーブル(出現11制御〜出現nn制御)には、出現頻度に応じた比率で命令IDが格納されており、擬似乱数等により命令IDをランダムに選択して、命令タイプ、機能に応じて定まる出現頻度で命令IDを出力する。
【0052】
図5において、命令生成制御部250は、命令生成テーブル251、生成命令設定部252から構成されている。命令生成テーブル251には、次に説明するように命令IDに対応して命令のオペランド部の値を設定するためのデータが格納されており、命令生成制御部250は選択された命令IDと疑似乱数発生器(図示せず)が発生する疑似乱数に従って、命令生成テーブル251から命令を生成する。そして、生成命令設定部252により、テスト命令列260に順次被試験命令1〜n261を設定する。
【0053】
図6は、上記した命令生成制御部250における命令の生成を説明する図である。
同図(a)に示すように、命令生成テーブルには命令ID毎にAND演算とOR演算用のデータ(同図中の1101 1111,0000 1000 )が格納されており、上記AND演算、OR演算用のデータと疑似乱数発生器(図示せず)から与えられる疑似乱数とのAND演算およびOR演算を行って、命令のオペランド部の値を生成する。
【0054】
例えば、同図(b)に示すように、命令コードがレジスタ加算の場合に、レジスタ番号(同図のadd GRm ,GRn におけるn,mの値)を次のようにして求める。
まず、疑似乱数発生器が発生する疑似乱数(同図の場合には1011 0011 ) とAND演算用データ(同図の場合には1101 1111 )とのAND演算を行い、その結果とOR演算用のデータ(同図の場合には0000 1000 ) とのOR演算を行う。
【0055】
その結果、同図に示すように0011 1011 (10進数で3と11)が得られ、加算命令のレジスタがGR3 ,GR11となる。
上記のようにAND演算用のデータとOR演算用のデータを適宜選定し、それらの値と疑似乱数とのAND演算、OR演算を行うことにより、オペランド、レジスタ番号等の値の範囲を適切な範囲に選定することができる(同図においては、レジスタ番号が0〜7,8〜15の範囲になるようにAND演算用のデータとOR演算用のデータを定めている)。
【0056】
上記のようにして、命令生成テーブルにより命令IDに対応したオペランド部が生成されると、生成命令設定部252は、命令IDに対応した命令コードに上記オペランド部を付加し、命令を生成する。
図5に戻り、実行制御部270は、生成命令組込み制御部271、生成命令の実行制御部272、ソフトシミュレータ273、正解情報の収集・組込み制御部274、テストプログラム域275から構成されている。
【0057】
生成命令組込み制御部271は、テスト命令列260をテストプログラム域275に組み込み、生成命令の実行制御部272はソフトシミュレータ273を用いてテスト命令列を実行し、実行結果を得る。
正解情報の収集・組込み制御部274は、実行した結果を正解情報としてテストプログラム域275に組み込む。
(2)試験項目単位の命令生成
図7は生成命令に対する特化制御について説明する図であり、レジスタ干渉試験、オペランド干渉試験等を行うに際し生成命令のオペランド部を特化(オペランド部の近似値化等)する場合を示している。
【0058】
同図において、311は疑似乱数発生器、320は出現頻度制御部、330は特化制御部、340は命令生成制御部をそれぞれ示しており、疑似乱数発生器311、出現頻度制御部320、命令生成制御部340の構成/動作は前記図4〜図6で説明したものと基本的に同様である。
特化制御部330は、上記したように、レジスタ干渉試験、オペランド干渉試験等を行うに際し、オペランドの値を近似化するなど、オペランドの値、レジスタの番号の値を特定の値に設定するために設けられたものであり、生成特化制御部331により、疑似乱数発生器311からの乱数に対して、試験項目11〜nn制御部321が出力する各試験項目に沿った特殊な制御を行い、特化した乱数を生成する。例えば、オペランド干渉試験を行う場合には、オペランド部が近似化した値になるように所定の範囲内の乱数を発生し、該乱数により命令のオペランド部を生成する。
【0059】
出現頻度制御部320は、試験11〜nn専用出現頻度テーブル323、判定部322、試験項目11〜nn制御部321から構成されており、前記したように、疑似乱数発生器311からの乱数値と、試験項目11〜nn制御部321の設定指示とを判定部322で判断し、試験11〜nn専用出現頻度テーブル323から生成対象となる命令IDを取り出す。
【0060】
命令生成制御部340は、デコーダ341、a〜z命令の生成データ343、生成命令設定部344から構成されおり、前記したように、取り出された生成対象となる命令IDに基づいて、デコーダ341により、a〜z命令の生成データ343を選択し、特化した乱数に従って命令のオペランド部を生成する。生成された命令は、生成命令設定部344により所定の領域に設定される。
【0061】
さらに、図8により乱数の特化制御の詳細について説明する。
試験項目11〜nn制御部421により、命令特化ANDデータ433、命令特化ORデータ434が、各試験項目に沿った特殊データとして選択される。
疑似乱数発生器411からの乱数値431と、命令特化ANDデータ433をAND(不要情報の削除)を行い、更に命令特化ORデータ434により、OR(要情報の付加)の制御を行い、命令生成対象の乱数として使用する。
【0062】
すなわち、前記した命令生成制御部におけるオペランド部の生成の場合と同様、命令特化ANDデータ433、命令特化ORデータ434を試験項目に応じて設定することにより、命令生成対象となる乱数の特化(乱数の値を特定の値に設定する)をすることができる。これにより、命令生成制御部340において生成される命令のオペランド部の値を近似値化する等、特定の値に設定することができる。
(3)プログラム名の設定
図9は、プログラム名の設定について説明する図であり、試験機能、命令タイプ、命令IDモード(後述する)およびプログラム本数に応じて自動的にプログラム名を設定する場合を示している。
【0063】
同図において、510は画面制御部、520は画面情報ファイル、531は試験項目制御部、532は出現頻度制御部、534は命令生成制御部、535はテスト命令列、540はプログラム名設定制御部、550は実行制御部をそれぞれ示しており、画面制御部510、画面情報ファイル520、試験項目制御部531、出現頻度制御部532、命令生成制御部534、テスト命令列535、実行制御部550の構成/動作は、画面制御部510から入力される情報、画面情報ファイル520に格納される情報を除き、前記図4〜図8に示したものと基本的に同様である。
【0064】
画面制御部510の試験機能1〜nの人手操作511、命令タイプ1〜nの人手操作512、命令IDモードの人手操作513、テストプログラム本数の人手操作514により設定された情報を画面情報ファイル520の試験機能1〜n指定値521、命令タイプ1〜n指定値522、命令IDモード523、テストプログラム本数524に格納する。
【0065】
プログラム名設定制御部540は、番号設定部541、末尾カウンタ543、レジスタ544、プログラム番号設定部545、次生成繰返し制御部546から構成されている。
プログラム名設定制御部540の番号設定部541において、画面情報ファイル520の試験機能1〜n指定値521、命令タイプ1〜n指定値522、命令IDモード523から上位のプログラム名(プログラム番号の上位3桁)を決定しレジスタ544に設定する。
【0066】
さらに、テストプログラム本数524を末尾カウンタ543に設定することにより、レジスタ544にテストプログラム名(番号)を設定する。
一方、試験項目制御部531、出現頻度制御部532、命令生成制御部534によって求めたテスト命令列535が実行制御部550に与えられ、実行制御部550において1〜nのテストプログラム557が生成される。
【0067】
そして、プログラム番号設定部545は、レジスタ544に設定されているテストプログラム名を上記生成された1〜nのテストプログラム557に対して付与する。
次生成繰返し制御部546は、末尾カウンタ543がゼロになるまで命令生成制御部534によるテスト命令の生成を繰り返し、生成されたテストプログラムに上位3桁が試験機能、命令タイプ、命令IDモードに対応した値を持ち、下位3桁が末尾カウンタの値を持つテストプログラム名が付与される。
(4)初期値(シード値)の設定
図10は初期値(シード値)の設定について説明する図であり、初期値(シード値)を人手による設定又は自動設定に切り替えて設定できるようにした場合を示している。
【0068】
同図において、610は画面制御部、620は画面情報ファイル、631は疑似乱数発生器、632は試験項目制御部、633は出現頻度制御部、640は命令生成制御部、650はテスト命令列、660は実行制御部をそれぞれ示しており、疑似乱数発生器631、試験項目制御部632、出現頻度制御部633、命令生成制御部640、テスト命令列650、実行制御部660の構成/動作は、画面情報ファイル620に格納される情報を除き、前記図4〜図8に示したものと基本的に同様である。
【0069】
画面制御部610は、初期値(シード値)の人手操作611、切替え制御部612、自動設定指示614、タイマー613、人手操作指示615から構成されている。そして、通常は自動設定指示614が優先され、タイマー613からの初期値(シード)が画面制御部610に表示され、切替え制御部612により、人手操作指示615による任意の初期値(シード)621の設定を行う。
【0070】
すなわち、切替え制御部612により、人手操作指示615による人手による初期値(シード)の設定と、タイマー613による初期値(シード)の自動的な設定を切り替えて設定することができる。
画面情報ファイル620の初期値(シード)621は疑似乱数発生器631の初期値として使用され、順次生成される乱数値に基づき、前記したように、試験項目制御部632、出現頻度制御部633、命令生成制御部640によって求めれたテスト命令列650が実行制御部660により実行され、テストプログラム665が生成される。
(5)命令IDモードの設定制御
図11は、命令IDモードの設定制御について説明する図であり、命令IDをランダムな値に設定したり、意図した値(例えばシリアルな値)に設定できるようにする場合を示している。
【0071】
同図において、710は画面制御部、720は画面情報ファイル、731はモード切替え部、741は命令IDをシリアルに設定するためのシリアルID設定制御部、742は命令ID域、744は命令ID取出し制御部、743は疑似乱数発生器、750は出現頻度制御部、760は命令生成制御部、770はテスト命令列、780は実行制御部をそれぞれ示しており、画面制御部710、画面情報ファイル720、疑似乱数発生器743、出現頻度制御部750、命令生成制御部760、テスト命令列770、実行制御部780の構成/動作は、画面制御部710から入力される情報、画面情報ファイル720に格納される情報を除き、前記図4〜図8に示したものと基本的に同様である。
【0072】
画面制御部710の命令ID設定モードの人手操作711により、画面情報ファイル720の命令IDモード値721に値が設定される。
設定された命令IDモード値721に対して、モード切替え部731では、「R」(ランダム)か「S」(シリアル)のコード判別を行い、「R」ならば、疑似乱数発生器743が発生する通常の乱数に基づいた生成処理を行い、「S」ならば、シリアルID設定制御部741により、命令ID域742に命令IDをシリアルに設定する。設定された命令IDは、命令ID取出し制御部744により命令生成制御部760に渡され、通常の乱数に基づいた生成処理と同じようにテスト生成を行う。
(6)プログラム構成の入力指定によるテストプログラム生成
図12、図13は、プログラム構成の入力指定によるテストプログラムの生成について本発明の実施例を示す図であり、本実施例は、生成されたテストプログラム域の初期処理部番地、割込みテーブル番地、アドレス空間テーブル番地等の番地およびその範囲値と、チェック・ポイント数、生成命令数等を設定できるようにした実施例を示している。
【0073】
同図において、810は画面制御部、820は画面情報ファイル、831は疑似乱数発生器、832は試験項目制御部、833は出現頻度制御部、834は生成命令カウンタ、835はチェックポイント・カウンタ、841は先頭番地の設定制御部、842はアクセス範囲変更部、843は分岐範囲変更部、844は乱数設定レジスタ、860は命令生成制御部、870はテスト命令列、880は実行制御部をそれぞれ示しており、画面制御部810、画面情報ファイル820、疑似乱数発生器831、試験項目制御部832、出現頻度制御部833、命令生成制御部860、テスト命令列870、実行制御部880の構成/動作は、画面制御部810から入力される情報、画面情報ファイル820に格納される情報を除き、前記図4〜図8に示したものと基本的に同様である。
【0074】
画面制御部810の命令生成条件の人手操作811の任意に指定された値を画面情報ファイル820の生成条件値に設定する。
更に、初期処理部番地の人手操作812、割込みテーブル番地の人手操作813、アドレス空間テーブル番地の人手操作814、正解情報番地の人手操作815、アクセスデータ番地の人手操作816、テスト命令設定番地の人手操作817、チェック・ポイント数の設定人手操作818、生成命令数の設定人手操作819により設定された情報を、画面情報ファイル820の初期処理部番地822、割込みテーブル番地823、アドレス空間テーブル番地824、正解情報番地と範囲値825、アクセスデータ番地と範囲値826、テスト命令設定番地と範囲値827、チェック・ポイント数828、生成命令数829に格納する。
【0075】
先頭番地の設定制御部841は、初期処理部番地822〜テスト命令設定番地と範囲値827で指定された各番地に各内容のデータを設定する。
アクセス範囲変更部842、分岐範囲変更部843は、初期処理部番地822〜テスト命令設定番地と範囲値827により、疑似乱数発生器831の乱数を変更し乱数設定レジスタ844に設定する。なお、図示しない切替え制御部を設け、切替え制御部により、上記分岐範囲、アクセス範囲をランダムな値もしくは固定値に切替え制御することもできる。
【0076】
命令生成制御部860は、乱数設定レジスタ844の値を使用して被試験命令を生成する。
生成命令数カウンタ834は、テスト命令列870の被試験命令1〜nを指定値に従って可変に生成するカウンタであり、該カウンタ値により生成命令数が定められる。
【0077】
チェックポイント・カウンタ835は、生成命令間に設定するチェックポイント命令を指定数に従って可変に設定するカウンタであり、該カウンタ値により生成命令間に設定するチェックポイントの数が定められる。
番地自動設定部851は、実行制御部880の正解情報の収集・組込み制御部884に対し、各種割込み情報の大きさに従って、領域を詰めて正解情報を組み込む設定部である。すなわち、通常、正解域としては所定の大きさの領域が確保され正解情報が書き込まれるが、上記領域に空きがあるとき、番地自動設定部851は上記領域を詰めて正解情報を組み込む。
(7)試験機能単位の初期処理部の設定
図14は試験機能単位の初期処理部の設定について説明する図であり、本実施例は、予め用意された初期処理部を試験機能に対応させて選択し自動的に読み出すことにより、テストプログラム域の初期処理部を自動的に行うようにした実施例を示している。
【0078】
同図において、910は画面制御部、920は画面情報ファイル、932は試験項目制御部、933は出現頻度制御部、934は命令生成制御部、940は設定制御部、935はテスト命令列、950は実行制御部をそれぞれ示しており、画面制御部910、画面情報ファイル920、試験項目制御部932、出現頻度制御部933、命令生成制御部934、テスト命令列935、実行制御部950の構成/動作は前記図4〜図8に示したものと基本的に同様である。
【0079】
画面制御部910の試験機能1〜n指定の人手操作911で指定された値
を画面情報ファイル920の試験機能1〜n指定値921に設定する。
設定された試験機能1〜n指定値921に基づき、設定制御部940は、処理プログラム941から試験機能に対応した初期処理部A〜Zを選択し、実行制御部950のテストプログラム956の初期処理部に格納する。
(8)画面情報ファイルの自動呼出し
図15は、画面情報ファイルの自動呼出しについて説明する図であり、本実施例は、試験機能指定値、命令タイプ指定値等のテストプログラムの生成条件の指定に応じて設定番地や番地範囲等のテストプログラムの構成を指定するデータを自動的に読み出す場合を示している。
【0080】
同図において、110は画面制御部、120は画面情報ファイル、130は自動呼出し制御部をそれぞれ示しており、同図にはテストプログラム自動生成システムのその他の構成が示されていないが、上記画面制御部110、画面情報ファイル120およびその他の部分の構成/動作は前記図4〜図14に示したものと基本的に同様である。
【0081】
画面制御部110の試験機能1〜n指定の人手操作111、命令タイプ1〜n指定の人手操作112で指定された値を画面情報ファイル120の試験機能1〜n指定値121、命令タイプ1〜n指定値122に設定する。
自動呼出し制御部130は、設定された試験機能1〜n指定値121と、命令タイプ1〜n指定値122に基づき、判定部131により、画面情報ファイルA,B,…132を選択して呼出し、画面情報ファイル呼び出し設定制御部133により、所定の領域に画面情報ファイルを登録・表示する。
【0082】
上記選択された情報を用いて、以下、前記図4〜図14で説明したようにテストプログラムが自動生成される。
【0083】
【発明の効果】
以上説明したように本発明は以下の効果を得ることができる。
(1)被試験対象の機能と命令タイプを指定し、指定された機能と命令タイプに応じた出現頻度を設定して命令を生成することにより、特殊な命令タイプ、指定された機能を対象とした被試験対象の命令を生成することが可能となる。
【0084】
また、機能ごとに正解情報を解析し、テストプログラムに組み込むことにより、機能に対応したテストプログラムの自動生成が可能となる。
さらに、機能毎に命令生成を特化する制御手段を設けたので、オペランド部を近似化する等、特殊な命令を生成することができ、レジスタ干渉試験、オペランド干渉試験等を行うテストプログラムの自動生成が可能となる。
(2)機能に付与される番号と命令タイプに付与される番号とから被試験対象プログラム名を付与することができ、また、生成する被試験対象プログラムの本数を設定することにより、被試験対象プログラム名の設定を自動化することができる。
(3)初期値(シード値)の設定を自動的に設定される値もしくは任意値に設定することができるので、自動的に設定したシード値から生成されたテストプログラムを、初期値(シード値)の設定を任意値に設定することにより再生成することができ、試験効率の向上を図ることができる。
(4)命令ID(被試験対象の命令に付随する番号)の設定をランダムな値もしくは指定値に設定することができ、ランダム生成以外に意図した命令IDを設定することができ、試験精度の向上を図ることができる。
(5)被試験対象命令の命令数を指定できるので、試験時間が短い場合には、被試験対象命令の命令数を少なくし、試験時間が多い場合には、被試験対象命令の命令数を大きくする等の試験条件に対応した被試験対象命令の生成が可能となり、試験効率の向上を図ることができる。
(6)被試験対象プログラムを構成する初期処理部、割込みテーブル、アドレス空間テーブル、アクセス・データ域、命令生成域、正解情報域(実行結果格納域)の先頭アドレスや領域範囲を設定したり、アクセス命令や分岐命令のオペランド・アドレスに対するアクセス範囲を指定することができるので、生成される被試験対象プログラムの構成を可変な構成することが可能となり、試験条件に対応したテストプログラムの自動生成が可能となる。
(7)命令のアクセス範囲/分岐範囲をランダムもしくは固定の範囲としたアクセス/分岐命令を生成することができる。このため、試験条件に応じたテストプログラムの生成が可能になるとともに、アクセス命令のアクセス範囲を固定に指定することにより、被試験命令のオペランド・アドレスを固定のアドレスに設定することが可能となり、被試験命令の実行時、TLB(アドレス変換バッファ)に対するヒット率の向上を図った試験が可能となる。
(8)正解情報(実行結果)の大きさに従って、被試験対象プログラムに組み込む設定位置を自動的に変化させることができるので、特殊な実行結果情報の場合にも領域をオーバーすることなく設定が可能となり、テストプログラムの開発効率の向上を図ることができる。
(9)被試験対象の命令列に挿入するチェック・ポイント用命令の数やチェック・ポイント用命令の設定箇所を制御できるので、ラフなチェックや詳細なチェックをするテストプログラムの生成が可能となり、試験精度の向上を図った試験が可能となる。
(10)被試験対象プログラムの初期処理部を機能ごとに自動的に読み出すことができ、機能に対応したテストプログラムを自動的に生成することが可能となる。
(11)試験機能、命令タイプ等の被試験プログラムの生成条件を指定する操作画面の指定操作により、処理部、テーブル、命令生成域等の先頭位置および/またはこれらの範囲等、被試験対象プログラムの構成を規定するデータを設定した操作画面を自動的に読み出して、それらの指定値に対応したテストプログラムを自動的に生成することができるので、テストプログラム自動生成システムの操作性を向上させることができる。
【図面の簡単な説明】
【図1】本発明の原理図(その1)である。
【図2】本発明の原理図(その2)である。
【図3】本発明の原理図(その3)である。
【図4】機能指定と命令タイプ指定によるテスト生成を説明する図である。
【図5】機能指定と命令タイプ指定によるテスト生成を説明する図である。
【図6】命令生成制御部における命令生成を説明する図である。
【図7】生成命令の特化制御を説明する図である。
【図8】特化制御部の詳細を説明する図である。
【図9】プログラム名の設定を説明する図である。
【図10】初期値(シード値)の設定を説明する図である。
【図11】命令ID切替え制御を説明する図である。
【図12】プログラム構成の入力指定によるテスト生成を説明する図である。
【図13】プログラム構成の入力指定によるテスト生成を説明する図である。
【図14】機能単位の初期処理部の自動的設定を説明する図である。
【図15】画面情報ファイルの自動呼び出しを説明する図である。
【図16】従来の試験機能指定によるテスト生成を説明する図である。
【図17】従来のテストプログラム名の設定を説明する図である。
【図18】従来の初期値(シード値)の設定を説明する図である。
【図19】従来の命令IDに基づくプログラム生成を説明する図である。
【符号の説明】
110,210,510,610,710,810,910
画面制御部
120,220,520,620,720,820,920
画面情報ファイル
121 221 521 921 試験機能1〜n指定値
122 222 522 命令タイプ1〜n指定値
130 自動呼出し制御部
131 322 判定部
132 画面情報ファイルA,B,…
133 画面情報ファイル呼び出し設定制御部
230 531 632 832 932 試験項目制御部
231 試験機能
232 命令タイプ
233 結合処理部
234 結合テーブル
240 320 532 633 750 833 933
出現頻度制御部
241 出現頻度テーブル
250 340 534 640 760 860 934
命令生成制御部
251 命令生成テーブル
252 344 生成命令設定部
260 535 650 770 870 935 テスト命令列
261 被試験命令1〜n
270 550 660 880 780 950 実行制御部
271 551 661 781 881 951 生成命令組込み制御部 272 552 662 782 882 952 生成命令の実行制御部
273 553 663 783 883 953 ソフトシミュレータ
274 554 884 784 884 正解情報の収集・組込み制御部
275 557 665 785 885 956 テストプログラム
311 411 631 743 831 疑似乱数発生器
330 特化制御部
321 試験項目11〜nn制御部
323 試験11〜nn専用出現頻度テーブル
341 デコーダ
343 a〜z命令の生成データ
421 試験項目11〜nn制御部
433 命令特化ANDデータ
434 命令特化ORデータ
431 乱数値
523 命令IDモード
524 テストプログラム本数
540 プログラム名設定制御部
541 番号設定部
543 末尾カウンタ
544 レジスタ
545 プログラム番号設定部
546 次生成繰返し制御部
612 切替え制御部
613 タイマー
621 初期値(シード)
721 命令IDモード値
731 モード切替え部
741 シリアルID設定制御部
742 命令ID域
744 命令ID取出し制御部
834 生成命令カウンタ
835 チェックポイント・カウンタ
841 先頭番地の設定制御部
842 アクセス範囲変更部
843 分岐範囲変更部
844 乱数設定レジスタ
822 初期処理部番地
823 割込みテーブル番地
824 アドレス空間テーブル番地
825 正解情報番地と範囲値
826 アクセスデータ番地と範囲値
827 テスト命令設定番地と範囲値
828 チェック・ポイント数
829 生成命令数
851 番地自動設定部
940 設定制御部
[0001]
[Industrial application fields]
The present invention relates to a system for testing an information processing apparatus, and more particularly to a test program automatic generation system that automatically generates a test program.
[0002]
[Prior art]
In a conventional test program automatic generation system, a test program is automatically generated as follows.
(1) Test generation by function specification
In the automatic generation of a test program, a test program is generated for each function to be tested such as a register interference test, an operand interference test, and an exceptional event test.
[0003]
When generating a test program for each function as described above, the conventional test program automatic generation system divides the generation means for each function under test into independent control program units, and the instruction under test is also a load instruction. Instead of controlling separately for each instruction type (instruction format) such as a store instruction, a branch instruction, and an operation instruction, the control is performed by a single appearance frequency setting table.
[0004]
FIG. 16 is a diagram illustrating automatic generation of a test program by specifying a test function as an example of a conventional independent control program unit.
In the figure, 11 is a screen control unit, 13 is a screen information file, 15 is an initial setting unit, 18 is an instruction generation mechanism unit, 22 is a test instruction sequence, and 24 is an execution control unit.
[0005]
Information arbitrarily set for the function A is stored in the test function A designated value 14 of the screen information file 13 by the manual operation 12 of the test function A from the screen control unit 11 including a keyboard and a display.
The initial setting unit 15 includes a random number generator 16 and an appearance frequency operation unit 17, and the appearance frequency operation unit 17 executes an instruction described in the appearance frequency setting unit 19 based on the test function A designated value 14. Change the appearance frequency.
[0006]
The instruction generation mechanism unit 18 includes an instruction generation table 20 that stores instructions and a generation instruction setting unit 21. Then, an instruction is generated from the instruction generation table 20 based on the random number value from the random number generator 16 and the contents of the appearance frequency setting unit 19, and the test instruction sequence 22 is set by the generation instruction setting unit 21.
The execution control unit 24 includes a generation instruction incorporation control unit 25, a generation instruction execution control unit 26, a software simulator 27, correct answer information collection / incorporation control unit 28, and a test program area 29.
[0007]
The generation instruction incorporation control unit 25 incorporates the test instruction sequence 22 in the test program area 29, and the test instruction sequence in the test program area 29 is executed by the generation instruction execution control unit 26 using the software simulator 27. Then, the execution result is incorporated into the test program area 29 as correct information by the correct information collection / embedding control unit 28.
(2) Instruction generation for each test item
In the conventional test program automatic generation system, when the instruction generation unit is changed for each function to be tested, it is divided into control program units, the generation unit is configured independently, and special control processing is supported. .
(3) Setting the program name
In the conventional test program automatic generation system, an arbitrarily designated program number is used as the program name. Further, when a plurality of test program names (specified by numbers) are specified, the program numbers are set in order from an arbitrarily specified program number.
[0008]
FIG. 17 is a diagram for explaining setting of a conventional program name. In the figure, 31 is a screen control unit, 35 is a screen information file, 40 is a test item control unit, 41 is an appearance frequency control unit, 43 is a command generation control unit, 44 is a test command sequence, 52 is a number control unit, 45 Indicates an execution control unit.
Information arbitrarily set by the manual operation 32 of the test function A of the screen control unit 31 is stored in the test function A designated value 36 of the screen information file 35.
[0009]
Further, the test program number 37 and the test program name 38 (for example, the upper three digits of the test program number) are set in the screen information file 35 by the manual operation 33 of the number of test programs and the manual operation 34 of the test program name.
The number control unit 52 includes an end counter 53, a register 54, a program number setting unit 55, and a next generation repetition control unit 56.
[0010]
The first test program is set in the register 54 by setting the test program name 38 in the register 54 and setting the number of test programs 37 in the end counter 53.
Further, a test instruction sequence 44 is generated by the test item control unit 40, the appearance frequency control unit 41, and the instruction generation control unit 43, and is set in the register 54 for one test program 50 generated by the execution control unit 45. The test program name is given by the program number setting unit 55.
[0011]
The next generation repetition control unit 56 repeats the generation of the test program from the instruction generation control unit 43 until the end counter 53 becomes zero.
Thereby, for example, a program name having upper three digits set manually and a lower three digits number determined according to the number of programs is set.
(4) Initial value (seed value) setting
In the conventional test program automatic generation system, the seed value is automatically set. FIG. 18 is a diagram for explaining setting of a conventional initial value (seed value).
[0012]
In the figure, 60 is a timer, 61 is a screen information file, 63 is a pseudo-random number generator, 64 is a test item control unit, 65 is an appearance frequency control unit, 67 is a command generation control unit, 70 is a test command sequence, and 77 is a test command sequence. Each execution control unit is shown.
Data obtained from the timer 60 is set as an initial value (seed value) 62 and used as an initial value of the pseudorandom number generator 63.
[0013]
Based on the random number value of the pseudo random number generator 63, the test item control unit 64, the appearance frequency control unit 65, and the instruction generation control unit 67 obtain the test instruction sequence 70, and the execution control unit 75 executes the obtained test instruction sequence 70. And generate a test program.
(5) Program generation based on instruction ID
In the conventional test program automatic generation system, (1) instruction ID setting, (2) number of instructions to be tested, (3) setting of program under test, (4) operand setting of access instruction, (5) branch instruction Operand setting, (6) Operand range setting, (7) Execution result (correct answer information) storage, (8) Check point instruction setting, and (9) Initial setting were performed as follows.
(1) Instruction ID setting
The instruction ID is a number (for example, 00, 01, 02...) Assigned to each instruction such as load and store in a one-to-one correspondence, and the appearance frequency control unit outputs the instruction ID, and the instruction generation table The operand part is added to output an instruction corresponding to the instruction ID.
[0014]
The instruction ID for generating the instruction under test has always been set by obtaining random data from a random data generator.
(2) Number of instructions to be tested
Since the set area is fixed, the number of instructions under test is targeted for instructions under test that can be set within a fixed range.
(3) Setting the program configuration to be tested
A fixed area is set and used for the initial address of the initial processing section, interrupt table, and address space table in the test program area. Also, the start address and area range of the access area, instruction generation area, and execution result (hereinafter referred to as correct answer information) storage area of the generated instruction sequence are used in a fixed area.
(4) Operand setting of access instruction
Since the access data area is fixed, an access instruction is generated based on the start address and area range.
(5) Operand setting of branch instruction
As an operand (logical address) for branching, a branch instruction is generated based on a branch range calculated from a value based on an address space table.
(6) Operand range setting
All operand ranges of access instructions and branch instructions were set at random. (7) Storing correct answer information (execution results)
For storing the correct answer information (execution results) of the generated instruction sequence, various correct answer information (execution results) are stored in a designated fixed storage area.
(8) Check point instruction setting
The number of check point instructions such as an instruction that generates an interrupt (for example, SVC) is set to a fixed value. The set number was determined by the size of the fixed instruction area under test.
(9) Initial setting section
In the conventional test program generation system, the control of all the functions to be tested is performed by one initial setting unit.
[0015]
FIG. 19 is a diagram for explaining program generation based on an instruction ID.
In the figure, 81 is a pseudo-random number generator, 82 is an appearance frequency control unit, 86 is an instruction generation control unit, 89 is a test instruction sequence, and 98 is an execution control unit.
The appearance frequency control unit 82 includes a test 11 to nn dedicated appearance frequency table 83, a determination unit 84, and test items 11 to nn control unit 85.
[0016]
The determination unit 84 determines the random number value from the pseudo random number generator 81 and the setting instruction of the test items 11 to nn control unit 85, and generates the test items 11 to nn according to the test items 11 to nn. Take out the target instruction ID.
The instruction generation control unit 86 includes an instruction generation table 87, a generation instruction setting unit 88, a check point control unit 96, and a generation instruction number counter 97.
[0017]
Based on the instruction ID to be generated, an instruction to be tested is generated from the random value from the pseudo random number generator 81 and the instruction generation table 87, and set in the test instruction sequence 89 by the generation instruction setting unit 88.
In the generated instruction setting unit 88, the check point control unit 96 inserts the check point instruction between the instruction sequences to be tested, and the generated instruction number counter 97 in which a fixed value is set, the instruction to be tested up to the maximum value. Is generated.
[0018]
The instruction generation table 87 is set to access only the range of the access data area defined in the fixed address E of the test program area 95.
The execution control unit 98 includes a generation instruction incorporation control unit 91, a generation instruction execution control unit 92, a software simulator 93, and correct information collection / embedding control unit 94.
[0019]
The instructions under test 1 to n in the test instruction sequence 89 are set to the fixed address F of the test program area 95 by the generation instruction incorporation control unit 91.
The initial processing unit, interrupt table, and address conversion table of the test program area 95 are set at predetermined addresses.
In the correct answer area of the test program area 95, the result executed by the generated instruction execution control unit 92 and the software simulator 93 is set to the solid address D by the correct answer information collection / embedding control part 94.
(6) Designation operation
In the conventional test program automatic generation system, the designation operation is performed only on the generation screen. That is, as shown in FIG. 17, when a manual operation is performed by the screen control unit 31, a specified value is set in the screen information file, and a test is generated based on the specified value.
[0020]
[Problems to be solved by the invention]
As described above, the conventional automatic test program generation system has the following problems.
(1) The instruction type could not be specified because the command to be tested was not controlled separately for each instruction type, and the appearance frequency setting table was controlled by one.
(2) Since the generation means is different for each function to be tested, the structure is divided for each function, and the control is complicated and the scale is large.
(3) The test program name is the program name specified arbitrarily, and in the case of multiple designations, the test program name is set in order from the arbitrarily designated program number, so the test program name is self-managed It was necessary and complicated.
(4) The seed value, which is the initial data for generating the test program, was automatically set as a random value, so it was difficult to regenerate.
(5) Since the number of instructions to be tested is targeted for the number of instructions that can be set in the designated instruction area (fixed), it is not easy to cope with the test program execution time (longer or shorter).
(6) Since the instruction ID for generating the instruction under test has always been set by obtaining random data from a pseudo random number generator, it is difficult to set the intended instruction ID.
(7) As the configuration of the common control unit of the program under test, the initial address of the initial processing unit, the interrupt table, and the address space table uses a fixed area. If you want to move, you have to change the common control unit.
(8) Since the start address and area range of the access area, instruction generation area, and correct information (execution result) storage area are fixed, it is not easy to cope with the test program execution time (longer or shorter). However, there is a drawback that it is difficult to generate large and small test programs.
(9) Since the operand area of the access instruction has a fixed access area, it is only possible to generate an access instruction based on the head address and the area range. Moreover, the branch operand (logical address) can only generate a branch instruction based on the branch range calculated from the value based on the address space table. Furthermore, if all the operand ranges of the access instruction and the branch instruction are set at random, there is a drawback that the hit rate for the TLB (address translation buffer) becomes very bad when the instruction under test is executed.
(10) The correct answer information (execution result) of the instruction under test is stored in the specified fixed storage area because various correct answer information (execution result) is stored. There were drawbacks.
(11) Since the number of check point instructions set is a fixed value and is determined by the size of the fixed instruction area under test, the check point instruction setting can be easily changed. could not.
(12) Since the test program to be tested controls all the functions of the test target with one initial setting unit, the initial setting unit tends to become enormous due to the addition of the function to be tested. There were drawbacks.
(13) The designation operation is performed only on the generation screen. When a plurality of generation screens are used, all setting operations are required, which causes a problem that the operation becomes complicated and difficult.
[0021]
The present invention has been made to remedy the above-mentioned drawbacks of the prior art, and the first object of the present invention is to provide an initial processing section in the test program area, an interrupt table, a head address of an address space table, and an access. A test program automatic generation system that can easily change the start address and area range of the area, instruction generation area, correct answer information (execution result) storage area, and can respond to the test program execution time (longer or shorter) It is to provide.
[0022]
A second object of the present invention is to enable generation of an instruction corresponding to an operand address of an access instruction and an operand (logical address) address for branching, and hit a TLB (address translation buffer) when executing the instruction under test. An object is to provide an automatic test program generation system that improves the rate.
A third object of the present invention is to provide an automatic test program generation system that does not exceed a special correct answer information storage area in storing correct answer information (execution results) of a command under test.
[0023]
A fourth object of the present invention is to provide an automatic test program generation system in which the setting can be easily changed with respect to the set number of check point instructions in the instruction under test.
A fifth object of the present invention is to provide an automatic test program generation system capable of handling each function even if the function of the initial setting unit becomes enormous due to the addition of the function to be tested.
[0024]
[Means for Solving the Problems]
FIGS. 1 to 3 are principle diagrams of the present invention. FIG. 1 shows a schematic configuration of a test program automatic generation system capable of controlling an object to be tested according to an instruction type and a function in the present invention. 2 shows a configuration of claims 1 to 8 of the present invention, and FIG. 3 shows a schematic configuration of a test program automatic generation system that does not complicate the operation even if a plurality of designated operation generation screens are provided.
In FIG. 1 to FIG. 3, 1 is a connection control means for generating an output for selecting the appearance frequency by combining the test function designated by the operation means 6 and the instruction type, and 2 is the appearance of an instruction for testing the object under test. Appearance frequency setting means for setting the frequency, 3 is an instruction generating means for generating an instruction to be tested, 4 is to execute the instruction under test generated by the instruction generating means 3, and correct information is incorporated into the program to be tested Instruction execution / execution result incorporation means 5 is a generated test program.
[0025]
In FIG. 1, a test program is automatically generated as follows.
(1) As shown in FIG. 1, function specifying means for specifying a function to be tested, instruction type specifying means for specifying an instruction type to be tested, a specified function and a specified instruction type A combination control means to be combined, an appearance frequency setting means for setting the appearance frequency of the instruction so that the instruction of the designated instruction type can be selected based on the output of the control means, and an operand for each function under test Special control means for setting the value of the register number to a specific value, the instruction set by the appearance frequency setting means, the value of the operand selected by the specialization control means, and the value of the register number Based on the instruction generation means for generating the instruction to be tested, the instruction execution / execution connection for executing the instruction sequence to be tested generated by the instruction generation means and incorporating the correct information into the program to be tested. A built-in means is provided, for automatically generating a test program for testing of the test object.
[0026]
(2) As shown in FIG. 1, a program for assigning a program name to a program under test based on a number assigned corresponding to the function under test and a number assigned corresponding to an instruction type Name setting means, instruction generation means for generating an instruction to be tested based on the commanded function and instruction type, and an instruction string to be tested generated by the generation means to execute correct information. An instruction execution / execution result incorporation means incorporated in the program is provided, and a test program for performing a test on the test object is automatically generated.
[0027]
(3) As shown in FIG. 1, program number setting means for setting the number of test target programs to be generated, and a program number to be tested are automatically assigned to each test target program according to the set number. Program name setting means for setting is provided.
(4) As shown in FIG. 1, in a system for automatically generating a test program, automatic setting means for automatically setting an initial value, manual operation instruction means for setting an initial value to an arbitrary value, and the above automatic A switching means for switching the output of the setting means and the manual operation instruction means, an instruction generation means for generating an instruction to be tested based on the designated function, the designated instruction type, and an initial value output by the switching means And a command execution / execution result incorporating means for executing the instruction sequence under test generated by the instruction generation means and incorporating correct information into the program under test, and automatically executing a test program for testing the test target To generate.
[0028]
(5) As shown in FIG. 1, the first command ID setting means for setting the command ID determined corresponding to the command to be tested to a random value, and the command ID set to the specified value Second instruction ID setting means to be set, switching means for switching the outputs of the first and second setting means, the designated function, the designated instruction type, and the instruction ID output by the switching means There is provided an instruction generating means for generating an instruction to be tested, and an instruction execution / execution result incorporating means for executing the instruction under test generated by the generating means and incorporating correct answer information into the program to be tested. Automatically generate a test program to test the subject.
[0029]
(6) As shown in FIG. 1, in a system for automatically generating a test program, instruction number setting means for specifying the number of instructions to be tested, the specified function, a specified instruction type, Based on the specified number of instructions, an instruction generation unit that generates an instruction to be tested, an instruction execution / instruction that causes execution of the instruction sequence to be tested generated by the instruction generation unit and incorporates correct information into the program to be tested / An execution result incorporating means is provided to automatically generate a test program for performing a test on the test object.
[0030]
FIG. 2 is a diagram showing the principle of the present invention. The invention according to claim 1 of the present invention is the start address of the initial processing section of the program under test in the system for automatically generating the test program as shown in FIG. First setting means for arbitrarily setting, a second setting means for arbitrarily setting the head address of the interrupt table, a third setting means for arbitrarily setting the head of the address space table, A third setting means for arbitrarily setting the start address; An appearance frequency that sets the appearance frequency of an instruction so that an instruction of the specified instruction type can be selected based on an output of the connection control means that combines the specified function and the specified instruction type, and the output of the connection control means And a command to be tested in accordance with the instruction set by the appearance frequency setting unit, the value of the operand corresponding to the command, the value of the register number, and the designation of the first, second, and third setting units. Instruction generation means for generating a target instruction; The instruction sequence under test generated by the instruction generation means is For soft simulator Let it run Execution result as correct answer information Incorporate into the program under test, The first, second and third Initial processing unit, table, etc. according to the setting means In the program under test An instruction execution / execution result embedded control means to be incorporated is provided to automatically generate a test program for performing a test on the test object.
[0031]
The invention of claim 2 of the present invention, as shown in FIG. 2, in a system for automatically generating a test program, a first setting means for setting the start address of the access data area of the program under test, Second setting means for setting the range of the access data area, third setting means for setting the start address of the instruction generation area, fourth setting means for setting the range of the instruction generation area, and correct information storage Fifth setting means for setting the start address of the area, and sixth setting means for setting the range of the correct answer information storage area; With , The instruction generation means includes In accordance with the setting positions of the first, second, third, fourth, fifth, and sixth setting means, a command to be tested is generated, The instruction execution / execution result embedded control means includes: order And said The correct information etc. 1st, 2nd, 3rd, 4th, 5th, 6th Are incorporated into the program under test according to the setting position of the setting means.
[0032]
According to claim 3 of the present invention, as shown in FIG. 2, in a system for automatically generating a test program, first setting means for arbitrarily setting an access data area of a program under test, Second setting means for setting an access range for a target access command Provided , The instruction generation means includes An access instruction to be tested is generated based on the designated function and the designated instruction type within the range designated by the first and second setting means.
[0033]
According to claim 4 of the present invention, as shown in FIG. 2, in a system for automatically generating a test program, branch range designating means for designating a branch range for a branch instruction of an instruction under test is provided. Preparation , The instruction generation means includes Based on the specified function and the specified instruction type in the specified branch range by the branch range specifying means, a branch instruction to be tested is generated.
[0034]
Claim 5 of the present invention of As shown in FIG. 2, in the system for automatically generating a test program, the invention provides a first setting means for arbitrarily setting an access data area of a program under test, and an access range for the access instruction under test. Second setting means for designating, third setting means for designating a branch range for the branch instruction of the instruction under test, Fourth setting means for setting the range designation to a random value for the instruction to be tested, fifth setting means for setting the range designation to a fixed value, and the fourth and fifth settings Switching means of the means, the instruction generation means, The access / branch instruction to be tested is generated within the range specified by the first, second and third setting means, and the switching means To switch the fourth and fifth setting means, The instruction access range / branch range is set to a random or fixed range.
[0035]
The invention of claim 6 of the present invention is a system for automatically generating a test program as shown in FIG. Correct answer information obtained as a result of execution Control means for automatically changing the setting position incorporated in the program under test according to the size of the program to be tested.
[0036]
According to the seventh aspect of the present invention, as shown in FIG. 2, in a system for automatically generating a test program, setting means for setting a numerical value of a check point instruction to be inserted into an instruction sequence to be tested; A setting location acquisition means for obtaining a setting location of a check point instruction from the number of check points and the number of instructions under test; The instruction generation means includes: An instruction to be tested is generated based on the specified function, the specified instruction type, and the setting location of the check point instruction obtained by the setting location acquisition means.
[0037]
The invention according to claim 8 of the present invention is a setting for setting and storing an initial processing section of a program under test for each function under test in a system for automatically generating a test program as shown in FIG. Control means The instruction execution / execution result built-in control means includes the The initial control unit stored by the setting control means is automatically read out according to the function to be tested designated by the function designating means and incorporated in the program to be tested.
[0038]
Further, as shown in FIG. 3, in a system for automatically generating a test program, function specifying means for specifying a function to be tested, command type specifying means for specifying a command type to be tested, and the above function A screen control unit for displaying a first designation operation for designating an instruction type and a second designation operation for designating the configuration of the program under test, and a storage for storing a designation format by the second designation operation Means, a call setting control means for reading a designation format by the second designation operation from the storage means based on the function designated by the first designation operation and the instruction type, and the designated function and the designated instruction. Based on the type and the designation format read from the storage means, an instruction generation means for generating an instruction to be tested, and an instruction string to be tested generated by the instruction generation means Is the line, the correct answer information instruction execution / execution result incorporated into the test target program provided a built-in unit, it is also possible to automatically generate a test program for testing of the test object.
[0039]
[Action]
1 to 3, the test program is generated as follows.
{Circle around (1)} In FIG. 1, the combination control unit 1 combines the function to be tested specified by the operation unit 6 and the command type, and gives an output for selecting the appearance frequency to the appearance frequency setting unit 2. The appearance frequency setting means 2 sets the appearance frequency of the instruction in the test program based on the above function and instruction type, and supplies it to the instruction generation means 3.
[0040]
The instruction generation means 3 generates an instruction for testing the object under test based on the number of instructions given from the operation means 6, initial value, instruction ID setting, and the like. The initial value and instruction ID can be switched to automatic / arbitrary value and random value / specified value by the switching means 6a and 6b, respectively.
The instruction sequence generated by the instruction generation means 3 is given to the instruction execution / execution result incorporation means 4, and the instruction execution / execution result incorporation means 4 executes the instruction sequence by the simulator to obtain correct answer information (execution result). A test program 5 is generated by being incorporated in the test program.
[0041]
The program name automatic setting unit 5a gives a program number to the generated test program based on the test function set by the operation unit 6, the instruction type, the number of test programs set by the operation unit 6, and the like.
By generating a test program as described above, it is possible to generate a test program according to the specified function and instruction type without complicating control or increasing the scale. The test program name corresponding to the instruction type can be given.
[0042]
In addition, it is possible to specify the number of instructions, initial value, instruction ID, etc., facilitating the response to the execution time of the test program, regenerating the test program, and setting the intended instruction ID to the test program Become.
(2) As shown in FIG. 2, the access means / branch range in the test program is designated by the operation means 6, and an instruction in the designated access range / branch range is generated, or the check point instruction is designated by the operation means 6. The check point instruction can be inserted at the position designated by the check point instruction insertion position control means 3a.
[0043]
It is also possible to provide a switching means 6c to switch and set the access / branch range to a random value or a fixed value.
Further, the operation means 6 is used to start the initial processing section start position, interrupt table start position, address space table start position, access data area start position and range, instruction generation area start position and range, correct information storage position start position and It is also possible to specify the range and the like, and specify the position and / or range of the initial processing unit, interrupt table, address space table, access data area head position, etc. in the test program.
[0044]
As described above, the access range / branch range can be specified arbitrarily, and the initial processing block start position, interrupt table start position, and address space table start position can be set to generate a test program according to the test conditions can do. Further, since the access range of the access instruction can be set to a fixed value, the hit rate for the TLB (address translation buffer) can be improved.
[0045]
Further, by making it possible to control the setting position of the check point instruction, it is possible to generate a test program for performing a rough check or a detailed check, and it is possible to easily generate a test program according to the purpose.
(3) As shown in FIG. 2, a means 4a for changing the correct position information setting position is provided to change the position where the correct information is incorporated in the test program according to the size of the correct information (execution result). As a result, the position where the correct answer information is incorporated can be automatically changed according to the magnitude of the execution result, and the correct answer information can be set without exceeding the area even when the correct answer information is large.
[0046]
Further, an initial processing unit setting means 5b is provided, and initial processing units A to Z prepared in advance are selected according to the function designation value and incorporated in the test program 5. As a result, it is possible to automatically generate the test program 5 having the initial processing unit corresponding to the function designation value.
(4) As shown in FIG. 3, a first specifying operation 6-1 for specifying the test function, instruction type and other conditions for generating the program under test, and the start positions of the processing unit and table in the program under test, The operation means 6 for dividing and displaying the second designation operations 6-2, 6-3,... For designating the configuration of the program under test such as the range, and the designation format by the second designation operation are stored. Storage means 6e is provided.
[0047]
Then, the read control means 6d automatically reads the specified value by the second specifying operation from the storage means 6a based on the specified value by the first specifying operation, and automatically generates a test program.
As described above, the operability of the test program automatic generation system can be improved by automatically reading the specified value by the second specifying operation based on the specified value by the first specifying operation.
[0048]
【Example】
Examples of the present invention will be described below.
(1) Test program generation using function designation and instruction type designation control
4 and 5 are diagrams for explaining generation of a test program by function designation and instruction type designation.
[0049]
4 and 5, 211 is a screen control unit, 220 is a screen information file, 230 is a test item control unit, 240 is an appearance frequency control unit, 250 is a command generation control unit, 260 is a test command sequence, and 270 is execution control. Each part is shown.
In FIG. 4, the information set by the manual operation 211 of the test functions 1 to n of the screen control unit 210 and the manual operation 212 of the command types 1 to n is changed to the test functions 1 to n specified value 221 and the command type of the screen information file 220. 1 to n are stored in the designated value 222.
[0050]
The test item control unit 230 includes a test function 231, an instruction type 232, a combination processing unit 233, and a combination table 234.
The combination processing unit 233 selects the combination table 234 according to the values selected from the test function 231 and the instruction type 232 determined based on the test function 1 to n specified value 221 and the instruction type 1 to n specified value 222. For example, when the function is 1 and the instruction type is 2, the second row of the join table 234 is selected.
[0051]
Then, the appearance frequency table 241 of the appearance frequency control unit 240 is selected (appearance 11 control to appearance nn control) by the selected combination table 234, and the instruction ID is set. For example, in the appearance frequency table (appearance 11 control to appearance nn control), instruction IDs are stored at a ratio corresponding to the appearance frequency. The instruction ID is output at an appearance frequency determined accordingly.
[0052]
In FIG. 5, the instruction generation control unit 250 includes an instruction generation table 251 and a generation instruction setting unit 252. The instruction generation table 251 stores data for setting the value of the operand part of the instruction corresponding to the instruction ID, as will be described below. The instruction generation control unit 250 stores the selected instruction ID and pseudo data. An instruction is generated from the instruction generation table 251 in accordance with a pseudo random number generated by a random number generator (not shown). Then, the generated instruction setting unit 252 sequentially sets the tested instructions 1 to n261 in the test instruction sequence 260.
[0053]
FIG. 6 is a diagram illustrating instruction generation in the instruction generation control unit 250 described above.
As shown in FIG. 5A, the instruction generation table stores data for AND operation and OR operation (1101 1111,0000 1000 in the figure) for each instruction ID. An AND operation and an OR operation of the data for use and a pseudorandom number given from a pseudorandom number generator (not shown) are performed to generate the value of the operand part of the instruction.
[0054]
For example, as shown in FIG. 5B, when the instruction code is register addition, the register numbers (values n and m in add GRm and GRn in the figure) are obtained as follows.
First, an AND operation is performed on the pseudo random number generated by the pseudo random number generator (1011 0011 in the case of the figure) and the data for AND operation (1101 1111 in the case of the figure), and the result is used for the OR operation. OR operation with data (0000 1000 in the case of the figure) is performed.
[0055]
As a result, as shown in the figure, 0011 1011 (decimal numbers 3 and 11) is obtained, and the registers of the addition instruction become GR3 and GR11.
As described above, data for AND operation and data for OR operation are appropriately selected, and by performing AND operation and OR operation of those values and pseudo-random numbers, appropriate ranges of values such as operands and register numbers are set. The range can be selected (in the figure, the data for AND operation and the data for OR operation are determined so that the register numbers are in the range of 0 to 7 and 8 to 15).
[0056]
As described above, when the operand part corresponding to the instruction ID is generated from the instruction generation table, the generated instruction setting unit 252 adds the operand part to the instruction code corresponding to the instruction ID to generate an instruction.
Returning to FIG. 5, the execution control unit 270 includes a generation instruction incorporation control unit 271, a generation instruction execution control unit 272, a software simulator 273, correct answer information collection / incorporation control unit 274, and a test program area 275.
[0057]
The generated instruction incorporation control unit 271 incorporates the test instruction sequence 260 into the test program area 275, and the generated instruction execution control unit 272 executes the test instruction sequence using the software simulator 273, and obtains an execution result.
The correct information collection / embedding control unit 274 incorporates the execution result in the test program area 275 as correct information.
(2) Instruction generation for each test item
FIG. 7 is a diagram for explaining specialized control for a generated instruction, and shows a case where an operand part of a generated instruction is specialized (such as approximation of an operand part) when performing a register interference test, an operand interference test, or the like. .
[0058]
In the figure, reference numeral 311 denotes a pseudo-random number generator, 320 denotes an appearance frequency control unit, 330 denotes a specialization control unit, and 340 denotes an instruction generation control unit. A pseudo-random number generator 311, an appearance frequency control unit 320, an instruction The configuration / operation of the generation control unit 340 is basically the same as that described with reference to FIGS.
As described above, the specialization control unit 330 sets the operand value and the register number value to a specific value, for example, by approximating the operand value when performing the register interference test and the operand interference test. The generation specialization control unit 331 performs special control according to each test item output from the test item 11 to nn control unit 321 with respect to the random number from the pseudo-random number generator 311. , Generate specialized random numbers. For example, when performing an operand interference test, a random number within a predetermined range is generated so that the operand part becomes an approximate value, and an instruction operand part is generated by the random number.
[0059]
The appearance frequency control unit 320 includes a test 11 to nn dedicated appearance frequency table 323, a determination unit 322, and test items 11 to nn control unit 321. As described above, the appearance frequency control unit 320 Then, the setting instruction of the test items 11 to nn control unit 321 is determined by the determination unit 322, and the instruction ID to be generated is extracted from the test 11 to nn dedicated appearance frequency table 323.
[0060]
The instruction generation control unit 340 includes a decoder 341, generation data 343 of a to z instructions, and a generation instruction setting unit 344. As described above, the instruction generation control unit 340 uses the decoder 341 based on the extracted instruction ID to be generated. , A to z instruction generation data 343 is selected, and an operand part of the instruction is generated in accordance with a specialized random number. The generated instruction is set in a predetermined area by the generation instruction setting unit 344.
[0061]
Further, details of randomization specialization control will be described with reference to FIG.
The test item 11 to nn control unit 421 selects the instruction-specific AND data 433 and the instruction-specific OR data 434 as special data along each test item.
AND the random number value 431 from the pseudo-random number generator 411 and the command-specific AND data 433 (deleting unnecessary information), and further control the OR (addition of necessary information) by the command-specific OR data 434. Used as a random number for instruction generation.
[0062]
That is, as in the case of the generation of the operand part in the instruction generation control unit described above, the instruction-specific AND data 433 and the instruction-specific OR data 434 are set in accordance with the test item, whereby the random number that is the instruction generation target is specified. (Set the random number to a specific value). Thereby, the value of the operand part of the instruction generated in the instruction generation control unit 340 can be set to a specific value, for example, by approximating the value.
(3) Setting the program name
FIG. 9 is a diagram for explaining setting of a program name, and shows a case where a program name is automatically set according to a test function, an instruction type, an instruction ID mode (described later) and the number of programs.
[0063]
In the figure, 510 is a screen control unit, 520 is a screen information file, 531 is a test item control unit, 532 is an appearance frequency control unit, 534 is a command generation control unit, 535 is a test command sequence, 540 is a program name setting control unit. Reference numeral 550 denotes an execution control unit, which includes a screen control unit 510, a screen information file 520, a test item control unit 531, an appearance frequency control unit 532, an instruction generation control unit 534, a test instruction sequence 535, and an execution control unit 550. The configuration / operation is basically the same as that shown in FIGS. 4 to 8 except for information input from the screen control unit 510 and information stored in the screen information file 520.
[0064]
Information set by the manual operation 511 of the test functions 1 to n of the screen control unit 510, the manual operation 512 of the command types 1 to n, the manual operation 513 of the command ID mode, and the manual operation 514 of the number of test programs is stored in the screen information file 520. The test functions 1 to n specified value 521, the instruction type 1 to n specified value 522, the instruction ID mode 523, and the number of test programs 524 are stored.
[0065]
The program name setting control unit 540 includes a number setting unit 541, a tail counter 543, a register 544, a program number setting unit 545, and a next generation repetition control unit 546.
In the number setting unit 541 of the program name setting control unit 540, the upper program name from the test function 1 to n specified value 521, instruction type 1 to n specified value 522, and instruction ID mode 523 of the screen information file 520 3 digits) is determined and set in the register 544.
[0066]
Furthermore, the test program name (number) is set in the register 544 by setting the number of test programs 524 in the end counter 543.
On the other hand, the test instruction sequence 535 obtained by the test item control unit 531, the appearance frequency control unit 532, and the instruction generation control unit 534 is given to the execution control unit 550, and 1 to n test programs 557 are generated in the execution control unit 550. The
[0067]
Then, the program number setting unit 545 assigns the test program name set in the register 544 to the generated 1 to n test programs 557.
The next generation repetition control unit 546 repeats the generation of the test instruction by the instruction generation control unit 534 until the end counter 543 becomes zero, and the upper three digits of the generated test program correspond to the test function, instruction type, and instruction ID mode. And a test program name having the last three digits of the tail counter value.
(4) Initial value (seed value) setting
FIG. 10 is a diagram for explaining setting of the initial value (seed value), and shows a case where the initial value (seed value) can be set by switching to manual setting or automatic setting.
[0068]
In the figure, 610 is a screen control unit, 620 is a screen information file, 631 is a pseudo-random number generator, 632 is a test item control unit, 633 is an appearance frequency control unit, 640 is a command generation control unit, 650 is a test command sequence, Reference numerals 660 denote execution control units, and the configurations / operations of the pseudo random number generator 631, the test item control unit 632, the appearance frequency control unit 633, the instruction generation control unit 640, the test instruction sequence 650, and the execution control unit 660 are as follows. Except for the information stored in the screen information file 620, it is basically the same as that shown in FIGS.
[0069]
The screen control unit 610 includes an initial value (seed value) manual operation 611, a switching control unit 612, an automatic setting instruction 614, a timer 613, and a manual operation instruction 615. Usually, the automatic setting instruction 614 has priority, the initial value (seed) from the timer 613 is displayed on the screen control unit 610, and the switching control unit 612 sets an arbitrary initial value (seed) 621 according to the manual operation instruction 615. Set up.
[0070]
That is, the switching control unit 612 can switch and set an initial value (seed) manually set by the manual operation instruction 615 and an initial value (seed) automatic setting by the timer 613.
The initial value (seed) 621 of the screen information file 620 is used as the initial value of the pseudo random number generator 631, and based on the sequentially generated random value, as described above, the test item control unit 632, the appearance frequency control unit 633, The test instruction sequence 650 obtained by the instruction generation control unit 640 is executed by the execution control unit 660, and a test program 665 is generated.
(5) Instruction ID mode setting control
FIG. 11 is a diagram for explaining the setting control of the instruction ID mode, and shows a case where the instruction ID can be set to a random value or set to an intended value (for example, a serial value).
[0071]
In the figure, 710 is a screen control unit, 720 is a screen information file, 731 is a mode switching unit, 741 is a serial ID setting control unit for setting a command ID serially, 742 is a command ID area, and 744 is a command ID fetch. The control unit 743 is a pseudo-random number generator, 750 is an appearance frequency control unit, 760 is an instruction generation control unit, 770 is a test instruction sequence, and 780 is an execution control unit. The screen control unit 710 and the screen information file 720 The configurations / operations of the pseudo random number generator 743, the appearance frequency control unit 750, the instruction generation control unit 760, the test instruction sequence 770, and the execution control unit 780 are stored in the information input from the screen control unit 710 and the screen information file 720. The information is basically the same as that shown in FIGS.
[0072]
A value is set to the command ID mode value 721 of the screen information file 720 by the manual operation 711 in the command ID setting mode of the screen control unit 710.
With respect to the set instruction ID mode value 721, the mode switching unit 731 performs code discrimination of “R” (random) or “S” (serial). If “R”, the pseudo random number generator 743 is generated. If “S”, the serial ID setting control unit 741 sets the instruction ID in the instruction ID area 742 serially. The set command ID is transferred to the command generation control unit 760 by the command ID extraction control unit 744, and test generation is performed in the same manner as the generation processing based on a normal random number.
(6) Test program generation by specifying program configuration input
FIG. 12 and FIG. 13 are diagrams showing an embodiment of the present invention for generating a test program by designating input of a program configuration. This embodiment shows an initial processing section address, an interrupt table address of the generated test program area, An embodiment is shown in which an address such as an address space table address and its range value, the number of check points, the number of generated instructions, etc. can be set.
[0073]
In the figure, 810 is a screen control unit, 820 is a screen information file, 831 is a pseudo-random number generator, 832 is a test item control unit, 833 is an appearance frequency control unit, 834 is a generation instruction counter, 835 is a checkpoint counter, 841 is a start address setting control unit, 842 is an access range change unit, 843 is a branch range change unit, 844 is a random number setting register, 860 is an instruction generation control unit, 870 is a test instruction sequence, and 880 is an execution control unit. Configuration / Operation of Screen Control Unit 810, Screen Information File 820, Pseudo Random Number Generator 831, Test Item Control Unit 832, Appearance Frequency Control Unit 833, Command Generation Control Unit 860, Test Command Sequence 870, Execution Control Unit 880 Except for the information input from the screen control unit 810 and the information stored in the screen information file 820. Shows is basically the same.
[0074]
An arbitrarily designated value of the manual operation 811 of the command generation condition of the screen control unit 810 is set as the generation condition value of the screen information file 820.
Further, a manual operation 812 at the initial processing section address, a manual operation 813 at the interrupt table address, a manual operation 814 at the address space table address, a manual operation 815 at the correct information address, a manual operation 816 at the access data address, and a manual operation at the test instruction setting address The information set by the operation 817, the check point number setting manual operation 818, the generation instruction number setting manual operation 819, the initial processing section address 822, the interrupt table address 823, the address space table address 824 of the screen information file 820, The correct information address and range value 825, the access data address and range value 826, the test instruction setting address and range value 827, the number of check points 828, and the number of generated instructions 829 are stored.
[0075]
The start address setting control unit 841 sets data of each content at each address specified by the initial processing unit address 822 to the test command setting address and the range value 827.
The access range changing unit 842 and the branch range changing unit 843 change the random number of the pseudo random number generator 831 and set it in the random number setting register 844 based on the initial processing unit address 822 to the test instruction setting address and the range value 827. Note that a switching control unit (not shown) can be provided, and the switching control unit can perform switching control of the branch range and the access range to random values or fixed values.
[0076]
The instruction generation control unit 860 generates an instruction under test using the value of the random number setting register 844.
The generated instruction number counter 834 is a counter that variably generates the instructions under test 1 to n of the test instruction sequence 870 according to a specified value, and the generated instruction number is determined by the counter value.
[0077]
The checkpoint counter 835 is a counter that variably sets checkpoint instructions set between generated instructions according to a specified number, and the number of checkpoints set between generated instructions is determined by the counter value.
The address automatic setting unit 851 is a setting unit that embeds correct information by filling the area in accordance with the size of various interrupt information with respect to the correct information collection / embedding control unit 884 of the execution control unit 880. That is, normally, an area of a predetermined size is secured as the correct answer area, and correct answer information is written. However, when there is a space in the area, the address automatic setting unit 851 closes the area and incorporates the correct answer information.
(7) Setting of initial processing unit for test function unit
FIG. 14 is a diagram for explaining the setting of the initial processing unit for each test function unit. In this embodiment, a test program area is selected by selecting and automatically reading out an initial processing unit prepared in advance corresponding to the test function. An embodiment in which the initial processing unit is automatically performed is shown.
[0078]
In the figure, 910 is a screen control unit, 920 is a screen information file, 932 is a test item control unit, 933 is an appearance frequency control unit, 934 is a command generation control unit, 940 is a setting control unit, 935 is a test command sequence, and 950 Denotes an execution control unit, and the configuration / configuration of the screen control unit 910, the screen information file 920, the test item control unit 932, the appearance frequency control unit 933, the command generation control unit 934, the test command sequence 935, and the execution control unit 950 The operation is basically the same as that shown in FIGS.
[0079]
Values specified by the manual operation 911 specified by the test functions 1 to n of the screen control unit 910
Are set to the test function 1 to n designated value 921 of the screen information file 920.
Based on the set test function 1 to n designation value 921, the setting control unit 940 selects the initial processing units A to Z corresponding to the test function from the processing program 941, and the initial processing of the test program 956 of the execution control unit 950 Store in the department.
(8) Automatic call of screen information file
FIG. 15 is a diagram for explaining automatic calling of the screen information file. In this embodiment, the setting address, the address range, etc. It shows a case where data specifying the configuration of the test program is automatically read.
[0080]
In the figure, reference numeral 110 denotes a screen control unit, 120 denotes a screen information file, and 130 denotes an automatic call control unit. Although the other configurations of the test program automatic generation system are not shown in FIG. The configuration / operation of the control unit 110, the screen information file 120, and other parts are basically the same as those shown in FIGS.
[0081]
The test functions 1 to n specified manual operation 111 of the screen control unit 110, the command types 1 to n, and the values specified by the n specified manual operation 112 are used as the test functions 1 to n specified value 121 and the command types 1 to 1 of the screen information file 120. n is set to the specified value 122.
The automatic call control unit 130 selects and calls the screen information files A, B,... 132 by the determination unit 131 based on the set test functions 1 to n specified value 121 and the instruction types 1 to n specified value 122. Then, the screen information file call setting control unit 133 registers and displays the screen information file in a predetermined area.
[0082]
A test program is automatically generated using the selected information as described with reference to FIGS.
[0083]
【The invention's effect】
As described above, the present invention can obtain the following effects.
(1) By specifying the function to be tested and the instruction type, setting the appearance frequency according to the specified function and instruction type, and generating the instruction, the special instruction type and the specified function are targeted. It is possible to generate a command to be tested.
[0084]
Further, by analyzing correct answer information for each function and incorporating it into the test program, a test program corresponding to the function can be automatically generated.
In addition, since a control means specializing instruction generation for each function is provided, it is possible to generate special instructions such as approximating the operand part, and automatic test programs for register interference tests, operand interference tests, etc. Generation is possible.
(2) The name of the program under test can be assigned from the number assigned to the function and the number assigned to the instruction type, and by setting the number of programs to be tested to be generated, Program name setting can be automated.
(3) Since the initial value (seed value) can be set to an automatically set value or an arbitrary value, the test program generated from the automatically set seed value can be set to the initial value (seed value). ) Can be regenerated by setting it to an arbitrary value, and the test efficiency can be improved.
(4) The setting of the instruction ID (number associated with the instruction to be tested) can be set to a random value or a specified value, and the intended instruction ID can be set in addition to random generation. Improvements can be made.
(5) Since the number of instructions to be tested can be specified, if the test time is short, the number of instructions to be tested should be reduced, and if the test time is long, the number of instructions to be tested should be set to It is possible to generate an instruction to be tested corresponding to a test condition such as enlarging, thereby improving test efficiency.
(6) Set the initial address and area range of the initial processing section, interrupt table, address space table, access data area, instruction generation area, correct information area (execution result storage area) constituting the program under test, Since the access range for the operand address of the access instruction or branch instruction can be specified, it is possible to change the configuration of the generated program under test and automatically generate a test program corresponding to the test conditions. It becomes possible.
(7) An access / branch instruction having an instruction access range / branch range as a random or fixed range can be generated. Therefore, it is possible to generate a test program according to the test conditions, and by setting the access range of the access instruction to be fixed, it is possible to set the operand address of the instruction under test to a fixed address, When executing the instruction under test, it is possible to perform a test for improving the hit rate for the TLB (address translation buffer).
(8) Since the setting position to be incorporated in the program under test can be automatically changed according to the size of the correct answer information (execution result), even in the case of special execution result information, the setting can be made without exceeding the area. This makes it possible to improve the development efficiency of the test program.
(9) Since it is possible to control the number of check point instructions to be inserted into the instruction sequence to be tested and the setting location of the check point instructions, it is possible to generate a test program that performs rough checks and detailed checks. Tests with improved test accuracy are possible.
(10) The initial processing unit of the program to be tested can be automatically read for each function, and a test program corresponding to the function can be automatically generated.
(11) The program under test such as the start position of the processing unit, table, instruction generation area, and / or their ranges, etc., by specifying the operation screen for specifying the test function, instruction type, etc. It is possible to automatically read out the operation screen in which the data that defines the configuration of data is set and automatically generate a test program corresponding to those specified values, thus improving the operability of the test program automatic generation system Can do.
[Brief description of the drawings]
FIG. 1 is a diagram (part 1) illustrating the principle of the present invention.
FIG. 2 is a principle diagram (part 2) of the present invention.
FIG. 3 is a principle diagram (part 3) of the present invention.
FIG. 4 is a diagram for explaining test generation by function designation and instruction type designation;
FIG. 5 is a diagram for explaining test generation by function designation and instruction type designation;
FIG. 6 is a diagram illustrating instruction generation in an instruction generation control unit.
FIG. 7 is a diagram for explaining specialized control of a generation instruction.
FIG. 8 is a diagram illustrating details of a specialization control unit.
FIG. 9 is a diagram for explaining setting of a program name.
FIG. 10 is a diagram illustrating setting of an initial value (seed value).
FIG. 11 is a diagram illustrating instruction ID switching control.
FIG. 12 is a diagram for explaining test generation based on input designation of a program configuration;
FIG. 13 is a diagram for explaining test generation by input designation of a program configuration;
FIG. 14 is a diagram for explaining automatic setting of an initial processing unit for each functional unit;
FIG. 15 is a diagram illustrating automatic calling of a screen information file.
FIG. 16 is a diagram illustrating test generation by specifying a conventional test function.
FIG. 17 is a diagram illustrating setting of a conventional test program name.
FIG. 18 is a diagram illustrating setting of a conventional initial value (seed value).
FIG. 19 is a diagram illustrating program generation based on a conventional instruction ID.
[Explanation of symbols]
110, 210, 510, 610, 710, 810, 910
Screen controller
120, 220, 520, 620, 720, 820, 920
Screen information file
121 221 521 921 Test function 1 to n specified value
122 222 522 Instruction type 1 to n specified value
130 Automatic call controller
131 322 determination unit
132 Screen information files A, B, ...
133 Screen information file call setting control unit
230 531 632 832 932 Test item control unit
231 Test function
232 instruction type
233 Join processing unit
234 Join table
240 320 532 633 750 833 933
Appearance frequency controller
241 Appearance frequency table
250 340 534 640 760 860 934
Instruction generation control unit
251 Instruction generation table
252 344 Generation command setting part
260 535 650 770 870 935 Test instruction sequence
261 Instructions 1 to n
270 550 660 880 780 950 Execution control unit
271 551 661 781 881 951 Generated instruction embedded control unit 272 552 662 782 882 952 Generated instruction execution control unit
273 553 663 783 883 953 Soft simulator
274 554 884 784 884 Correct information collection / embedding control unit
275 557 665 785 885 956 test program
311 411 631 743 831 Pseudorandom number generator
330 Specialized Control Unit
321 Test items 11 to nn control unit
323 Appearance frequency table for tests 11 to nn
341 decoder
343 Generated data of az instructions
421 Test items 11 to nn control unit
433 Instruction-specific AND data
434 Instruction-specific OR data
431 random number
523 Instruction ID mode
524 Number of test programs
540 Program name setting control unit
541 Number setting part
543 End counter
544 registers
545 Program number setting part
546 Next Generation Repeat Control Unit
612 switching control unit
613 timer
621 Initial value (seed)
721 Instruction ID mode value
731 Mode switching unit
741 Serial ID setting controller
742 Instruction ID area
744 Instruction ID fetch control unit
834 Generated instruction counter
835 Checkpoint counter
841 Start address setting control section
842 Access range change section
843 Branch range change part
844 Random number setting register
822 Initial processing part address
823 Interrupt table address
824 Address space table address
825 Correct information address and range value
826 Access data address and range value
827 Test command setting address and range value
828 Number of check points
829 Number of generated instructions
Address 851 automatic setting section
940 Setting control unit

Claims (8)

被試験対象の機能を指定する機能指定手段と、被試験対象の命令タイプを指定する命令タイプ指定手段と、
被試験対象プログラムの初期処理部の先頭番地を任意に設定する第1の設定手段と、
割込みテーブルの先頭番地を任意に設定する第2の設定手段と、
アドレス空間テーブルの先頭番地を任意に設定する第3の設定手段と、
指定された機能と指定された命令タイプとを結合する結合制御手段と、上記結合制御手段の出力に基づき、上記指定された命令タイプの命令を選択できるように命令の出現頻度を設定する出現頻度設定手段とを備え、上記出現頻度設定手段により設定された命令と、命令に対応したオペランドの値、レジスタ番号の値と、上記第1、第2、第3の設定手段の指定に従い、被試験対象の命令を生成する命令生成手段と、
上記命令生成手段により生成された被試験命令列をソフトシミュレータに実行させ、実行した結果を正解情報として被試験対象プログラムに組込むとともに、上記第1、第2、第3の設定手段の指定に従って初期処理部、テーブル等を、被試験対象プログラムに組み込む命令実行/実行結果組込み制御手段とを有し、被試験対象の試験を行うテストプログラムを自動的に生成することを特徴とするテストプログラム自動生成システム。
A function specifying means for specifying the function under test; an instruction type specifying means for specifying the instruction type under test;
First setting means for arbitrarily setting the start address of the initial processing section of the program under test;
A second setting means for arbitrarily setting the start address of the interrupt table;
A third setting means for arbitrarily setting the head address of the address space table;
An appearance frequency that sets the appearance frequency of an instruction so that an instruction of the specified instruction type can be selected based on an output of the connection control means that combines the specified function and the specified instruction type, and the output of the connection control means And a command to be tested in accordance with the instruction set by the appearance frequency setting unit, the value of the operand corresponding to the command, the value of the register number, and the designation of the first, second, and third setting units. Instruction generation means for generating a target instruction;
The instruction sequence generated by the instruction generation unit is caused to be executed by a software simulator, and the execution result is incorporated into the program under test as correct answer information and is initialized according to the designation of the first, second, and third setting units. Automatic test program generation characterized by having a command execution / execution result built-in control means for incorporating a processing unit, table, etc. into the program under test, and automatically generating a test program for performing the test of the test target system.
被試験対象プログラムのアクセス・データ域の先頭番地を設定する第1の設定手段と、アクセス・データ域の範囲を設定する第2の設定手段と、命令生成域の先頭番地を設定する第3の設定手段と、命令生成域の範囲を設定する第4の設定手段と、正解情報格納域の先頭番地を設定する第5の設定手段と、正解情報格納域の範囲を設定する第6の設定手段とを備え
前記命令生成手段は、上記第1、第2、第3、第4、第5、第6の設定手段の設定位置に従い、被試験対象の命令を生成し、
前記命令実行/実行結果組込み制御手段は、命令および前記正解情報等を、上記第1、第2、第3、第4、第5、第6の設定手段の設定位置に従って被試験対象プログラムに組込む
ことを特徴とする請求項1のテストプログラム自動生成システム。
First setting means for setting the start address of the access data area of the program under test, second setting means for setting the range of the access data area, and third setting means for setting the start address of the instruction generation area Setting means; fourth setting means for setting the range of the instruction generation area; fifth setting means for setting the start address of the correct information storage area; and sixth setting means for setting the range of the correct information storage area. equipped with a door,
The command generating means generates a command to be tested according to the setting positions of the first, second, third, fourth, fifth, and sixth setting means,
The instruction execution / execution result built-in control means incorporates the instruction and the correct answer information into the program under test according to the setting positions of the first, second, third, fourth, fifth, and sixth setting means. The test program automatic generation system according to claim 1.
被試験対象プログラムのアクセスデータ域を任意に設定する第1の設定手段と、
被試験対象のアクセス命令に対するアクセス範囲を設定する第2の設定手段とを備え前記命令生成手段は、上記第1、第2の設定手段による指定の範囲で、上記指定された機能と指定された命令タイプに基づき、被試験対象のアクセス命令を生成する
ことを特徴とする請求項1のテストプログラム自動生成システム。
First setting means for arbitrarily setting an access data area of the program under test;
And a second setting means for setting the access range to the access instruction under test, the instruction generating means, the first, in the range specified by the second setting means, designated as the specified functions 2. The test program automatic generation system according to claim 1, wherein an access instruction to be tested is generated based on the instruction type.
被試験対象命令の分岐命令に対する分岐範囲を指定する分岐範囲指定手段を備え
前記命令生成手段は、上記分岐範囲指定手段による指定の分岐範囲で、上記指定された機能と指定された命令タイプに基づき、被試験対象の分岐命令を生成する
ことを特徴とする請求項1のテストプログラム自動生成システム。
Comprising a branching range designating means for designating a branch range for the branch instruction under test instruction,
The instruction generation unit generates the branch instruction to be tested based on the specified function and the specified instruction type in the branch range specified by the branch range specifying unit. Automatic test program generation system.
被試験対象プログラムのアクセスデータ域を任意に設定する第1の設定手段と、
被試験対象のアクセス命令に対するアクセス範囲を設定する第2の設定手段と、
被試験対象命令の分岐命令に対する分岐範囲を指定する第3の設定手段と、
生成される被試験対象の命令に対し範囲指定をランダムな値に設定する第4の設定手段と、
範囲指定を固定の値に設定する第5の設定手段と、
該第4、第5の設定手段の切替え手段とを備え、
前記命令生成手段は、上記第1、第2、第3の設定手段による指定の範囲で、被試験対象のアクセス/分岐命令を生成し、上記切り替え手段により上記第4、第5の設定手段を切り替え、命令のアクセス範囲/分岐範囲をランダムもしくは固定の範囲とする
ことを特徴とする請求項1のテストプログラム自動生成システム。
First setting means for arbitrarily setting an access data area of the program under test;
Second setting means for setting an access range for an access instruction to be tested;
A third setting means for designating a branch range for the branch instruction of the instruction under test;
A fourth setting means for setting the range designation to a random value for the generated instruction to be tested;
A fifth setting means for setting the range designation to a fixed value;
Switching means for the fourth and fifth setting means,
The instruction generation means generates an access / branch instruction to be tested within a range specified by the first, second, and third setting means, and the switching means changes the fourth and fifth setting means. 2. The test program automatic generation system according to claim 1, wherein the switching and instruction access range / branch range is set to a random or fixed range.
実行した結果を得られた正解情報の大きさに従って、被試験対象プログラムに組み込む設定位置を自動的に変化させる制御手段を有する
ことを特徴とする請求項1のテストプログラム自動生成システム。
2. The test program automatic generation system according to claim 1, further comprising control means for automatically changing a setting position to be incorporated in the program under test according to the size of correct answer information obtained as a result of execution .
被試験対象の命令列に挿入するチェック・ポイント用命令の数値を設定する設定手段と、上記チェック・ポイント数と被試験命令数から、チェック・ポイント用命令の設定箇所を得る設定箇所取得手段とを備え、
前記命令生成手段は、上記設定箇所取得手段により得られたチェック・ポイント用命令の設定箇所に基づき、被試験対象の命令を生成する
ことを特徴とする請求項1のテストプログラム自動生成システム。
Setting means for setting the numerical value of the check point instruction to be inserted into the instruction sequence to be tested, and setting position obtaining means for obtaining the setting position of the check point instruction from the number of check points and the number of instructions to be tested With
2. The test program automatic generation system according to claim 1, wherein the instruction generation unit generates an instruction to be tested based on a set point of the check point instruction obtained by the set point acquisition unit .
被試験対象の各機能毎に被試験対象プログラムの初期処理部を設定し格納する設定制御手段を備え、
前記命令実行/実行結果組込み制御手段は、前記機能指定手段により指定された被試験対象の機能に応じて上記設定制御手段により格納された初期処理部を自動的に読み出し被試験対象プログラムに組み込む
ことを特徴とする請求項1のテストプログラム自動生成システム。
A setting control means for setting and storing an initial processing unit of a program under test for each function under test ;
The instruction execution / execution result incorporation control means automatically reads the initial processing unit stored by the setting control means in accordance with the function to be tested designated by the function designation means and incorporates it into the program to be tested. The test program automatic generation system according to claim 1.
JP2003176621A 2003-06-20 2003-06-20 Automatic test program generation system Expired - Fee Related JP3838998B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003176621A JP3838998B2 (en) 2003-06-20 2003-06-20 Automatic test program generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003176621A JP3838998B2 (en) 2003-06-20 2003-06-20 Automatic test program generation system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP14307095A Division JP3466775B2 (en) 1995-06-09 1995-06-09 Test program automatic generation system

Publications (2)

Publication Number Publication Date
JP2003330752A JP2003330752A (en) 2003-11-21
JP3838998B2 true JP3838998B2 (en) 2006-10-25

Family

ID=29707584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003176621A Expired - Fee Related JP3838998B2 (en) 2003-06-20 2003-06-20 Automatic test program generation system

Country Status (1)

Country Link
JP (1) JP3838998B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100405324C (en) * 2006-05-12 2008-07-23 中国科学院计算技术研究所 Method for realizing kernel-mode programe verification in user-mode random verification of microprocessor

Also Published As

Publication number Publication date
JP2003330752A (en) 2003-11-21

Similar Documents

Publication Publication Date Title
US5572666A (en) System and method for generating pseudo-random instructions for design verification
US6009509A (en) Method and system for the temporary designation and utilization of a plurality of physical registers as a stack
WO2002048887A2 (en) Single-step processing
JPH05505695A (en) An improved software debugging system and method specifically for debugging code within a multi-architecture environment.
US7302380B2 (en) Simulation apparatus, method and program
CA2479931A1 (en) System, method and computer program product for generating a shader program
WO2010076139A1 (en) Dynamic point and extend user interface
JP4202244B2 (en) VLIW DSP and method of operating the same
CN113688046A (en) Large-scale use case generation method for processor simulation verification
JP3838999B2 (en) Automatic test program generation system
JP3838998B2 (en) Automatic test program generation system
JP3466775B2 (en) Test program automatic generation system
JP2551167B2 (en) Microcomputer
GB2299493A (en) Digital audio mixing console
US7996824B2 (en) Benchmark synthesis using workload statistics
JP2020523693A (en) Emulation of a target system using a JIT compiler and bypassing translation of selected target code blocks
CN101819608B (en) Device and method for accelerating instruction fetch in microprocessor instruction-level random verification
JP2021184246A (en) Instruction conversion support program, instruction conversion support method and information processing device
JP3174681B2 (en) Testing equipment for information processing equipment
JP3463331B2 (en) Menu selection method
JP3461185B2 (en) Method and apparatus for registering source code line number to load module
JP2000293394A (en) Processor with bist function
JP2005115619A (en) Program debugger
JP2885197B2 (en) Arithmetic processing device and arithmetic processing method
JP2003256100A (en) Information processor, application starting method, application starting program and computer readable recording medium for recording application starting program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051115

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060116

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060801

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060801

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090811

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100811

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110811

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120811

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120811

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130811

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees