




已阅读5页,还剩19页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
LinuxLinux 进程通信进程通信 测试规格说明书测试规格说明书 SY1306110SY1306110 琚午阳琚午阳 SY1306120SY1306120 童飞飞童飞飞 SY1306115SY1306115 李逍逍李逍逍 SY1306223SY1306223 常兵常兵 1 编写目的编写目的 1 2 测试团队构成测试团队构成 1 2 1 职责职责 1 2 2 职责划分职责划分 1 3 工作流程及规范工作流程及规范 1 3 1 计划与设计阶段计划与设计阶段 1 3 1 1 测试团队测试团队 1 3 1 2 编写测试计划文档编写测试计划文档 2 3 1 3 设计测试用例设计测试用例 2 3 1 4 测试需求用例表测试需求用例表 2 3 1 5 各模块测试需求用例设计各模块测试需求用例设计 3 3 2 实施测试阶段实施测试阶段 21 3 3 总结阶段总结阶段 21 测试规格说明书 1 1 1 编写目的编写目的 本文档主要明确了本次测试的主要内容和测试小组各成员的分工 并对测试用例进行 了初步的设计 测试技术和策略等问题不在本文档描述范围内 2 2 测试团队构成测试团队构成 2 12 1 职责职责 测试是软件开发过程中的重要组成部分 肩负着如下责任 编写合理的测试计划 并与需求分析相对应 编写覆盖率高的测试用例 针对测试需求进行相关测试技术的研究 认真仔细地实施测试工作 并提交测试报告 撰写工作进度日志 2 22 2 职责划分职责划分 成员成员相关主要责任相关主要责任 琚午阳 根据管道及有名管道相关需求及代码做测试需求分析 李逍逍 根据共享内存相关需求及代码做测试需求分析 童飞飞 根据消息队列相关需求及代码做测试需求分析 常兵 根据信号相关需求及代码做测试需求分析 琚午阳 李逍逍 童飞飞 常兵 撰写测试规格说明书 3 3 工作流程及规范工作流程及规范 3 13 1 计划与设计阶段计划与设计阶段 3 1 13 1 1 测试团队测试团队 本测试团队与需求分析团队成员相同 测试规格说明书 2 3 1 3 1 2 2 编写测试计划文档编写测试计划文档 需求分析文档确立后 测试组需要编写测试计划文档 为后续的测试工作提供直接的 指导 过程要点过程要点详细说明详细说明 输入条件项目需求文档建立 工作内容 根据项目的需求文档 按照测试计划文档模板编写测试计划 测试 计划中应该至少包括以下关键内容 根据已有的需求文档终稿 明确相应的测试用例 包括四大部 分的测试用例模块 具体设计各大模块的测试用例 设计完成后进行评审工作 根据评审后的测试用例编写测试代码 部署环境 具体测试各模块功能 记录测试数据及结果 结合需求文档终稿 对测试结果进行分析 完成整个测试需求文档 由评审组完成最终评审 测试计划编写完毕后 必须提交给项目组全体成员 并由项目组组 中各成员联合评审 退出标准 测试获得预期成果 测试由评审组评审通过 责任人测试团队 3 1 33 1 3 设计测试用例设计测试用例 在需求分析文档确立基线以后 测试组需要针对项目的测试需求编写测试用例 在实 际的测试中 测试用例将是唯一实施标准 在用例的编写过程中 具体的任务和责任人如 下 过程要点过程要点详细说明详细说明 输入条件测试需求明确 测试计划明确 工作内容根据每一步测试计划编写全部的测试用例 退出标准测试用例需要覆盖大部分测试需求 责任人测试组 3 1 43 1 4 测试需求用例表测试需求用例表 测试规格说明书 3 模块名称测试用例 CreateAndOpenPipe WriteDataToPipe ReadDataFromPipe ClosePipe CreateAndOpenNamedPipe WriteDataToNamedPipe ReadDataFromNamedPipe 管道与有名管道 CloseNamedPipe GetSharedMemory ReadSharedMemory WriteSharedMemory ControlSharedMemory 共享内存 ReleaseSharedMemory CreateNewMessageQueue OpenExistingMessageQueue SengMessage ReceiveMessage GetMessageQueueStatus SetMessageQueueProperties 消息队列 RemoveMessageQueue GenerateSignal RegisterSignal ShieldSignal ReadSignal CancleSignal RunFunction ManageShieldCollection ManageBlockCollection 信号 Use signal 3 1 53 1 5 各模块测试需求用例设计各模块测试需求用例设计 管道及有名管道管道及有名管道 TestTest CaseCase SpecificationSpecification NameCreateAndOpenPipe Brief Description The test specification aims to test the behavior when parent process and child process create and open a pipe PreconditionThe kernel is running The processes have relatives TesterNone DependencyNone Test SetupNameCreate parent process 测试规格说明书 4 DescriptionThis test setup aims to create the parent process in the test environment Steps 1The test system creates the parent process Basic Flow Test Setup Postcondition Test Oracle The parent process is created Steps 1The test system VALIDATES THAT the number of file descriptors the parent process uses is under the OS limit 2The test system VALIDATES THAT the OS limit on the total number of open files is not reached 3The parent process INVOKES API pipe to create a duplex communication channel 4The parent process INVOKES API fork to create its child process 5IF the pipe is used for parent child communication THEN 6The parent process and the child process INVOKES API close to close one ends of the communication channel respectively to make the channel unidirectional 7ELSEIF the pipe is used for brother processes communication THEN 8The child process A and the child process B INVOKES API close to close one ends of the communication channel respectively to make the channel unidirectional 9ENDIF Basic Flow Test Sequence Postcondition Test Oracle The pipe is created and opened RFS 1 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 2 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted 测试规格说明书 5 RFS 3 1The test system VALIDATES THAT the file descriptor Oracle Verification Flow Postcondition Test Oracle RFS 6 1The test system VALIDATES THAT the file descriptor of the end is not valid anymore Oracle Verification Flow Postcondition Test Oracle RFS 8 1The test system VALIDATES THAT the file descriptor of the end is not valid anymore Oracle Verification Flow Postcondition Test Oracle TestTest CaseCase SpecificationSpecification NameWriteDataToPipe Brief Description The test specification aims to test the behavior when process of writing message writes data to pipe PreconditionThe kernel is running The processes have relatives TesterNone DependencyNone NameCreateAndOpenPipeTest Setup DescriptionThis test setup aims to create and open a pipe in the test environment Steps 1INCLUDE TEST CASE SPECIFICATION CreateAndOpenPipe Basic Flow Test Setup Postcondition Test Oracle The pipe is created and opened Steps 1The process of writing message formats the message to a proper type 2The test system VALIDATES THAT the pipe buffer is unlocked 3The test system VALIDATES THAT the read end of the pipe is open 4The process of writing message locks the pipe buffer Basic Flow Test Sequence 5The process of writing message INVOKES API write to write message to the pipe by the 测试规格说明书 6 file descriptor of the write end 6The process of writing message unlocks the pipe buffer Postcondition Test Oracle Message is written to the pipe buffer RFS 2 1DO process of writing message is sleep UNTIL the system awakes the process of sending data in a proper time 2RESUME STEP 3 Specific Alternative Flows Test Sequence Postcondition Test Sequence The pipe buffer is unlocked RFS 3 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 5 1The test system VALIDATES THAT the message is completely and correctly written to the pipe buffer Oracle Verification Flow Postcondition Test Oracle TestTest CaseCase SpecificationSpecification NameReadDataFromPipe Brief Description The test specification aims to test the behavior when process of reading message reads message from pipe PreconditionThe kernel is running The processes have relatives TesterNone DependencyNone NameCreateAndOpenPipeTest Setup DescriptionThis test setup aims to create and open a pipe in the test environment Steps 1INCLUDE TEST CASE SPECIFICATION CreateAndOpenPipe Basic Flow Test Setup Postcondition Test Oracle The pipe is created and opened Test SetupNameWriteDataToPipe 测试规格说明书 7 DescriptionThis test setup aims to write data to the pipe in the test environment Steps 1INCLUDE TEST CASE SPECIFICATION WriteDataToPipe Basic Flow Test Setup Postcondition Test Oracle Message is written to the pipe buffer Steps 1The test system VALIDATES THAT the pipe buffer is unlocked 2The process of reading message locks the pipe buffer 3The process of reading message INVOKES API read to read message from the pipe buffer by the file descriptor of the read end 4The process of reading message unlocks the pipe buffer Basic Flow Test Sequence Postcondition Test Oracle The process of reading message successfully reads the message RFS 1 1DO process of reading message is sleep UNTIL the system awakes the process of sending data in a proper time 2RESUME STEP 2 Specific Alternative Flows Test Sequence Postcondition Test Sequence The pipe buffer is unlocked RFS 3 1The test system VALIDATES THAT the message is completely and correctly read Oracle Verification Flow Postcondition Test Oracle TestTest CaseCase SpecificationSpecification NameClosePipe Brief Description The test specification aims to test the behavior when process closes a pipe PreconditionThe kernel is running The processes have relatives TesterNone DependencyNone NameCreateAndOpenPipeTest Setup DescriptionThis test setup aims to create and open a pipe 测试规格说明书 8 in the test environment Steps 1INCLUDE TEST CASE SPECIFICATION CreateAndOpenPipe Basic Flow Test Setup Postcondition Test Oracle The pipe is created and opened Steps 1The test system VALIDATES THAT the file descriptor of the write end is valid 2The process of writing message INVOKES API close to close the write end and start waiting 3The test system VALIDATES THAT the file descriptor of the read end is valid 4The process of reading message reads all the message and INVOKES API close to close the read end 5The process of reading message awakes the process of writing message 6The process of reading message and the process of writing message release their resource of the pipe Basic Flow Test Sequence Postcondition Test Oracle The pipe is closed RFS 1 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 3 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 2 1The test system VALIDATES THAT the file descriptor of the end is not valid anymore Oracle Verification Flow Postcondition Test Oracle RFS 4Oracle Verification 1The test system VALIDATES THAT the file 测试规格说明书 9 descriptor of the end is not valid anymore Flow Postcondition Test Oracle 3 1 5 23 1 5 2 消息队列消息队列 1 1 获取消息队列 获取消息队列 syssys msgget keymsgget key t intt int msgflag msgflag 当创建一个新的消息队列 调用函数 newque 来创建和初始化 并且把新建队列的 1D 返回给调用者 对于已经存在的消息队列 提供一个键值 key 在全局消息队列描述符队 列 msgids entries 中 调用函数 ipc findkey 查找相关的索引 在返回消息队列的 ID 之前 要对调用者的参数和权限进行校验 在查询操作与校验之前 还必须对全局消息队 列自 旋锁 msg ids ary 上锁 TestTest CaseCase SpecificationSpecification NameCreateNewMessageQueue Brief Description The test specification aims to test the behavior when the sender process get a message queue PreconditionThe kernel is idle TesterNone DependencyNone NameCreate a sender processTest Setup DescriptionThis test setup aims to creates a sender process in the test environment Steps 1The test system creates a sender process Basic Flow Test Setup Postcondition Test Oracle The sender process is created Steps 1The test system VALIDATES THAT the number of file descriptors the parent process uses is under the OS limit 2The test system VALIDATES THAT the OS limit on the total number of open files is not reached 3DO 4The test system INVOKES API ipc findkey to check that the key value does not exists 5UNTIL return value 0 6The sender process INVOKES API msgget to create a private messsage queue 7The test system VALIDATES THAT the message queue identity descriptor 0 Basic Flow Test Sequence 8The test system INVOKES API ipcs to check the 测试规格说明书 10 message queue state 9The test system release the message queue memory and kill the sender process Postcondition Test Oracle The messsage queue is created RFS 1 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 2 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 4 1The test system VALIDATES THAT the key value queue is locked Oracle Verification Flow Postcondition Test Oracle RFS 7 1IF the message queue identity descriptor 1 THEN 2The message queue is failed to be created 3ELSE 4The test system returns an error to the tester 5ENDIF 6ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted TestTest CaseCase SpecificationSpecification NameOpenExistingMessageQueue Brief Description The test specification aims to test the behavior when the sender process open a existing message queue PreconditionThe kernel is idle TesterNone DependencyNone Test SetupNameCreate a sender process 测试规格说明书 11 DescriptionThis test setup aims to creates a sender process in the test environment Steps 1The test system creates a sender process Basic Flow Test Setup Postcondition Test Oracle The sender process is created Steps 1The test system VALIDATES THAT the number of file descriptors the parent process uses is under the OS limit 2The test system VALIDATES THAT the OS limit on the total number of open files is not reached 3DO 4The test system INVOKES API ipc findkey to check that the key value does not exists 5UNTIL return value 1 6The sender process INVOKES API msgget to open a existing messsage queue 7The test system VALIDATES THAT the message queue identity identity descriptor 0 8The test system INVOKES API ipcs to check the message queue state 9The test system release the message queue memory and kill the sender process Basic Flow Test Sequence Postcondition Test Oracle The existing messsage queue is open RFS 1 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 2 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 4 1The test system VALIDATES THAT the key value queue is locked Oracle Verification Flow Postcondition Test Oracle 测试规格说明书 12 RFS 7 1IF the message queue identity descriptor 1 THEN 2The message queue is failed to be created 3ELSE 4The test system returns an error to the tester 5ENDIF 6ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted 2 2 发送消息 发送消息 msgsnd intmsgsnd int msgid msgid structstruct msgbufmsgbuf msgp msgp size tsize t msgsz intmsgsz int msgflg msgflg sys msgsnd 接收的参数有消息队列的 1D msgid 指向缓冲区的指针 struct msg msg 类型 msgp 发送消息的大小 msgsz 说明等待或者不等待的标志 msgflg 向 msgid 代 表的消息队列发送一个消息 即将发送的消息存储在 msgp 指向的 msgbuf 结构中 如果在 接收消息等待的队列中有一个进程正在等待这个消息 消息则直接被传给接收的进程 接 收进程被唤醒 没有等待消息的进程 如果在消息等待队列中有足够的空间 消息被保存 在这个队列中 TestTest CaseCase SpecificationSpecification NameSendMessage Brief Description The test specification aims to test the behavior when the sender process write a message into the opening message queue PreconditionThe kernel is idle TesterNone DependencyNone NameCreate a sender processTest Setup DescriptionThis test setup aims to creates a sender process in the test environment Steps 1The test system creates a sender process Basic Flow Test Setup Postcondition Test Oracle The sender process is created NameCreate a message queueTest Setup DescriptionThis test setup aims to creates a new message queue in the test environment StepsBasic Flow Test Setup 1INCLUDE TEST CASE SPECIFICATION CreateNewMessageQueue 测试规格说明书 13 Postcondition Test Oracle The new message queue is created NameCreate a messageTest Setup DescriptionThis test setup aims to creates a new message in the test environment Steps 1Define a message struct variable 2The test system INVOKES API load msg to load the message into the message struct variable 3The message type is set with sender processs id Basic Flow Test Setup 4set the message length with specified value Steps 1The test system VALIDATES THAT the number of file descriptors the parent process uses is under the OS limit 2The test system VALIDATES THAT the OS limit on the total number of open files is not reached 3The test system locks the message queue with a spinlock 4The test system INVOKES API ipc checkid to check the sender process id 5The test system INVOKES API ipcperms to check the sender process access mode 6The test system INVOKES API msgctl to check the message queue space 7The test system INVOKES API msgsnd to write the message into the messsage queue 8The test system INVOKES API msgctl to update the message queue state 9The test system unlocks the message queue 10The test system release the message queue memory and kill the sender process Basic Flow Test Sequence Postcondition Test Oracle The sender process write the message into the specified message queue RFS 1 1The test system returns an error to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 2Specific Alternative 1The test system returns an error to the tester 测试规格说明书 14 2ABORT Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 4 1The test system VALIDATES THAT the sender process id is valid Oracle Verification Flow Postcondition Test Oracle RFS 5 1The test system VALIDATES THAT the sender process access mode is valid Oracle Verification Flow Postcondition Test Oracle RFS 6 1The test system VALIDATES THAT the message queue is not full Oracle Verification Flow Postcondition Test Oracle RFS 7 1The test system VALIDATES THAT return value 0 Oracle Verification FlowPostcondition Test Oracle 3 1 5 33 1 5 3 共享内存共享内存 进程获取共享内存模块测试用例 进程在将内享共存区映射到自己的虚拟空间之前 必须创建一个共享内存区或访问已创 建的共享内存区以获得该内存区的 ID 标识 shmid 系统调用 shmget 可以创建或访问一 个共享内存区 TestTest CaseCase SpecificationSpecification NameGetSharedMemory Brief Description The test specification aims to test the behavior when the process call for a shared memory PreconditionThe kernel is running normally The process is created TesterNone DependencyNone NameGet the shared memoryTest Setup DescriptionThis test setup aims to get a shared memory in the test environment Steps 1The test system creates the process 2The process has the key of the shared memory Basic Flow Test Setup PostconditionThe process is created 测试规格说明书 15 Test Oracle Steps IF the shared memory with specified key is not created before key IPC PRIVATE key 0 shmflg IPC CREAT on THEN 1The test system VALIDATES THAT the parameter size is not more than SHMMAX and not less than SHMMIN 2The test system VALIDATES THAT the available space for shared memory is not less than the specified shared memory s size 3The test system creates the new shared memory and set its default property ENDIF 4The test system VALIDATES THAT the shared memory s access attribute PROT NONE 5The process INVOKES API shmget to get the specified shared memory s id 6The kernel INVOKES API shmat to attach the shared memory MEANWHILE the process can get the shared memory space s address pointer to access it like the normal memory Basic Flow Test Sequence Postcondition Test Oracle The process get the shared memory s access right RFS 1 1The test system returns an error code EINVAL to the tester 2ABORT Specific Alternative Flows Test Sequence Postcondition Test Sequence The test is aborted RFS 2 1The test system returns an error code ENOSPC to the tester 2ABORT Specific Alter
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年陕西工商职业学院单招职业倾向性考试题库带答案
- 校庆策划工作总结
- 2025年西安高新科技职业学院单招职业倾向性测试题库新版
- 2025年柳州铁道职业技术学院单招职业适应性测试题库完整
- 捕鱼馆租赁合同
- 文创产品创业方案
- 2025年九州职业技术学院单招职业倾向性测试题库审定版
- 机关精准扶贫工作计划
- 河北省尚义县第一中学等校2024-2025学年高一下学期开学考试历史试题
- 尖晶石铁氧体纳米酶在即时检测中的应用
- 小型风力发电系统毕业设计
- 集团EHS管理体系考核细则
- 我是女生_青春期健康教育讲座
- 融资租赁有限公司全套管理制度汇编收藏
- 中班语言《如果我能飞》课件
- BS EN 1993-1-10-2005-全部译文
- 美国德克萨斯州驾驶考试模拟题及相关资料中英对照
- 【告知牌】有限空间作业安全告知牌及警示标志
- 400吨汽车吊性能表
- 特种设备现场安全监督检查记录(共1页)
- 煤矿四类材料回收复用的管理办法
评论
0/150
提交评论