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,否则就是正常增加。

相关推荐
执子手 吹散苍茫茫烟波13 分钟前
测试抽奖系统,设计测试case
测试用例
CAE32044 分钟前
基于Ncode的新能源汽车电池包随机振动疲劳分析
人工智能·汽车·电池包·hypermesh·振动疲劳·optistruct
zzywxc78744 分钟前
自动化测试框架是软件测试的核心基础设施,通过预设规则和脚本自动执行测试用例,显著提高测试效率和覆盖率。
运维·人工智能·自动化·prompt·测试用例·流程图
LONGZETECH1 小时前
【龙泽科技】新能源汽车电机虚拟结构原理仿真教学软件
科技·汽车·汽车仿真教学软件·汽车教学软件·新能源汽车仿真教学软件
auto-mooc13 小时前
到底什么是智能网联汽车??第一期——感知
自动驾驶·汽车·autosar·车载通信·智能网联汽车·域控制器
天天爱吃肉821815 小时前
【比亚迪璇玑架构深度解析:重新定义智能电动汽车的“整车智能”】
数据库·人工智能·嵌入式硬件·架构·汽车
猫耳君21 小时前
汽车功能安全 Functional Safety ISO 26262 测试之一
测试开发·安全·汽车·功能安全·汽车测试·汽车电子测试
NewCarRen1 天前
汽车EPAS ECU功能安全建模分析:Gamma框架+深度概率编程落地ISO 26262(含寿命预测案例)
安全·汽车
何玺2 天前
接力邓承浩,姜海荣能讲好深蓝汽车新故事吗?
汽车