Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
874ad5f9
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
874ad5f9
编写于
9月 23, 2010
作者:
J
Jamie Strandboge
提交者:
Eric Blake
9月 23, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add extra tests to virt-aa-helper-test for new '-p' option
上级
50f6b66b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
8 deletion
+17
-8
tests/virt-aa-helper-test
tests/virt-aa-helper-test
+17
-8
未找到文件。
tests/virt-aa-helper-test
浏览文件 @
874ad5f9
...
...
@@ -144,6 +144,7 @@ echo "Expected failures:" >$output
testme
"1"
"invalid arg"
"-z"
testme
"1"
"invalid case"
"-A"
testme
"1"
"not enough args"
"-c"
testme
"1"
"not enough args"
"-p"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$disk1
,g"
>
"
$test_xml
"
testme
"1"
"no -u with -c"
"-c"
"
$test_xml
"
...
...
@@ -160,17 +161,25 @@ testme "1" "old '-n' option" "-c -n foo -u $valid_uuid" "$test_xml"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$bad_disk
,g"
>
"
$test_xml
"
testme
"1"
"bad disk"
"-c -u
$valid_uuid
"
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$bad_disk
,g"
|
sed
"s,</devices>,<disk type='file' device='disk'><source file='
$disk2
'/><target dev='hda' bus='ide'/></disk></devices>,g"
>
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$bad_disk
,g"
|
sed
"s,</devices>,<disk type='file' device='disk'><driver name='qemu' type='raw'/><source file='
$disk2
'/><target dev='hda' bus='ide'/></disk></devices>,g"
>
"
$test_xml
"
testme
"1"
"bad disk2"
"-c -u
$valid_uuid
"
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$disk1
,g"
|
sed
"s,</devices>,<devices>,g"
>
"
$test_xml
"
testme
"1"
"malformed xml"
"-c -u
$valid_uuid
"
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,/boot/initrd,g"
>
"
$test_xml
"
testme
"1"
"disk in /boot"
"-r -u
$valid_uuid
"
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,/boot/initrd,g"
>
"
$test_xml
"
testme
"1"
"-r with invalid -f"
"-r -u
$valid_uuid
-f
$bad_disk
"
"
$test_xml
"
initrd
=
`
ls
-1
/boot/initrd
*
|
head
-1
`
if
[
-z
"
$initrd
"
]
;
then
echo
"Skipping /boot/initrd* tests. Could not find /boot/initrd*"
else
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$initrd
,g"
>
"
$test_xml
"
testme
"1"
"disk in /boot without probing"
"-p 0 -r -u
$valid_uuid
"
"
$test_xml
"
testme
"1"
"disk in /boot with probing"
"-p 1 -r -u
$valid_uuid
"
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,/boot/initrd,g"
>
"
$test_xml
"
testme
"1"
"-r with invalid -f with probing"
"-p 1 -r -u
$valid_uuid
-f
$bad_disk
"
"
$test_xml
"
testme
"1"
"-r with invalid -f without probing"
"-p 0 -r -u
$valid_uuid
-f
$bad_disk
"
"
$test_xml
"
fi
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$disk1
</disk>,g"
>
"
$test_xml
"
testme
"1"
"-c with malformed xml"
"-c -u
$valid_uuid
"
"
$test_xml
"
...
...
@@ -195,8 +204,8 @@ testme "0" "create (i686)" "-c -u $valid_uuid" "$test_xml"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$disk1
,g"
|
sed
"s,arch='x86_64',arch='ppc',g"
>
"
$test_xml
"
testme
"0"
"create (ppc)"
"-c -u
$valid_uuid
"
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$disk1
,g"
|
sed
"s,</disk>,</disk><disk type='file' device='disk'><source file='
$disk2
'/><target dev='hdb' bus='ide'/></disk>,g"
>
"
$test_xml
"
testme
"0"
"create multiple disks"
"-c -u
$valid_uuid
-p 1
"
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###,
$disk1
,g"
|
sed
"s,</disk>,</disk><disk type='file' device='disk'><
driver name='qemu' type='raw'/><
source file='
$disk2
'/><target dev='hdb' bus='ide'/></disk>,g"
>
"
$test_xml
"
testme
"0"
"create multiple disks"
"-c -u
$valid_uuid
"
"
$test_xml
"
cat
"
$template_xml
"
|
sed
"s,###UUID###,
$uuid
,g"
|
sed
"s,###DISK###',
${
disk1
}
'/><readonly,g"
>
"
$test_xml
"
testme
"0"
"create (readonly)"
"-c -u
$valid_uuid
"
"
$test_xml
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录