JP2718028B2 - How to access the program test file - Google Patents

How to access the program test file

Info

Publication number
JP2718028B2
JP2718028B2 JP62084566A JP8456687A JP2718028B2 JP 2718028 B2 JP2718028 B2 JP 2718028B2 JP 62084566 A JP62084566 A JP 62084566A JP 8456687 A JP8456687 A JP 8456687A JP 2718028 B2 JP2718028 B2 JP 2718028B2
Authority
JP
Japan
Prior art keywords
file
program
data
test
block
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
JP62084566A
Other languages
Japanese (ja)
Other versions
JPS63250745A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP62084566A priority Critical patent/JP2718028B2/en
Publication of JPS63250745A publication Critical patent/JPS63250745A/en
Application granted granted Critical
Publication of JP2718028B2 publication Critical patent/JP2718028B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、計算システムのプログラムをテストするた
めのファイルをアクセスする方法に関し、特に実際の業
務で使用されるファイルを更新することなく、テスト用
のファイルをアクセスする方法に関するものである。 (従来の技術) 開発中のプログラムは、それに存在するバグのために
プログラムが異常終了となることがしばしば経験され
る。この場合に、そのプログラムがファイルを更新中で
あったときは、データの内容も破壊されることがある。 このために、従来方法による計算システムでは、ファ
イルを更新する応用プログラムをテストする際に、実際
の業務用ファイルと別にテスト用ファイルを作成し、こ
れによってテストを行なうのが通常であった。業務用フ
ァイルを使用するのであれば、業務の運用を妨げないよ
うに、開発中のプログラムのテストを夜間に行なった
り、ファイル破壊に備えてバックアップ用のコピーを取
らなければならない。 このようにテスト用ファイルによる場合は、これを作
成するための工数が掛かるのは勿論、テスト用ファイル
のために磁気ディスク等の容量も必要である。更に、テ
スト用ファイルは業務用のファイルよりデータ量が少な
く、データの内容も画一的になり、バグを完全に除去す
ることは困難である。 (発明が解決しようとするための問題点) 従来のプログラム・テスト・ファイルのアクセス方法
は、ファイル管理の機能を用い、業務用ファイルを更新
する場合に次のような問題点があった。 (イ)メモリ上のバッファを複数のプログラムが共有す
るので、テスト中のプログラムによりメモリ上でブロッ
クを更新した場合は、他のプログラムの処理がそのデー
タ(以下、汚れたデータと呼ぶ)により、誤りのあるも
のとなる。 (ロ)テスト中のプログラムが休止点設定サービスを発
行した場合は、ファイル上にも汚れたデータが書込まれ
てしまう。 本発明は、上述の従来技術が有する問題点を解決する
ために、業務用のプログラムの運用と並行して開発中の
プログラムの使用を可能にするプログラム・テスト・フ
ァイルのアクセス方法を提供することを目的とする。 (問題点を解決するための手段) 本発明は、プログラムのテストモードにおいて、テス
ト中のプログラムにより入出力バッファ上のデータブロ
ックを専有させて更新を行うと共に該専有データブロッ
クに対して他のプログラムによるアクセスを禁止し、該
データブロックの専有をテスト中のプログラムにより休
止点設定サービスが発行されるまで維持し、該休止点設
定サービスが発行された際は該データブロックの専有を
解除すると共に前記入出力バッファに内容無効の表示を
行って当該データブロックがファイルに出力されるのを
阻止するものである。 (作用) 本発明によれば、以上のようにプログラム・テスト・
ファイルのアクセス方法を構成したので、テスト・モー
ドの応用プログラムがデータ更新を行なっても、他のプ
ログラムがそのデータを参照すること、及びファイル上
に出力するのを禁止し、更にテスト・モードの応用プロ
グラムにあるバクによりその処理が異常終了となったと
きは、休止点設定処理が自動的に実行される。 (実施例) 第1図は本発明の一実施例をプログラムの処理レベル
で表わしたブロック図である。第1図において、1は応
用プログラム、2はテスト・モードか否かを示す応用プ
ログラム1内のモード指示部、3はファイル管理システ
ムであり、アクセス制御部4及びバッファ管理部5を備
え、応用プログラム1の入出力要求を装置に通知する機
能があり、また複数のプログラムにより管理される。 6はファイルであり、ファイル管理システム3及び入
出力バッファ・プール7に関連される。入出力バッファ
・プール7は、入出力実行時に動的に割付けられ、ファ
イル管理システム3により管理される。 いま、応用プログラム1から入出力要求が発行させる
と、アクセス制御部4はファイル6の何番目のブロック
に対する入出力要求かを解析して、その入出力要求をバ
ッファ管理部5に発行する。バッファ管理部5は、その
ブロックが以前にその応用プログラム1又は他の応用プ
ログラムによりアクセスされたために、入出力バッファ
・プール7に存在するのであれば、これをそのままアク
セス制御部4に渡す。 このようにして、ファイル6のアクセスを伴なうこと
なく、頻繁にアクセスされるブロック上のデータの入出
力管理をメモリ上でのみ行なうことにより、高速に処理
することができる。また、応用プログラム1の処理の切
れ目では、前記のように、メモリ上のバッファにより更
新が行なわれていたブロックを一斉にファイル6上に出
力し、停電によるメモリ上のデータ消滅に備える。この
機能を行なうサービスを以下、休止点サービスと呼ぶ。 次に、第2図に示す流れ図を参照して本発明において
実行される一連の処理の説明をする。応用プログラム1
がデータ更新サービス8を発行すると、データ更新サー
ビス9の処理を開始する。 まず、処理10により、ファイル管理システム3は入出
力バッファ・プール7を探索し、判断11により、当該ブ
ロックが入出力バッファ・プール7上に既に存在してい
るか否かを調べる。存在していないのであれば(NO)、
処理12によりそのブロックを当該プログラムにより専有
し、処理13によりバッファを確保し、処理16によりファ
イルからバッファへ当該ブロックを入力する。 判断11により、当該ブロックが入出力バッファ・プー
ル7上に存在する場合は(YES)、処理14により、その
ブロックを当該プログラムにより専有する。判断15によ
り内容が無効か否かを調べる。無効であれば、処理16に
よりファイルから当該ブロックを入力する。しかし、内
容が無効ではないとき、即ち他のプログラムにより既に
専有されていたときは、処理17に行き、開放されるまで
待機することになる。 次に、処理17により入出力バッファ・プール7のデー
タを更新する。判断18により応用プログラム1のモード
指示部2を参照し、テスト・モードでなければ(NO)、
処理19によりブロックの占有を解除して他のプログラム
からのアクセスを許容する。しかし、判断18によりテス
ト・モードであれば(YES)、ブロックを占有したまま
当該データ更新サービス9の一連の処理を終了し、点線
により示すように応用プログラム1に制御を戻す。 次に、応用プログラム1が処理の切れ目で休止点設定
サービス発行20を実行した場合について説明する。休止
点設定サービス発行21を開始すると、判断22により、フ
ァイル管理システム3は応用プログラム1のモード指示
部2を調べ、テスト・モードでなければ(NO)、処理21
により入出力バッファ・プール7上の更新済みデータ・
ブロックをファイル6へ出力する。テスト・モードであ
れば(YES)、処理24により当該プログラムがデータ更
新サービス8から引き続き専有しているブロックの内容
を無効化する。この処理24は、各バッファのバッファ管
理部5に内容無効の印を付けるだけなので、極めて、高
速に行なうことができる。ファイル管理システム3は、
処理24によりバッファの内容を無効にし、処理25により
ブロックの占有を解除する。これにより、他のプログラ
ムの当該ブロックのアクセスを許容する。 このブロックを次にアクセスしたプログラムは、入出
力バッファ・プール7上に存在してはいるが、内容が無
効すべきものになっているので、ファイル6から新らた
に当該ブロックを入力する。ファイル6のデータは、テ
スト中のプログラムが更新する前の内容になっているの
で、他のプログラムが汚れたデータを参照することはな
い。 (発明の効果) 以上、詳細に説明したように、本発明によれば、テス
ト・モードの応用プログラムがデータを更新しても、他
のプログラムが汚されたデータを参照するのを阻止で
き、またテスト・モードの応用プログラム自身にバグが
存在し、処理が異常終了したとしても、自動的に休止点
設定処理を行ない、全データ・ブロックに内容無効の印
を付け、ファイルを出力することもないので、データを
不用意に破壊するのを防止することができる。 また、本発明によれば、開発途中の応用プログラムに
業務用のファイルを用いることができるので、テストの
工数制限になるだけでなく、プログラムの品質向上に役
立つ効果も得られる。
Description: FIELD OF THE INVENTION The present invention relates to a method for accessing a file for testing a program of a computing system, and particularly to a method for updating a file used in actual work without updating a file used in actual work. It relates to a method of accessing a file for use. 2. Description of the Related Art Often, a program under development experiences an abnormal termination due to a bug present in the program. In this case, if the program is updating the file, the data content may be destroyed. For this reason, in the calculation system according to the conventional method, when testing an application program for updating a file, it is usual to create a test file separately from an actual business file and perform a test using the test file. If you use business files, you must test the program you are developing at night or make a backup copy in case the file is destroyed so that it does not interfere with your business operations. In the case of using a test file as described above, not only the man-hour for creating the test file but also the capacity of a magnetic disk or the like is required for the test file. Further, the test file has a smaller amount of data than the business file, the content of the data becomes uniform, and it is difficult to completely eliminate the bug. (Problems to be Solved by the Invention) The conventional method for accessing a program test file has the following problems when a business file is updated using a file management function. (B) Since a buffer on the memory is shared by a plurality of programs, when a program under test updates a block on the memory, the processing of another program is performed by the data (hereinafter referred to as dirty data). It will be erroneous. (B) When the program under test issues the pause point setting service, dirty data is also written on the file. An object of the present invention is to provide a method for accessing a program test file that enables the use of a program under development in parallel with the operation of a business program, in order to solve the above-mentioned problems of the prior art. With the goal. (Means for Solving the Problems) According to the present invention, in a test mode of a program, a program under test occupies a data block on an input / output buffer and updates the data block. , And the exclusive use of the data block is maintained until the pause point setting service is issued by the program under test. When the pause point setting service is issued, the exclusive use of the data block is released and the This is to display contents invalidity in the entry output buffer to prevent the data block from being output to a file. (Operation) According to the present invention, the program test
Since the file access method has been configured, even if the application program in the test mode updates the data, other programs are prohibited from referring to the data and outputting the data to the file. When the process is abnormally terminated by a bug in the application program, the pause point setting process is automatically executed. (Embodiment) FIG. 1 is a block diagram showing an embodiment of the present invention at a processing level of a program. In FIG. 1, 1 is an application program, 2 is a mode instruction unit in the application program 1 indicating whether or not a test mode is set, and 3 is a file management system, which includes an access control unit 4 and a buffer management unit 5, It has a function of notifying an apparatus of an input / output request of the program 1 and is managed by a plurality of programs. Reference numeral 6 denotes a file, which is associated with the file management system 3 and the input / output buffer pool 7. The I / O buffer pool 7 is dynamically allocated when executing I / O, and is managed by the file management system 3. Now, when an input / output request is issued from the application program 1, the access control unit 4 analyzes the input / output request to which block of the file 6, and issues the input / output request to the buffer management unit 5. If the block has been previously accessed by the application program 1 or another application program and exists in the input / output buffer pool 7, the buffer management unit 5 passes the block to the access control unit 4 as it is. In this way, high-speed processing can be performed by performing input / output management of data on frequently accessed blocks only in the memory without involving access to the file 6. Further, at the break of the processing of the application program 1, as described above, the blocks updated by the buffer on the memory are simultaneously output to the file 6 to prepare for the disappearance of the data on the memory due to the power failure. A service that performs this function is hereinafter referred to as a pause service. Next, a series of processes executed in the present invention will be described with reference to a flowchart shown in FIG. Application program 1
Issues the data update service 8, the processing of the data update service 9 is started. First, in process 10, the file management system 3 searches the I / O buffer pool 7, and in decision 11, checks whether the block already exists in the I / O buffer pool 7 or not. If not (NO),
At step 12, the block is occupied by the program, at step 13, a buffer is secured, and at step 16, the block is input from the file to the buffer. If it is determined that the block exists on the I / O buffer pool 7 (YES), the block is occupied by the program by the process 14. In decision 15, it is checked whether the content is invalid. If the block is invalid, the block is input from the file by the process 16. However, if the content is not invalid, that is, if it has already been occupied by another program, the process goes to step 17 and waits until it is released. Next, the data of the input / output buffer pool 7 is updated by the processing 17. According to the judgment 18, the mode instruction unit 2 of the application program 1 is referred to, and if it is not the test mode (NO),
In step 19, the occupation of the block is released to allow access from other programs. However, if it is determined that the test mode is the test mode (YES), a series of processing of the data update service 9 is terminated while occupying the block, and the control is returned to the application program 1 as indicated by the dotted line. Next, the case where the application program 1 executes the pause point setting service issue 20 at a break in processing will be described. When the pause point setting service issuance 21 is started, the file management system 3 checks the mode instruction unit 2 of the application program 1 according to the judgment 22, and if not in the test mode (NO), the process 21
Updated data on the I / O buffer pool 7
Output the block to file 6. If it is in the test mode (YES), the contents of the blocks that the program continues to occupy from the data update service 8 are invalidated by the processing 24. This process 24 can be performed at a very high speed because the buffer management unit 5 of each buffer is merely marked as invalid. The file management system 3
The contents of the buffer are invalidated by the processing 24, and the occupation of the block is released by the processing 25. This allows another program to access the block. The program that accessed this block next exists in the input / output buffer pool 7, but the contents are to be invalidated, so the block is newly input from the file 6. Since the data in the file 6 is the content before the program under test is updated, other programs do not refer to the dirty data. (Effects of the Invention) As described above in detail, according to the present invention, even if the application program in the test mode updates data, it is possible to prevent other programs from referring to the stained data, Even if there is a bug in the test mode application program itself and the processing ends abnormally, it is possible to automatically perform a pause point setting process, mark all data blocks as invalid, and output a file. Since there is no data, careless destruction of data can be prevented. Further, according to the present invention, since a business file can be used for an application program under development, not only the number of test steps is limited but also the effect of improving the quality of the program can be obtained.

【図面の簡単な説明】 第1図は本発明の一実施例によるプログラム・テスト・
ファイルのアクセス方法を示すプログラム構成図、第2
図は本発明によるプログラム・テスト・ファイルのアク
セス方法の処理を示す流れ図である。 3……ファイル管理システム、 6……ファイル、入出力バッファ・プール。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 shows a program test system according to an embodiment of the present invention.
Program configuration diagram showing file access method, second
FIG. 5 is a flowchart showing processing of a method for accessing a program test file according to the present invention. 3 ... file management system 6 ... file, input / output buffer pool

Claims (1)

(57)【特許請求の範囲】 1.プログラムのテストモードにおいてテスト中のプロ
グラムに入出力バッファ上のデータブロックを専有させ
て更新を行うと共に該専有データブロックに対して他の
プログラムによるアクセスを禁止し、該データブロック
の専有はテスト中のプログラムによって休止点設定サー
ビスが発行されるまで維持し、該休止点設定サービスが
発行された際は該データブロックの専有を解除すると共
に前記入出力バッファに内容無効の表示を行って当該デ
ータブロックがファイルに出力されるのを阻止すること
を特徴とするプログラム・テスト・ファイルのアクセス
方法。
(57) [Claims] In the test mode of the program, the program under test is occupied by the data block on the input / output buffer and updated, and access to the exclusive data block by another program is prohibited. The pause point setting service is maintained by the program until the pause point setting service is issued. When the pause point setting service is issued, the exclusive use of the data block is released and the contents of the data block are displayed in the input / output buffer so that the data block is invalid. A method for accessing a program test file, which comprises preventing output to a file.
JP62084566A 1987-04-08 1987-04-08 How to access the program test file Expired - Fee Related JP2718028B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62084566A JP2718028B2 (en) 1987-04-08 1987-04-08 How to access the program test file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62084566A JP2718028B2 (en) 1987-04-08 1987-04-08 How to access the program test file

Publications (2)

Publication Number Publication Date
JPS63250745A JPS63250745A (en) 1988-10-18
JP2718028B2 true JP2718028B2 (en) 1998-02-25

Family

ID=13834209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62084566A Expired - Fee Related JP2718028B2 (en) 1987-04-08 1987-04-08 How to access the program test file

Country Status (1)

Country Link
JP (1) JP2718028B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60254335A (en) * 1984-05-31 1985-12-16 Fujitsu Ltd Multiplex processing system in software test
JPH0679283B2 (en) * 1985-07-09 1994-10-05 富士通株式会社 Interruption processing control method

Also Published As

Publication number Publication date
JPS63250745A (en) 1988-10-18

Similar Documents

Publication Publication Date Title
JPH0430053B2 (en)
US5003468A (en) Guest machine execution control system for virutal machine system
JP2718028B2 (en) How to access the program test file
JP3381079B2 (en) Exclusive control system using cache memory
JPS6327733B2 (en)
JPS6049352B2 (en) data processing equipment
JPH06222916A (en) On-line real-time processor
JPS61184643A (en) Starting control system for virtual computer
JPS63311450A (en) Exclusive control system for file access
JP2587468B2 (en) Lock data setting device
JP3130798B2 (en) Bus transfer device
JP2864496B2 (en) Multi-processing computer
JP3517884B2 (en) Data processing device
JP3299361B2 (en) Multiprocessor system with shared memory
JPS6054691B2 (en) Memory protection method for information processing equipment
JP2561306B2 (en) Control module transfer method between program modules
JPH0567973B2 (en)
JPS6118224B2 (en)
JPS60215250A (en) Data processor
JPH0391055A (en) Method for setting hardware lock, hardware lock controller, method and device for detecting hardware lock
JPS62130442A (en) File subsystem
JPS61131125A (en) Information processing unit
JPH0772874B2 (en) Interrupt receiving device
JPH02206854A (en) Data processing system
JPH05324393A (en) Debugging system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees