UNH-IOL Reservation 一致性测试用例【7】- 清除Reservation

Reservation 系列导航

UNH-IOL Reservation 一致性测试用例【1】- Reservation Report 命令验证
UNH-IOL Reservation 一致性测试用例【2】- Reservation注册
UNH-IOL Reservation 一致性测试用例【3】- 取消注册
UNH-IOL Reservation 一致性测试用例【4】- Reservation Acquire 验证
UNH-IOL Reservation 一致性测试用例【5】- Reservation Release
UNH-IOL Reservation 一致性测试用例【6】- 抢占 Reservation
UNH-IOL Reservation 一致性测试用例【7】- 清除Reservation
UNH-IOL Reservation 一致性测试用例【8】- 在不同 Reservation Types 下的命令行为
UNH-IOL Reservation 一致性测试用例【9】- Reservation Notification Log Page(LID 0x80)

Test 7.7 -- Clearing a Reservation (M, OF-FYI)

作为 Registrant 的 Host 可以通过执行一个 Reservation Release 命令来清除 reservation(强制解除对 namespace 的 reservation,并取消对所有 Registrants 的注册),其中 Reservation Release Action (RRELA) 字段设为 001b (Clear),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key

清除 reservation 时,会发生以下原子操作:

  1. 释放 namespace 上的保留
  2. 所有 registrants 都从 namespace 中注销

Case 1: Basic Operation with Reservation Release Command (M, OF-FYI)

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation
  2. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 active namespace:
      1. Host 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 namespace 的 registrant。
      2. Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前的 reservation key,并将 Reservation Type (RTYPE) 字段设为支持的 reservation type,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. Host 发送 Reservation Release 命令来清除 reservation,其中 Reservation Release Action (RRELA) 字段设为 001b (Clear),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. Host 向 Controller 发送 Reservation Report 命令。
        对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

在 Reservation Report 完成后,检查 Reservation Status data structure, host 成功从该 namespace 取消注册,并不再持有 reservation

注意事项

在支持NVMe 2.0 或以上的版本的 driver 中,当要设置 Host Identifier 时,如果它在测试开始时是非零值,set feature 将被 abort,Status Code 为 Command Sequence Error

Case 2: Error Conditions (M, OF-FYI)

如果 CRKEY 值与 Host 向 namespace 注册时使用的 CRKEY 值不匹配,则应终止命令,状态为 Reservation Conflict。 Host 可通过将命令中的 Ignore Existing Key(IEKEY) 位置为 "1",在不考虑当前 reservation key 值的情况下清除 reservation。

果 Host 不是 Registrant,则应终止该命令,并显示 Reservation Conflict 状态。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation
  2. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 active namespace:
      1. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),并提供一个随机的 reservation key 给 Current Reservation Key (CRKEY)。
      2. Host 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 namespace 的 registrant。
      3. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),并提供一个不是 Host 当前的 reservation key 给 Current Reservation Key (CRKEY)。
      4. Host 向 Controller 发送 Reservation Report 命令。
      5. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),提供一个不是 Host 当前的 reservation key 给 Current Reservation Key (CRKEY),将 IEKEY 置为 1。
      6. Host 向 Controller 发送 Reservation Report 命令。

预期结果

  1. 2.2.1 的 Reservation Release 命令失败,返回状态 Reservation Conflict
  2. 2.2.3 的 Reservation Release 命令失败,返回状态 Reservation Conflict
  3. 2.2.4 Reservation Report 返回的 Reservation Status data structure 表明:Host 依然是该 namespace 的 registrant
  4. 2.2.6 Reservation Report 返回的 Reservation Status data structure 表明:Host 不再是该 namespace 的 registrant,已成功取消注册

注意事项

  1. 在支持NVMe 2.0 或以上的版本的 driver 中,当要设置 Host Identifier 时,如果它在测试开始时是非零值,set feature 将被 abort,Status Code 为 Command Sequence Error
  2. 目前尚未确定进行此项检测的可靠方法。因此,这项测试不应纳入任何行业批准的一致性认定中。
相关推荐
5G行业应用11 分钟前
【赠书福利,回馈公号读者】《智慧城市与智能网联汽车,融合创新发展之路》
人工智能·汽车·智慧城市
测试老哥11 小时前
Python+Selenium实现自动化测试
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例
江苏世纪龙科技13 小时前
【世纪龙科技】新能源汽车结构原理教学软件-几何G6
汽车
湖南群狼调研15 小时前
湖南群狼市场调查——专注汽车销售服务深度评测
汽车·满意度调查·神秘顾客·问卷调查公司·汽车暗访调查·市场调查·线下门店暗访
测试老哥18 小时前
软件测试之单元测试
自动化测试·软件测试·python·测试工具·职场和发展·单元测试·测试用例
测试199820 小时前
软件测试之压力测试总结
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·压力测试
LONGZETECH1 天前
【龙泽科技】新能源汽车维护与动力蓄电池检测仿真教学软件【吉利几何G6】
人工智能·科技·汽车·汽车仿真教学软件·汽车教学软件
F133168929571 天前
WD0407 40V 7A 超级肖特基二极管,应用于开关汽车工业控制
stm32·单片机·嵌入式硬件·汽车·51单片机
ykjhr_3d1 天前
3D 演示动画在汽车培训与教育领域中的应用
3d·汽车
车载测试工程师1 天前
汽车功能安全-嵌入式软件测试(软件合格性测试)【目的、验证输入、集成&验证要求】11
功能测试·网络协议·测试工具·安全·车载系统·汽车·测试覆盖率