PageSourceSearch

https://montplex.com/static/js/async/570.d2117782.js

js montplex.com collected 2026-10-03 21:17:14 UTC 13,538 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkengula_website=self.webpackChunkengula_website||[]).push([["570"],{8268:function(e,n,s){s.r(n),s.d(n,{default:()=>a});var r=s(2676),l=s(453);let i=s.p+"static/image/result_report.0ce522fe.png",d=s.p+"static/image/running_interface.c64fe96d.png",t=s.p+"static/image/output_log_example.9e0a3c15.png";function h(e){let n=Object.assign({h1:"h1",a:"a",h2:"h2",ul:"ul",li:"li",strong:"strong",code:"code",h3:"h3",p:"p",img:"img",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td",pre:"pre"},(0,l.ah)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.h1,{id:"engula-kernelcompat内核兼容性测试工具",children:["Engula KernelCompat(内核兼容性测试工具)",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#engula-kernelcompat内核兼容性测试工具",children:"#"})]}),"\n",(0,r.jsxs)(n.h2,{id:"1-声明与结论",children:["1. 声明与结论",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#1-声明与结论",children:"#"})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"技术路线"}),":Engula 在 Redis 内核内实现了内核级存储引擎替换,沿用 Redis 的协议、命令处理与客户端生态。"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"兼容性结论"}),":Engula 2.1 以 Redis 7.2 行为为基线做协议与语义验证;公开通过率、失败原因和影响面以 proof-live 为准,应用迁移通常无需修改代码或更换客户端。"]}),"\n"]}),"\n",(0,r.jsxs)(n.h2,{id:"2-设计目标和对比方法",children:["2. 设计目标和对比方法",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#2-设计目标和对比方法",children:"#"})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"目标"}),":验证 Engula 2.1 对 Redis 7.2 协议和数据结构的兼容程度。"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"指标"}),":协议兼容性、数据结构兼容性。"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"对比方法说明"}),":","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["以 Redis 7.2 的原生 ",(0,r.jsx)(n.code,{children:"make test"})," 用例为基准,采用 Redis 原生测试框架,确保用例一致与可复现。"]}),"\n",(0,r.jsx)(n.li,{children:"逐项对比测试结果,统计通过率和失败原因。"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.h3,{id:"21-测试指标",children:["2.1 测试指标",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#21-测试指标",children:"#"})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"数据结构兼容性"}),":String、Hash、List、Set、Sorted Set、Stream、Bitmap、HyperLogLog、Geo 数据结构的操作一致性。"]}),"\n"]}),"\n",(0,r.jsxs)(n.h3,{id:"22-验证原理",children:["2.2 验证原理",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#22-验证原理",children:"#"})]}),"\n",(0,r.jsxs)(n.p,{children:["Redis 使用基于 Tcl 的测试框架(",(0,r.jsx)(n.code,{children:"test.tcl"})," + 多个 ",(0,r.jsx)(n.code,{children:"unit/*.tcl"})," 用例)驱动 ",(0,r.jsx)(n.code,{children:"redis-server"})," 与 ",(0,r.jsx)(n.code,{children:"redis-cli"}),",以 RESP 协议执行命令并校验期望输出。测试通过直接调用 ",(0,r.jsx)(n.code,{children:"runtest.tcl"})," 运行,支持按模块与标签筛选、并行执行、数据目录隔离等特性,确保结果可复现与对实现细节的低耦合。"]}),"\n",(0,r.jsx)(n.p,{children:"Engula 兼容性验证思路:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["选取与数据结构(String、Hash、List、Set、Sorted Set、Stream、Bitmap、HyperLogLog、Geo)相关的 Tcl 用例集,使用原生测试驱动脚本 ",(0,r.jsx)(n.code,{children:"runtest.tcl"})," 在客户端侧发起测试,然后比较测试用例的期望输出与 Engula 的实际响应是否一致。"]}),"\n",(0,r.jsx)(n.li,{children:"对依赖 Redis 内部内存布局或调试接口(debug/内部表征)的测试进行剔除,不改变面向用户应用的兼容性。"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Tcl 文件列表"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"unit/scan"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/string"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/incr"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/list"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/list-2"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/list-3"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/set"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/zset"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/hash"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/stream"}),"\n",(0,r.jsx)(n.li,{children:"unit/type/stream-cgroups"}),"\n",(0,r.jsx)(n.li,{children:"unit/sort"}),"\n",(0,r.jsx)(n.li,{children:"unit/expire"}),"\n",(0,r.jsx)(n.li,{children:"unit/pubsub"}),"\n",(0,r.jsx)(n.li,{children:"unit/pubsubshard"}),"\n",(0,r.jsx)(n.li,{children:"unit/bitops"}),"\n",(0,r.jsx)(n.li,{children:"unit/bitfield"}),"\n",(0,r.jsx)(n.li,{children:"unit/geo"}),"\n",(0,r.jsx)(n.li,{children:"unit/hyperloglog"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["更细粒度的测试项可参见 Engula KernelCompat 生成的 ",(0,r.jsx)(n.code,{children:"output.log"}
1),"(包含每条用例的执行详情):"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)("img",{src:t,alt:"output.log 示例"})}),"\n",(0,r.jsxs)(n.h2,{id:"快速使用摘要",children:["快速使用摘要",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#快速使用摘要",children:"#"})]}),"\n",(0,r.jsxs)(n.table,{children:["\n",(0,r.jsxs)(n.thead,{children:["\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.th,{children:"项"}),"\n",(0,r.jsx)(n.th,{children:"内容"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.tbody,{children:["\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.td,{children:"工具简介"}),"\n",(0,r.jsx)(n.td,{children:"基于 Redis 官方测试框架验证 Engula 的 Redis 7.2 命令、协议和数据结构兼容性。"}),"\n"]}),"\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.td,{children:"前置条件"}),"\n",(0,r.jsxs)(n.td,{children:["本机可运行 Docker;准备 ",(0,r.jsx)(n.code,{children:"output.log"})," 和 ",(0,r.jsx)(n.code,{children:"summary.html"})," 输出文件。"]}),"\n"]}),"\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.td,{children:"快速开始"}),"\n",(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"docker run --user $(id -u):$(id -g) -it --rm -v $(pwd)/output.log:/montplex/output.log -v $(pwd)/summary.html:/montplex/summary.html registry.ap-southeast-1.aliyuncs.com/montplex/engula-kernel-compat:latest"})}),"\n"]}),"\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.td,{children:"输出解读"}),"\n",(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"summary.html"})," 看整体通过率和分类统计;",(0,r.jsx)(n.code,{children:"output.log"})," 看每条失败用例细节。"]}),"\n"]}),"\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.td,{children:"完整示例"}),"\n",(0,r.jsx)(n.td,{children:"见下方“运行 Engula KernelCompat”。"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.h3,{id:"命令行参数",children:["命令行参数",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#命令行参数",children:"#"})]}),"\n",(0,r.jsxs)(n.table,{children:["\n",(0,r.jsxs)(n.thead,{children:["\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.th,{children:"参数"}),"\n",(0,r.jsx)(n.th,{children:"作用"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.tbody,{children:["\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"--user $(id -u):$(id -g)"})}),"\n",(0,r.jsx)(n.td,{children:"让报告文件归属当前用户。"}),"\n"]}),"\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"-v $(pwd)/output.log:/montplex/output.log"})}),"\n",(0,r.jsx)(n.td,{children:"挂载详细日志输出文件。"}),"\n"]}),"\n",(0,r.jsxs)(n.tr,{children:["\n",(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"-v $(pwd)/summary.html:/montplex/summary.html"})}),"\n",(0,r.jsx)(n.td,{children:"挂载 HTML 汇总报告输出文件。"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.h2,{id:"3-快速内核兼容性测试engula-kernelcompat",children:["3. 快速内核兼容性测试(Engula KernelCompat)",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#3-快速内核兼容性测试engula-kernelcompat",children:"#"})]}),"\n",(0,r.jsxs)(n.h3,{id:"31-下载测试工具",children:["3.1 下载测试工具",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#31-下载测试工具",children:"#"})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Docker 镜像"}),":",(0,r.jsx)(n.code,{children:"registry.ap-southeast-1.aliyuncs.com/montplex/engula-kernel-compat:latest"})]}),"\n"]}),"\n",(0,r.jsxs)(n.h3,{id:"32-环境要求",children:["3.2 环境要求",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#32-环境要求",children:"#"})]}),"\n",(0,r.jsx)(n.p,{children:"Engula KernelCompat 以 Docker 镜像形式提供,可在已安装 Docker 的 Linux 或 macOS 上运行。推荐环境如下:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"CentOS 版本 ≥ 7.9"}),"\n",(0,r.jsx)(n.li,{children:"Ubuntu 版本 ≥ 18.04"}),"\n",(0,r.jsxs)(n.li,{children:["推荐使用 Docker 官方版本(",(0,r.jsx)(n.a,{href:"https://docs.docker.com/engine/install/",target:"_blank",rel:"noopener noreferrer",children:"安装指南"}),",网络访问较慢时可提前准备镜像)"]}),"\n"]}),"\n",(0,r.jsxs)(n.h3,{id:"33-运行-engula-kernelcompat",children:["3.3 运行 Engula KernelCompat",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#33-运行-engula-kernelcompat",children:"#"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker pull registry.ap-southeast-1.aliyuncs.com/montplex/engula-kernel-compat:latest\n\n# 在任意文件夹内\nmkdir tmp_test && cd tmp_test\ntouch output.log\ntouch summary.html\n\ndocker run --user $(id -u):$(id -g) -it --rm \\\n  -v $(pwd)/output.log:/montplex/output.log \\\n  -v $(pwd)/summary.html:/montplex/summary.html \\\n  registry.ap-southeast-1.aliyuncs.com/montplex/engula-kernel-compat:latest\n"})}),"\n",(0,r.jsx)(n.p,{children:"运行界面示意:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)("img",{src:d,alt:"运行界面示意"})}),"\n",(0,r.jsxs)(n.h3,{id:"34-查看运行结果",children:["3.4 查看运行结果",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#34-查看运行结果",children:"#"})]}),"\n",(0,r.jsxs)(n.p,{children:["运行结束后会生成 ",(0,r.jsx)(n.code,{children:"summary.html"})," 文件,可通过浏览器打开查看结果。"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)("img",{src:i,alt:"运行结果报告"})}),"\n",(0,r.jsx)(n.p,{children:"报告包含:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"兼容性通过统计信息"}),"\n",(0,r.jsx)(n.li,{children:"通过命令的大类与小类明细"}),"\n"]}),"\n",(0,r.jsxs)(n.h2,{id:"4-faq",children:["4. FAQ",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#4-faq",children:"#"})]}),"\n",(0,r.jsxs)(n.h3,{id:"是否是数据结构的全部-case是否有删减",children:["是否是数据结构的全部 case?是否有删减?",(0,r.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#是否是数据结构的全部-case是否有删减",children:"#"})]}),"\n",(0,r.jsx)(n.p,{children:"有删减。部分 debug 类型的测试 case 依赖 Redis 原有的内部数据结构进行测试。由于 Engula 的存储格式与 Redis 不一样,这些 case 已经转变为 Engula 内存存储的格式。此类 case 通常不会影响 Redis 的使用,不影响 Redis 的兼容性。"})]})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.ah)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}let a=c;c.__RSPRESS_PAGE_META={},c.__RSPRESS_PAGE_META["zh%2Fdocs%2Ftools%2Fkernelcompat.md"]={toc:[{text:"1. 声明与结论",id:"1-声明与结论",depth:2},{text:"2. 设计目标和对比方法",id:"2-设计目标和对比方法",depth:2},{text:"2.1 测试指标",id:"21-测试指标",depth:3},{text:"2.2 验证原理",id:"22-验证原理",depth:3},{text:"快速使用摘要",id:"快速使用摘要",depth:2},{text:"命令行参数",id:"命令行参数",depth:3},{text:"3. 快速内核兼容性测试(Engula KernelCompat)",id:"3-快速内核兼容性测试engula-kernelcompat",depth:2},{text:"3.1 下载测试工具",id:"31-下载测试工具",depth:3},{text:"3.2 环境要求",id:"32-环境要求",depth:3},{text:"3.3 运行 Engula KernelCompat",id:"33-运行-engula-kernelcompat",depth:3},{text:"3.4 查看运行结果",id:"34-查看运行结果",depth:3}
1,{text:"4. FAQ",id:"4-faq",depth:2},{text:"是否是数据结构的全部 case?是否有删减?",id:"是否是数据结构的全部-case是否有删减",depth:3}],title:"Engula KernelCompat(内核兼容性测试工具)",headingTitle:"Engula KernelCompat(内核兼容性测试工具)",frontmatter:{}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.