search for: random_choice

Displaying 18 results from an estimated 18 matches for "random_choice".

2012 May 03
5
[PATCH 0/5] Various fixes for virt-make-fs.
The main one is that it now estimates btrfs overhead more accurately, allowing it to construct btrfs images. See: https://bugzilla.redhat.com/show_bug.cgi?id=816098 Rich.
2020 Feb 19
2
[PATCH 0/1] virt-make-fs: add '--blocksize' option support
From: Nikolay Ivanets <stenavin@gmail.com> This patch adds 4096 bytes sector size for output disk. Side notes: While working on this patch I reveal long standing issue: virt-make-fs can fail if source directory/archive contains certain amount of really small or empty files or wide tree of directories. That is because of lack of available inodes on a small file system to keep files
2020 Feb 19
0
[PATCH 1/1] virt-make-fs: add '--blocksize' option support
..._ADD_DRIVE_OPTS_BLOCKSIZE, blocksize, -1) == -1) return -1; diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh index 79d058b6a..01c332b1d 100755 --- a/make-fs/test-virt-make-fs.sh +++ b/make-fs/test-virt-make-fs.sh @@ -83,9 +83,12 @@ size=`random_choice` choices=("" --label=FOO) label=`random_choice` +choices=(--blocksize=512 --blocksize=4096) +blocksize=`random_choice` + if [ -n "$LIBGUESTFS_DEBUG" ]; then debug=--debug; fi -params="$type $format $partition $size $label $debug" +params="$type $format $par...
2020 Feb 24
1
[PATCH v2] virt-make-fs: add '--blocksize' option support
..._ADD_DRIVE_OPTS_BLOCKSIZE, blocksize, -1) == -1) return -1; diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh index 79d058b6a..01c332b1d 100755 --- a/make-fs/test-virt-make-fs.sh +++ b/make-fs/test-virt-make-fs.sh @@ -83,9 +83,12 @@ size=`random_choice` choices=("" --label=FOO) label=`random_choice` +choices=(--blocksize=512 --blocksize=4096) +blocksize=`random_choice` + if [ -n "$LIBGUESTFS_DEBUG" ]; then debug=--debug; fi -params="$type $format $partition $size $label $debug" +params="$type $format $par...
2015 Oct 08
1
[PATCH v2 5/5] v2v: add test for v2v with virtio-win drivers on iso
...e-virt-tools" +export VIRTIO_WIN="$PWD/fake-virtio-win.iso" + +if ! test -f "$VIRTIO_WIN"; then + echo "$0: test skipped because fake virtio-win iso image was not created" + exit 77 +fi + +# Return a random element from the array 'choices'. +function random_choice +{ + echo "${choices[$((RANDOM % ${#choices[*]}))]}" +} + +# Test the --root option stochastically. +choices=("/dev/sda2" "single" "first") +root=`random_choice` + +d=test-v2v-virtio-win-iso.d +rm -rf $d +mkdir $d + +$VG virt-v2v --debug-gc \ + -i libvi...
2014 Jan 27
0
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
...MAKE_FS_BTRFS" ]; then + btrfs_available= +fi + +# UML backend doesn't support qcow2. +if [ "$(../fish/guestfish get-backend)" != "uml" ]; then + qcow2_supported=yes +fi + +declare -a choices + +# Return a random element from the array 'choices'. +function random_choice +{ + echo "${choices[$((RANDOM % ${#choices[*]}))]}" +} + +# Can't test vfat because we cannot create a tar archive +# where files are owned by UID:GID 0:0. As a result, tar +# in the appliance fails when trying to change the UID of +# the files to some non-zero value (not support...
2015 Oct 05
0
[PATCH 6/6] add test for v2v with virtio-win drivers on iso
...IN="$abs_top_builddir/tests/fake-virtio-win/fake-virtio-win.iso" + +if ! test -f "$VIRTIO_WIN"; then + echo "$0: test skipped because fake virtio-win iso image was not created" + exit 77 +fi + +# Return a random element from the array 'choices'. +function random_choice +{ + echo "${choices[$((RANDOM % ${#choices[*]}))]}" +} + +# Test the --root option stochastically. +choices=("/dev/sda2" "single" "first") +root=`random_choice` + +d=test-v2v-virtio-win-iso.d +rm -rf $d +mkdir $d + +$VG virt-v2v --debug-gc \ + -i libvi...
2014 Jan 27
2
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
I thought it would be easy to rewrite virt-make-fs in C. Two days later ... The Perl program uses a lot of external commands, which makes it pretty tedious to implement in C. Rich.
2015 Oct 05
18
[PATCH 0/6] v2v: assorted improvements to tests for windows
This series makes several enhancements to tests for v2v conversion of Windows guests. Specifically, it - adds a number of files which imitate the stuff that is supposed to be present on the host when the actual conversion is performed, but may not be there when the tests are run. This includes certain tools and virtio drivers - fixes the test for windows conversion to actually
2014 Sep 23
0
[PATCH 10/13] syntax-check: fix prohibit_test_minus_ao check
...echo 'hello' > test-mount-local-mp/hello chmod 0600 test-mount-local-mp/hello diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh index 2ed3ce9..067e665 100755 --- a/make-fs/test-virt-make-fs.sh +++ b/make-fs/test-virt-make-fs.sh @@ -57,7 +57,7 @@ function random_choice # in the appliance fails when trying to change the UID of # the files to some non-zero value (not supported by FAT). choices=(--type=ext2 --type=ext3 --type=ext4) -if [ "$ntfs3g_available" = "yes" -a "$ntfsprogs_available" = "yes" ]; then +if [ "$ntfs...
2015 Oct 05
0
[PATCH 4/6] tests: use fake virtio-win drivers
...conversion.sh @@ -42,6 +42,7 @@ if ! test -f $f || ! test -s $f; then fi export VIRT_TOOLS_DATA_DIR="$abs_top_builddir/tests/fake-virt-tools" +export VIRTIO_WIN="$abs_top_builddir/tests/fake-virtio-win" # Return a random element from the array 'choices'. function random_choice @@ -67,23 +68,28 @@ test -f $d/windows.xml test -f $d/windows-sda # Test some aspects of the target disk image. +firstboot_dir="/Program Files/Red Hat/Firstboot" +virtio_dir="/Windows/Drivers/VirtIO" { -guestfish --ro -a $d/windows-sda -i <<EOF - trace 1 - is-dir &q...
2015 Oct 08
2
[PATCH v2 4/5] v2v:tests: use fake virtio-win drivers
...version.sh +++ b/v2v/test-v2v-windows-conversion.sh @@ -42,6 +42,7 @@ if ! test -f $f || ! test -s $f; then fi export VIRT_TOOLS_DATA_DIR="$PWD/fake-virt-tools" +export VIRTIO_WIN="$PWD/fake-virtio-win" # Return a random element from the array 'choices'. function random_choice @@ -85,10 +86,17 @@ mktest () :> "$script" :> "$expected" -mktest "is-dir \"/Program Files/Red Hat/Firstboot\"" true -mktest "is-file \"/Program Files/Red Hat/Firstboot/firstboot.bat\"" true -mktest "is-dir \"/Program F...
2018 Jul 31
7
[PATCH nbdkit 0/4] Add truncate and map filters.
This patch series proposes two new filters. * truncate: This can truncate, extend, round up or round down the size of a plugin/device. A typical usage is to fix the qemu problem that it can only handle devices which are a multiple of 512-bytes: nbdkit --filter=truncate random size=500 round-up=512 This will serve a virtual device with size 512 bytes. Reading from the last 12 bytes will
2015 Oct 05
0
[PATCH 1/6] tests: use fake rhsrvany.exe
...if ! test -r $virt_tools_data_dir/rhsrvany.exe; then - echo "$0: test skipped because rhsrvany.exe is not installed" - exit 77 -fi +export VIRT_TOOLS_DATA_DIR="$abs_top_builddir/tests/fake-virt-tools" # Return a random element from the array 'choices'. function random_choice -- 2.4.3
2014 Sep 23
27
[PATCH 00/13] syntax-check
Hi Rich, This series includes patches to make `make syntax-check` pass. Some of the fix require change to maint.mk, but the file is not in git repo. Is it intended? Thanks! Hu Tao (13): syntax-check: dirty hack to pass bindtextdomain check syntax-check: fix error_message_period check syntax-check: fix makefile_at_at_check syntax-check: fix prohibit_assert_without_use check
2017 Feb 20
3
[PATCH 0/3] tests: Define common test functions.
Previously I posted a work-in-progress preview of this patch series: https://www.redhat.com/archives/libguestfs/2017-February/msg00224.html This is the finished version that updates all of the shell-script based tests. It passes 'make check', 'make check-direct' and 'make check-slow'. Rich.
2015 Aug 06
20
[PATCH v4 00/17] tests: Introduce test harness for running tests.
Since v3: - A large number of fixes, especially for running the tests on installed libguestfs. - Fixed EXTRA_DIST rules throughout. - Extra patch 17/17 which is a tidy-up of the generated XML listing guests. Rich.
2015 Nov 05
6
[PATCH 0/4] Provide better fake virtio-* test data for virt-v2v.
Patch 1 moves the v2v/fake-virtio-win and v2v/fake-virt-tools directories to the recently created test-data/ hierarchy. This is just refactoring with no functional change at all. Patches 2-4 then extend the available (fake) virtio-win drivers: - Patch 2 adds all of the drivers from the virtio-win RPM. - Patch 3 adds all of the drivers from the virtio-win ISO (which are different from the