UNH-IOL Reservation 一致性测试用例【8】- 在不同 Reservation Types 下的命令行为

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.8 -- Command Behavior with Different Reservation Types (M, OF-FYI)

NVMe 支持 6 种 Reservations:

  • Write Exclusive
  • Exclusive Access
  • Write Exclusive - Registrants Only
  • Exclusive Access - Registrants Only
  • Write Exclusive - All Registrants
  • Exclusive Access - All Registrants

这些 reservation 类型之间的区别在于:被排除的访问类型(即 writes 或 all accesses)、registrants 是否具有与 reservation holder 相同的访问权限,以及 registrants 是否也被视为 reservation holder。
就保留类型而言,以下命令被视为 NVM Read Command Group:

  • Read
  • Compare
  • Security Receive

以下命令被视为 NVM Write Command Group:

  • Write
  • Write Uncorrectable
  • Dataset Management
  • Flush
  • Format NVM
  • Namespace Attachment
  • Namespace Management
  • Security Send

Case 1: Write Exclusive (M, OF-FYI) Dual Port Devices Only

Write Exclusive reservation 禁止 registration holder 以外的任何 host 从 NVM Write Command Group 中发出命令。任何 Host 仍可执行 NVM Read Command Group 的任何命令。

该测试要求 NVM Subsystem 中至少有两个具有 shared namespace 的控制器。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. NVMe Host 1 向 Controller 1 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
  3. NVMe Host 2 向 Controller 2 发出 Set Features Host Identifier, 为该 Controller 注册一个不同于 Host 1 的 Host Identifier
  4. Host 1 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 1 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
  5. Host 1 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 1 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 Write Exclusive,以便 host 1 在 namespace 获取该 reservation 类型的 reservation
  6. 所有 Host 向 controller 发送上述 NVM Read Command Group 中的每条命令
  7. 所有 Host 向 controller 发送上述 NVM Write Command Group 中的每条命令
  8. Host 2 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 2 提供 reservation key,以使 host 成为该 shared namespace 的 registrant
  9. Host 2 向各自的 controller 发送上述 NVM Read Command Group 中的每条命令
  10. Host 2 向各自的 controller 发送上述 NVM Write Command Group 中的每条命令
  11. 对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

  1. 在每个命令完成后,控制器向相关的 Completion Queue 发布一个 completion queue entry,表明该命令的状态
  2. Host 1 在步骤 6,7 的命令成功
  3. Host 2 在步骤 6,9 的命令成功,步骤 7,10 的命令失败,返回状态 Reservation Conflict

Case 2: Exclusive Access (M, OF-FYI) Dual Port Devices Only

Exclusive Access reservation 禁止 registration holder 以外的任何 host 从 NVM Write Command Group 或 NVM Read Command Group 中发出命令。

该测试要求 NVM Subsystem 中至少有两个具有 shared namespace 的控制器。

测试步骤 1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports 2. NVMe Host 1 向 Controller 1 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier 3. NVMe Host 2 向 Controller 2 发出 Set Features Host Identifier, 为该 Controller 注册一个不同于 Host 1 的 Host Identifier 4. Host 1 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 1 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。 5. Host 1 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 1 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 Exclusive Access,以便 host 1 在 namespace 获取该 reservation 类型的 reservation 6. 所有 Host 向 controller 发送上述 NVM Read Command Group 中的每条命令 7. 所有 Host 向 controller 发送上述 NVM Write Command Group 中的每条命令 8. Host 2 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 2 提供 reservation key,以使 host 成为该 shared namespace 的 registrant 9. Host 2 向各自的 controller 发送上述 NVM Read Command Group 中的每条命令 10. Host 2 向各自的 controller 发送上述 NVM Write Command Group 中的每条命令 11. 对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear) #### 预期结果 1. 在每个命令完成后,控制器向相关的 Completion Queue 发布一个 completion queue entry,表明该命令的状态 2. Host 1 在步骤 6,7 的命令成功 3. Host 2 在步骤6,7, 9,10 的命令失败,返回状态 Reservation Conflict

Case 3: Write Exclusive - Registrants Only or Write Exclusive - All Registrants (M, OF-FYI) Dual Port Devices Only

Write Exclusive - Registrants Only 或 Write Exclusive - All Registrants reservation 不允许 namespace 的任何非注册者发 NVM Write Command Group 中的命令。所有 Host 仍可发 NVM Read Command Group 种的命令,namespace 的 registrants 仍可发 NVM Write Command Group 中的命令。

Write Exclusive - Registrants Only 和Write Exclusive - All Registrants reservation 类型的区别在于,Write Exclusive - All Registrants 类型的所有 registrants 也被视为 reservation holders。

该测试要求 NVM Subsystem 中至少有两个具有 shared namespace 的控制器。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. NVMe Host 1 向 Controller 1 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
  3. NVMe Host 2 向 Controller 2 发出 Set Features Host Identifier, 为该 Controller 注册一个不同于 Host 1 的 Host Identifier
  4. Host 1 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 1 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
  5. Host 1 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 1 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 Write Exclusive - Registrants Only 或 Write Exclusive - All Registrants,以便 host 1 在 namespace 获取该 reservation 类型的 reservation
  6. 所有 Host 向 controller 发送上述 NVM Read Command Group 中的每条命令
  7. 所有 Host 向 controller 发送上述 NVM Write Command Group 中的每条命令
  8. Host 2 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 2 提供 reservation key,以使 host 成为该 shared namespace 的 registrant
  9. Host 2 向各自的 controller 发送上述 NVM Read Command Group 中的每条命令
  10. Host 2 向各自的 controller 发送上述 NVM Write Command Group 中的每条命令
  11. 对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

  1. 在每个命令完成后,控制器向相关的 Completion Queue 发布一个 completion queue entry,表明该命令的状态
  2. Host 1 在步骤 6,7 的命令成功
  3. Host 2 在步骤 6 的命令成功,步骤 7 的命令失败,返回状态 Reservation Conflict
  4. Host 2 在步骤 9,10 的命令成功

Case 4: Exclusive Access - Registrants Only or Exclusive Access - All Registrants (M, OF-FYI) Dual Port Devices Only

Exclusive Access - Registrants Only 或 Exclusive Access - All Registrants reservation 不允许 namespace 的任何非注册者发 NVM Write Command Group 或 NVM Read Command Group 中的命令。Registrants 仍可发 NVM Read Command Group 和 NVM Write Command Group 中的命令。

Exclusive Access - Registrants Only 和 Exclusive Access - All Registrants reservation 类型的区别在于,Write Exclusive - All Registrants 类型的所有 registrants 也被视为 reservation holders。

该测试要求 NVM Subsystem 中至少有两个具有 shared namespace 的控制器。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. NVMe Host 1 向 Controller 1 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
  3. NVMe Host 2 向 Controller 2 发出 Set Features Host Identifier, 为该 Controller 注册一个不同于 Host 1 的 Host Identifier
  4. Host 1 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 1 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
  5. Host 1 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 1 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 Exclusive Access - Registrants Only 或 Exclusive Access - All Registrants,以便 host 1 在 namespace 获取该 reservation 类型的 reservation
  6. 所有 Host 向 controller 发送上述 NVM Read Command Group 中的每条命令
  7. 所有 Host 向 controller 发送上述 NVM Write Command Group 中的每条命令
  8. Host 2 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 2 提供 reservation key,以使 host 成为该 shared namespace 的 registrant
  9. Host 2 向各自的 controller 发送上述 NVM Read Command Group 中的每条命令
  10. Host 2 向各自的 controller 发送上述 NVM Write Command Group 中的每条命令
  11. 对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

  1. 在每个命令完成后,控制器向相关的 Completion Queue 发布一个 completion queue entry,表明该命令的状态
  2. Host 1 在步骤 6,7 的命令成功
  3. Host 2 在步骤 6 ,7 的命令失败,返回状态 Reservation Conflict
  4. Host 2 在步骤 9,10 的命令成功

注意事项

目前尚未确定进行此项检测的可靠方法。因此,这项测试不应纳入任何行业批准的一致性认定中。

相关推荐
葵野寺10 小时前
【个人项目】跑者天地—测试用例
测试用例
NewCarRen11 小时前
模型驱动的自动驾驶AI系统全生命周期安全保障
人工智能·安全·自动驾驶·汽车
王小王-12320 小时前
基于Python的二手车价格影响因素研究【多种机器学习对比、线性回归、MLP、SVR、LightGBM】
python·机器学习·汽车·二手车价格预测·二手车价格影响·汽车数据分析
中草药z1 天前
【测试】Bug+设计测试用例
功能测试·测试工具·测试用例·bug·压力测试·测试
Altair澳汰尔1 天前
行业分享丨SimSolid 在汽车零部件开发中应用的可行性调研及实践
汽车·仿真·cae·多物理场仿真·simsolid
@Aurora.2 天前
【接口自动化测试】---YAML、JSON Schema
selenium·单元测试·测试用例·压力测试·postman·ab测试·测试覆盖率
派可数据BI可视化3 天前
汽车流通行业4S门店生存性指标:零服吸收率
数据库·信息可视化·数据分析·汽车·商业智能bi
Century_Dragon4 天前
【世纪龙科技】数智重构车身实训-汽车车身测量虚拟实训软件
汽车
测试19984 天前
Pytest中实现自动生成测试用例脚本代码
自动化测试·软件测试·python·测试工具·测试用例·pytest·接口测试