[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] libxl: update check-xl-disk-parse



On Tue, 2015-12-08 at 20:02 +0000, Wei Liu wrote:
> The block-attach command now returns 1 when fails. Update first test
> case to expect return value 1 instead of 255.
> 
> The parser now doesn't generate output for default values. Remove them
> from expected output.

This it looks good.

> The "discard=" variant is never not supported, so delete two test cases
> with that variant.

I don't follow (the double negative "never not" doesn't help).

However, assuming you are saying that discard= is always supported, I don't
then see the rationale for removing the test. Of course we do want to test
things which are supported.


> Reported-by: Jim Fehlig <jfehlig@xxxxxxxx>
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> Cc: Jim Fehlig <jfehlig@xxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> ---
> Âtools/libxl/check-xl-disk-parse | 100 ++++----------------------------
> --------
> Â1 file changed, 8 insertions(+), 92 deletions(-)
> 
> diff --git a/tools/libxl/check-xl-disk-parse b/tools/libxl/check-xl-disk-
> parse
> index 1bec4ca..03572e4 100755
> --- a/tools/libxl/check-xl-disk-parse
> +++ b/tools/libxl/check-xl-disk-parse
> @@ -40,7 +40,7 @@ complete () {
> ÂÂÂÂÂfi
> Â}
> Â
> -e=255
> +e=1
> Â
> Â
> Â#---------- test data ----------
> @@ -52,18 +52,10 @@ one $e foo
> Â
> Âexpected <<END
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> ÂÂÂÂÂ"pdev_path": "/dev/vg/guest-volume",
> ÂÂÂÂÂ"vdev": "hda",
> -ÂÂÂÂ"backend": "unknown",
> ÂÂÂÂÂ"format": "raw",
> -ÂÂÂÂ"script": null,
> -ÂÂÂÂ"removable": 0,
> -ÂÂÂÂ"readwrite": 1,
> -ÂÂÂÂ"is_cdrom": 0,
> -ÂÂÂÂ"direct_io_safe": false,
> -ÂÂÂÂ"discard_enable": "True"
> +ÂÂÂÂ"readwrite": 1
> Â}
> Â
> ÂEND
> @@ -75,18 +67,11 @@ one 0 raw:/dev/vg/guest-volume,hda,w
> Â
> Âexpected <<END
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> ÂÂÂÂÂ"pdev_path": "/root/image.iso",
> ÂÂÂÂÂ"vdev": "hdc",
> -ÂÂÂÂ"backend": "unknown",
> ÂÂÂÂÂ"format": "raw",
> -ÂÂÂÂ"script": null,
> ÂÂÂÂÂ"removable": 1,
> -ÂÂÂÂ"readwrite": 0,
> -ÂÂÂÂ"is_cdrom": 1,
> -ÂÂÂÂ"direct_io_safe": false,
> -ÂÂÂÂ"discard_enable": "False"
> +ÂÂÂÂ"is_cdrom": 1
> Â}
> Â
> ÂEND
> @@ -99,18 +84,11 @@ one 0 raw:/root/image.iso,hdc:cdrom,ro
> Â
> Âexpected <<EOF
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> ÂÂÂÂÂ"pdev_path": "/dev/vg/guest-volume",
> ÂÂÂÂÂ"vdev": "xvdb",
> ÂÂÂÂÂ"backend": "phy",
> ÂÂÂÂÂ"format": "raw",
> -ÂÂÂÂ"script": null,
> -ÂÂÂÂ"removable": 0,
> -ÂÂÂÂ"readwrite": 1,
> -ÂÂÂÂ"is_cdrom": 0,
> -ÂÂÂÂ"direct_io_safe": false,
> -ÂÂÂÂ"discard_enable": "True"
> +ÂÂÂÂ"readwrite": 1
> Â}
> Â
> ÂEOF
> @@ -118,18 +96,11 @@ one 0
> backendtype=phy,vdev=xvdb,access=w,target=/dev/vg/guest-volume
> Â
> Âexpected <<EOF
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> ÂÂÂÂÂ"pdev_path": "",
> ÂÂÂÂÂ"vdev": "hdc",
> -ÂÂÂÂ"backend": "unknown",
> ÂÂÂÂÂ"format": "empty",
> -ÂÂÂÂ"script": null,
> ÂÂÂÂÂ"removable": 1,
> -ÂÂÂÂ"readwrite": 0,
> -ÂÂÂÂ"is_cdrom": 1,
> -ÂÂÂÂ"direct_io_safe": false,
> -ÂÂÂÂ"discard_enable": "False"
> +ÂÂÂÂ"is_cdrom": 1
> Â}
> Â
> ÂEOF
> @@ -141,18 +112,10 @@ one 0 ,empty,hdc:cdrom,r
> Â
> Âexpected <<EOF
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> -ÂÂÂÂ"pdev_path": null,
> ÂÂÂÂÂ"vdev": "hdc",
> -ÂÂÂÂ"backend": "unknown",
> ÂÂÂÂÂ"format": "empty",
> -ÂÂÂÂ"script": null,
> ÂÂÂÂÂ"removable": 1,
> -ÂÂÂÂ"readwrite": 0,
> -ÂÂÂÂ"is_cdrom": 1,
> -ÂÂÂÂ"direct_io_safe": false,
> -ÂÂÂÂ"discard_enable": "False"
> +ÂÂÂÂ"is_cdrom": 1
> Â}
> Â
> ÂEOF
> @@ -161,18 +124,11 @@ one 0 vdev=hdc,access=r,devtype=cdrom
> Â
> Âexpected <<EOF
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> ÂÂÂÂÂ"pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-
> c82797962054a96d-examplehost",
> ÂÂÂÂÂ"vdev": "xvda",
> -ÂÂÂÂ"backend": "unknown",
> ÂÂÂÂÂ"format": "raw",
> ÂÂÂÂÂ"script": "block-iscsi",
> -ÂÂÂÂ"removable": 0,
> -ÂÂÂÂ"readwrite": 1,
> -ÂÂÂÂ"is_cdrom": 0,
> -ÂÂÂÂ"direct_io_safe": false,
> -ÂÂÂÂ"discard_enable": "True"
> +ÂÂÂÂ"readwrite": 1
> Â}
> Â
> ÂEOF
> @@ -183,18 +139,11 @@ one 0 vdev=xvda,access=w,script=block-
> iscsi,target=iqn.2001-05.com.equallogic:0-
> Â
> Âexpected <<EOF
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> ÂÂÂÂÂ"pdev_path": "app01",
> ÂÂÂÂÂ"vdev": "hda",
> -ÂÂÂÂ"backend": "unknown",
> ÂÂÂÂÂ"format": "raw",
> ÂÂÂÂÂ"script": "block-drbd",
> -ÂÂÂÂ"removable": 0,
> -ÂÂÂÂ"readwrite": 1,
> -ÂÂÂÂ"is_cdrom": 0,
> -ÂÂÂÂ"direct_io_safe": false,
> -ÂÂÂÂ"discard_enable": "True"
> +ÂÂÂÂ"readwrite": 1
> Â}
> Â
> ÂEOF
> @@ -205,57 +154,24 @@ one 0 drbd:app01,hda,w
> Â
> Âexpected <<END
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> ÂÂÂÂÂ"pdev_path": "/some/disk/image.raw",
> ÂÂÂÂÂ"vdev": "hda",
> -ÂÂÂÂ"backend": "unknown",
> ÂÂÂÂÂ"format": "raw",
> -ÂÂÂÂ"script": null,
> -ÂÂÂÂ"removable": 0,
> ÂÂÂÂÂ"readwrite": 1,
> -ÂÂÂÂ"is_cdrom": 0,
> -ÂÂÂÂ"direct_io_safe": false,
> ÂÂÂÂÂ"discard_enable": "True"
> Â}
> Â
> ÂEND
> -one 0ÂÂdiscard=onÂÂvdev=hda target=/some/disk/image.raw
> -one 0ÂÂdiscard=1ÂÂÂvdev=hda target=/some/disk/image.raw
> -
> -expected <<END
> -disk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> -ÂÂÂÂ"pdev_path": "/some/disk/image.raw",
> -ÂÂÂÂ"vdev": "hda",
> -ÂÂÂÂ"backend": "unknown",
> -ÂÂÂÂ"format": "raw",
> -ÂÂÂÂ"script": null,
> -ÂÂÂÂ"removable": 0,
> -ÂÂÂÂ"readwrite": 1,
> -ÂÂÂÂ"is_cdrom": 0,
> -ÂÂÂÂ"direct_io_safe": false,
> -ÂÂÂÂ"discard_enable": "False"
> -}
> -
> -END
> Âone 0ÂÂdiscard vdev=hda target=/some/disk/image.raw
> Âone 0ÂÂdiscard vdev=hda target=/some/disk/image.raw
> Â
> Âexpected <<END
> Âdisk: {
> -ÂÂÂÂ"backend_domid": 0,
> -ÂÂÂÂ"backend_domname": null,
> ÂÂÂÂÂ"pdev_path": "/some/disk/image.iso",
> ÂÂÂÂÂ"vdev": "hda",
> -ÂÂÂÂ"backend": "unknown",
> ÂÂÂÂÂ"format": "raw",
> -ÂÂÂÂ"script": null,
> ÂÂÂÂÂ"removable": 1,
> -ÂÂÂÂ"readwrite": 0,
> ÂÂÂÂÂ"is_cdrom": 1,
> -ÂÂÂÂ"direct_io_safe": false,
> ÂÂÂÂÂ"discard_enable": "False"
> Â}
> Â
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.