UNH-IOL Reservation 一致性测试用例【9】- Reservation Notification Log Page(LID 0x80)

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.9 -- Reservation Notification Log Page (FYI, OF-FYI)

Reservation Notification log page 按发生时间顺序排列报告 reservation notification log pages(如果有)。每当 Controller 上的任何 namespace 发生未屏蔽的 reservation notification 时,都会创建一个新的 Reservation Notification log page,并添加到 reservation notifications 队列的末尾。Get Log Page Reservation Notification:

  • 返回一个 data buffer,其中包含一个 log page,该 log page 与 reservation notification 队列中最旧的 log page(即包含最低 Log Page Count 字段的 log page;考虑到环绕)相对应;
  • 从队列中删除该 Reservation Notification log page。

如果在发出 Get Log Page 命令时没有可用的 Reservation Notification log page 条目,则将返回一个空 log page(即 log page 中的所有字段均清为 0h)。

Case 1: Retrieve Log (FYI, OF-FYI)

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. 在 DUT 上配置两个 Hosts ( Controllers), 为这两个 hosts 创建一个 shared namespace。
  3. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 shared namespace:
      1. 至少两个 Hosts 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
      2. 一个是 registrant 的 Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 namespace 支持的 Write Exclusive 或 Exclusive Access,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. 相同的 Host 发送 Reservation Release 命令来清除 reservation,其中 Reservation Release Action (RRELA) 字段设为 000b (Release),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. 相同的 Host 向 Controller 发送 Reservation Report 命令。
  4. 执行 Reservation Release 命令,将所有现有 reservations 的 RRELA 字段设置为 001b(清除)。Reservation release 命令将生成 Reservation Notification。
  5. 第二次重复步骤 1-3。
  6. Get Reservation Notification Log Page

预期结果

验证 Reservation Notification Log Page 返回的内容:

  1. Log Page Count 为 2
  2. Log Page Type 为 2(Reservation Released)
  3. Number of Available Log Pages 为 1
  4. Namespace ID 正确

Case 2: Empty Log (FYI, OF-FYI)

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. 在 DUT 上配置两个 Hosts ( Controllers), 为这两个 hosts 创建一个 shared namespace。
  3. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 shared namespace:
      1. Hosts 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
      2. 一个是 registrant 的 Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 namespace 支持的 reservation 类型,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. 相同的 Host 发送 Reservation Release 命令来释放 reservation,其中 Reservation Release Action (RRELA) 字段设为 000b (Release),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. 相同的 Host 向 Controller 发送 Reservation Report 命令。
  4. 执行 Reservation Release 命令,将所有现有 reservations 的 RRELA 字段设置为 001b(清除)。Reservation release 命令将生成 Reservation Notification。
  5. Get Reservation Notification Log Page
  6. Get Reservation Notification Log Page

预期结果

验证第二笔get log page 返回全0字段

Case 3: Wrapped Log Count (FYI, OF-FYI)

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. 在 DUT 上配置两个 Hosts ( Controllers), 为这两个 hosts 创建一个 shared namespace。
  3. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 shared namespace:
      1. Hosts 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
      2. 一个是 registrant 的 Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 namespace 支持的 reservation 类型,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. 相同的 Host 发送 Reservation Release 命令来释放 reservation,其中 Reservation Release Action (RRELA) 字段设为 000b (Release),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. 相同的 Host 向 Controller 发送 Reservation Report 命令。
  4. 执行 Reservation Release 命令,将所有现有 reservations 的 RRELA 字段设置为 001b(清除)。Reservation release 命令将生成 Reservation Notification。
  5. 重复步骤 1-3 1000遍 直到出现 Reservation Notification Log Queue 环绕
  6. Get Reservation Notification Log Page

预期结果

如果 log page count 出现了环绕,下次增加会滚动至 1,否则就是正常增加。

相关推荐
程序员三藏7 小时前
如何使用Pytest进行测试?
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·pytest
孤独的追光者1 天前
论文阅读|汽车虚拟环绕音响系统设计与实现策略的比较研究
算法·汽车·音频·信号处理·数字信号处理
zhangfeng11331 天前
景观桥 涵洞 城门等遮挡物对汽车安全性的影响数学建模和计算方法,需要收集那些数据
数学建模·汽车
高工智能汽车1 天前
出圈or出局?AI汽车“急速驶来”,市场淘汰赛一触即发
人工智能·汽车
天天爱吃肉82181 天前
周立功汽车软件ZXDoc深度解析:新能源汽车开发新基建的破局之道
嵌入式硬件·架构·汽车
车载测试工程师1 天前
汽车功能安全系统阶段开发【技术安全方案TSC以及安全分析】5
功能测试·网络协议·安全·车载系统·汽车
Aric_Jones2 天前
业务测试用例
测试用例
TOSUN同星2 天前
干货分享 | TSMaster DBC编辑器操作指南:功能详解+实战示例
数据库·oracle·编辑器·汽车·软件工程
天天爱吃肉82182 天前
小米YU7预售现象深度解析:智能电动汽车的下一个范式革命
汽车