History log of /kvm-unit-tests/scripts/common.bash (Results 1 – 12 of 12)
Revision Date Author Comments
# ccb37496 04-May-2024 Nicholas Piggin <npiggin@gmail.com>

scripts: allow machine option to be specified in unittests.cfg

This allows different machines with different requirements to be
supported by run_tests.sh, similarly to how different accelerators
are

scripts: allow machine option to be specified in unittests.cfg

This allows different machines with different requirements to be
supported by run_tests.sh, similarly to how different accelerators
are handled.

Acked-by: Andrew Jones <andrew.jones@linux.dev>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240504122841.1177683-8-npiggin@gmail.com>
[thuth: Adjusted code in scripts/s390x/func.bash for the changes]
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# ddfdcc39 01-May-2024 Nicholas Piggin <npiggin@gmail.com>

Add initial shellcheck checking

This adds a basic shellcheck style file, some directives to help
find scripts, and a make shellcheck target.

When changes settle down this could be made part of the

Add initial shellcheck checking

This adds a basic shellcheck style file, some directives to help
find scripts, and a make shellcheck target.

When changes settle down this could be made part of the standard
build / CI flow.

Suggested-by: Andrew Jones <andrew.jones@linux.dev>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...


# 4dd0bbe3 30-Oct-2023 Nina Schoetterl-Glausch <nsg@linux.ibm.com>

scripts: Implement multiline strings for extra_params

Implement a rudimentary form only.
extra_params can get long when passing a lot of arguments to qemu.
Multiline strings help with readability of

scripts: Implement multiline strings for extra_params

Implement a rudimentary form only.
extra_params can get long when passing a lot of arguments to qemu.
Multiline strings help with readability of the .cfg file.
Multiline strings begin and end with """, which must occur on separate
lines.

For example:
extra_params = """-cpu max,ctop=on -smp cpus=1,cores=16,maxcpus=128 \
-append '-drawers 2 -books 2 -sockets 2 -cores 16' \
-device max-s390x-cpu,core-id=31,drawer-id=0,book-id=0,socket-id=0"""

The command string built with extra_params is eval'ed by the runtime
script, so the newlines need to be escaped with \.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Link: https://lore.kernel.org/r/20231030160349.458764-10-nsg@linux.ibm.com
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>

show more ...


# 1f2e7121 14-Oct-2020 Andrew Jones <drjones@redhat.com>

scripts: Save rematch before calling out of for_each_unittest

If we don't save BASH_REMATCH before calling another function,
and that other function also uses [[...]], then we'll lose the
test.

Sig

scripts: Save rematch before calling out of for_each_unittest

If we don't save BASH_REMATCH before calling another function,
and that other function also uses [[...]], then we'll lose the
test.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20201014191444.136782-3-drjones@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# a303dbe1 23-Sep-2020 Marc Hartmayer <mhartmay@linux.ibm.com>

run_tests/mkstandalone: add arch_cmd hook

This allows us, for example, to auto generate a new test case based on
an existing test case.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: C

run_tests/mkstandalone: add arch_cmd hook

This allows us, for example, to auto generate a new test case based on
an existing test case.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Message-Id: <20200923134758.19354-4-mhartmay@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# a8eb24ea 23-Sep-2020 Marc Hartmayer <mhartmay@linux.ibm.com>

scripts: add support for architecture dependent functions

This is necessary to keep architecture dependent code separate from
common code.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by

scripts: add support for architecture dependent functions

This is necessary to keep architecture dependent code separate from
common code.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Message-Id: <20200923134758.19354-3-mhartmay@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# caa9392a 23-Sep-2020 Marc Hartmayer <mhartmay@linux.ibm.com>

common.bash: run `cmd` only if a test case was found

It's only useful to run `cmd` in `for_each_unittest` if a test case
was found. This change allows us to remove the guards from the
functions `run

common.bash: run `cmd` only if a test case was found

It's only useful to run `cmd` in `for_each_unittest` if a test case
was found. This change allows us to remove the guards from the
functions `run_task` and `mkstandalone`.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Message-Id: <20200923134758.19354-2-mhartmay@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# d76bf076 26-Jul-2017 Andrew Jones <drjones@redhat.com>

scripts: ShellCheck found cleanups

Checked all the bash scripts with

shellcheck --shell=bash

checking with and without the following exclude list

--exclude=SC1091,SC2004,SC2006,SC2086,SC2143,SC

scripts: ShellCheck found cleanups

Checked all the bash scripts with

shellcheck --shell=bash

checking with and without the following exclude list

--exclude=SC1091,SC2004,SC2006,SC2086,SC2143,SC2155

Even with the exclude list there were some warnings not fixed with
this patch, but those are OK.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 9f159116 12-Jan-2017 Peter Xu <peterx@redhat.com>

run_tests: put logs into per-test file

We were using test.log before to keep all the test logs. This patch
creates one log file per test case under logs/ directory with name
"TESTNAME.log". Meanwhil

run_tests: put logs into per-test file

We were using test.log before to keep all the test logs. This patch
creates one log file per test case under logs/ directory with name
"TESTNAME.log". Meanwhile, we will keep the last time log into
logs.old/.

Renaming scripts/functions.bash into scripts/common.bash to store some
more global variables.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# fd149358 02-Mar-2016 Andrew Jones <drjones@redhat.com>

run scripts: add timeout support

Also remove useless qemu variable in scripts/runtime.bash.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>

Messa

run scripts: add timeout support

Also remove useless qemu variable in scripts/runtime.bash.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>

Message-Id: <1456939982-13178-7-git-send-email-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 0601b85c 06-Nov-2015 Andrew Jones <drjones@redhat.com>

arm/run: use ACCEL to choose between kvm and tcg

Inspired by a patch by Alex Bennée. This version uses a new
unittests.cfg variable and includes support for DRYRUN.

Signed-off-by: Andrew Jones <dr

arm/run: use ACCEL to choose between kvm and tcg

Inspired by a patch by Alex Bennée. This version uses a new
unittests.cfg variable and includes support for DRYRUN.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Message-Id: <1446769483-21586-10-git-send-email-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 143fb7b5 13-Jul-2015 Andrew Jones <drjones@redhat.com>

run_tests.sh: share run_all as for_each_unittest

To avoid duplicating unittests.cfg parsing code in other scripts,
let's put it in a file where it can be shared.

Signed-off-by: Andrew Jones <drjone

run_tests.sh: share run_all as for_each_unittest

To avoid duplicating unittests.cfg parsing code in other scripts,
let's put it in a file where it can be shared.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...