跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

machine_test.go

24 行 · 776 B历史下载
1// SPDX-FileCopyrightText: Copyright The Lima Authors
2// SPDX-License-Identifier: Apache-2.0
3
4package qemu
5
6import "testing"
7
8func TestWHPXMachineCompatibility(t *testing.T) {
9 for _, accel := range []string{"whpx", "kvm", "hvf", "nvmm"} {
10 want := "q35,accel=" + accel
11 if accel == "whpx" {
12 want += ",kernel-irqchip=off"
13 }
14 args := appendQ35Machine(nil, accel)
15 if got, _ := argValue(args, "-machine"); got != want {
16 t.Fatalf("%s: got %q, want %q", accel, got, want)
17 }
18 }
19 // Retain Lima's explicit override contract for custom QEMU arguments.
20 args := appendQ35Machine([]string{"-machine", "q35,accel=whpx,kernel-irqchip=on"}, "whpx")
21 if len(args) != 2 || args[1] != "q35,accel=whpx,kernel-irqchip=on" {
22 t.Fatalf("overrode explicit machine: %v", args)
23 }
24}