081 (4c76137484878f42a2ce1ae1b888b6a7f66b4053) 081 (21b43d004813ae71d964f74e59ff149bb480db73)
1#!/usr/bin/env bash
2#
3# Test Quorum block driver
4#
5# Copyright (C) 2013 Nodalink, SARL.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by

--- 27 unchanged lines hidden (view full) ---

36
37# get standard environment, filters and checks
38. ./common.rc
39. ./common.filter
40
41_supported_fmt raw
42_supported_proto file
43_supported_os Linux
1#!/usr/bin/env bash
2#
3# Test Quorum block driver
4#
5# Copyright (C) 2013 Nodalink, SARL.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by

--- 27 unchanged lines hidden (view full) ---

36
37# get standard environment, filters and checks
38. ./common.rc
39. ./common.filter
40
41_supported_fmt raw
42_supported_proto file
43_supported_os Linux
44_require_drivers quorum
44
45do_run_qemu()
46{
47 echo Testing: "$@" | _filter_imgfmt
48 $QEMU -nographic -qmp stdio -serial none "$@"
49 echo
50}
51
52run_qemu()
53{
54 do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp\
55 | _filter_qemu_io | _filter_generated_node_ids
56}
57
45
46do_run_qemu()
47{
48 echo Testing: "$@" | _filter_imgfmt
49 $QEMU -nographic -qmp stdio -serial none "$@"
50 echo
51}
52
53run_qemu()
54{
55 do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp\
56 | _filter_qemu_io | _filter_generated_node_ids
57}
58
58test_quorum=$($QEMU_IMG --help|grep quorum)
59[ "$test_quorum" = "" ] && _supported_fmt quorum
60
61quorum="driver=raw,file.driver=quorum,file.vote-threshold=2"
62quorum="$quorum,file.children.0.file.filename=$TEST_DIR/1.raw"
63quorum="$quorum,file.children.1.file.filename=$TEST_DIR/2.raw"
64quorum="$quorum,file.children.2.file.filename=$TEST_DIR/3.raw"
65quorum="$quorum,file.children.0.driver=raw"
66quorum="$quorum,file.children.1.driver=raw"
67quorum="$quorum,file.children.2.driver=raw"
68

--- 221 unchanged lines hidden ---
59quorum="driver=raw,file.driver=quorum,file.vote-threshold=2"
60quorum="$quorum,file.children.0.file.filename=$TEST_DIR/1.raw"
61quorum="$quorum,file.children.1.file.filename=$TEST_DIR/2.raw"
62quorum="$quorum,file.children.2.file.filename=$TEST_DIR/3.raw"
63quorum="$quorum,file.children.0.driver=raw"
64quorum="$quorum,file.children.1.driver=raw"
65quorum="$quorum,file.children.2.driver=raw"
66

--- 221 unchanged lines hidden ---