This allows hot (un)plugging of CPU's! It also includes some general cleanups which were necessary to support this as well as some other features to the virt resource. Hotunplug requires Fedora 25. It also comes with a mini shell script to help demo this capability. Many thanks to pkrempa for his help with the libvirt API!
33 lines
632 B
Bash
Executable File
33 lines
632 B
Bash
Executable File
#!/bin/bash
|
|
# check for any bash files that aren't properly formatted
|
|
# TODO: this is hardly exhaustive
|
|
|
|
. test/util.sh
|
|
|
|
echo running test-bashfmt.sh
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
ROOT=$(dirname "${BASH_SOURCE}")/..
|
|
|
|
cd "${ROOT}"
|
|
|
|
find_files() {
|
|
git ls-files | grep -e '\.sh$' -e '\.bash$' | grep -v 'misc/delta-cpu.sh'
|
|
}
|
|
|
|
bad_files=$(
|
|
for i in $(find_files); do
|
|
# search for more than one leading space, to ensure we use tabs
|
|
if grep -q '^ ' "$i"; then
|
|
echo "$i"
|
|
fi
|
|
done
|
|
)
|
|
|
|
if [[ -n "${bad_files}" ]]; then
|
|
fail_test "The following bash files are not properly formatted: ${bad_files}"
|
|
fi
|
|
echo 'PASS'
|