133 (393aac1629c8f82b7c448c8615745e89984899a8) 133 (dc900c35239bc865df2dff5880eabcd25b974f19)
1#!/bin/bash
2#
3# Test for reopen
4#
5# Copyright (C) 2015 Red Hat, Inc.
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

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

86echo "=== Check that reopening works with non-string options ==="
87echo
88
89# Using the json: pseudo-protocol we can create non-string options
90# (Invoke 'info' just so we get some output afterwards)
91IMGOPTSSYNTAX=false $QEMU_IO -f null-co -c 'reopen' -c 'info' \
92 "json:{'driver': 'null-co', 'size': 65536}"
93
1#!/bin/bash
2#
3# Test for reopen
4#
5# Copyright (C) 2015 Red Hat, Inc.
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

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

86echo "=== Check that reopening works with non-string options ==="
87echo
88
89# Using the json: pseudo-protocol we can create non-string options
90# (Invoke 'info' just so we get some output afterwards)
91IMGOPTSSYNTAX=false $QEMU_IO -f null-co -c 'reopen' -c 'info' \
92 "json:{'driver': 'null-co', 'size': 65536}"
93
94echo
95echo "=== Check that mixing -c/-r/-w and their corresponding options is forbidden ==="
96echo
97
98$QEMU_IO -c 'reopen -r -o read-only=on' $TEST_IMG
99$QEMU_IO -c 'reopen -w -o read-only=on' $TEST_IMG
100$QEMU_IO -c 'reopen -c none -o cache.direct=on' $TEST_IMG
101$QEMU_IO -c 'reopen -c writeback -o cache.direct=on' $TEST_IMG
102$QEMU_IO -c 'reopen -c directsync -o cache.no-flush=on' $TEST_IMG
94# success, all done
95echo "*** done"
96rm -f $seq.full
97status=0
103# success, all done
104echo "*** done"
105rm -f $seq.full
106status=0