Compare commits
8 Commits
efdbf5fe9c
...
766507972b
Author | SHA1 | Date |
---|---|---|
Zbigniew Jędrzejewski-Szmek | 766507972b | |
Zbigniew Jędrzejewski-Szmek | e72ecbf506 | |
codicodi | d0192e93f8 | |
Evgeny Vereshchagin | 2f0a427b45 | |
Evgeny Vereshchagin | 1f034000a5 | |
Frantisek Sumsal | 7a57256c73 | |
Frantisek Sumsal | e89450921f | |
Frantisek Sumsal | 3be6f50117 |
|
@ -71,5 +71,8 @@ available functionality:
|
||||||
See [Testing systemd using sanitizers](https://systemd.io/TESTING_WITH_SANITIZERS)
|
See [Testing systemd using sanitizers](https://systemd.io/TESTING_WITH_SANITIZERS)
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
|
16. Fossies provides [source code misspelling reports](https://fossies.org/features.html#codespell).
|
||||||
|
The systemd report can be found [here](https://fossies.org/linux/test/systemd-master.tar.gz/codespell.html).
|
||||||
|
|
||||||
Access to Coverity and oss-fuzz reports is limited. Please reach out to the
|
Access to Coverity and oss-fuzz reports is limited. Please reach out to the
|
||||||
maintainers if you need access.
|
maintainers if you need access.
|
||||||
|
|
|
@ -53,9 +53,10 @@
|
||||||
openpgp:"Retrieve openpgp keys for an email"
|
openpgp:"Retrieve openpgp keys for an email"
|
||||||
query:"Resolve domain names, IPv4 and IPv6 addresses"
|
query:"Resolve domain names, IPv4 and IPv6 addresses"
|
||||||
reset-server-features:"Flushes all feature level information the resolver has learned about specific servers"
|
reset-server-features:"Flushes all feature level information the resolver has learned about specific servers"
|
||||||
reset-statistics:"Resets the statistics counter show in statistics to zero"
|
reset-statistics:"Resets the statistics counter shown in statistics to zero"
|
||||||
revert:"Revert the per-interfce DNS configuration"
|
revert:"Revert the per-interfce DNS configuration"
|
||||||
service:"Resolve DNS-SD and SRV services"
|
service:"Resolve DNS-SD and SRV services"
|
||||||
|
statistics:"Show resolver statistics"
|
||||||
status:"Show the global and per-link DNS settings currently in effect"
|
status:"Show the global and per-link DNS settings currently in effect"
|
||||||
tlsa:"Query tlsa public keys stored as TLSA resource records"
|
tlsa:"Query tlsa public keys stored as TLSA resource records"
|
||||||
)
|
)
|
||||||
|
@ -78,10 +79,6 @@ _arguments \
|
||||||
'--service[Resolve services]' \
|
'--service[Resolve services]' \
|
||||||
'--service-address=no[Do not resolve address for services]' \
|
'--service-address=no[Do not resolve address for services]' \
|
||||||
'--service-txt=no[Do not resolve TXT records for services]' \
|
'--service-txt=no[Do not resolve TXT records for services]' \
|
||||||
'--openpgp[Query OpenPGP public key]' \
|
|
||||||
'--tlsa[Query TLS public key]' \
|
|
||||||
'--cname=no[Do not follow CNAME redirects]' \
|
'--cname=no[Do not follow CNAME redirects]' \
|
||||||
'--search=no[Do not use search domains]' \
|
'--search=no[Do not use search domains]' \
|
||||||
'--statistics[Show resolver statistics]' \
|
|
||||||
'--reset-statistics[Reset resolver statistics]' \
|
|
||||||
'*::default: _resolvectl_commands'
|
'*::default: _resolvectl_commands'
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
TEST_DESCRIPTION="Job-related tests"
|
TEST_DESCRIPTION="Job-related tests"
|
||||||
TEST_NO_QEMU=1
|
TEST_NO_QEMU=1
|
||||||
|
IMAGE_NAME="default"
|
||||||
|
|
||||||
. $TEST_BASE_DIR/test-functions
|
. $TEST_BASE_DIR/test-functions
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
TEST_DESCRIPTION="systemd-nspawn smoke test"
|
TEST_DESCRIPTION="systemd-nspawn smoke test"
|
||||||
IMAGE_NAME=nspawn
|
IMAGE_NAME="nspawn"
|
||||||
TEST_NO_NSPAWN=1
|
TEST_NO_NSPAWN=1
|
||||||
|
|
||||||
. $TEST_BASE_DIR/test-functions
|
. $TEST_BASE_DIR/test-functions
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
TEST_DESCRIPTION="/etc/machine-id testing"
|
TEST_DESCRIPTION="/etc/machine-id testing"
|
||||||
IMAGE_NAME=badid
|
IMAGE_NAME="badid"
|
||||||
TEST_NO_NSPAWN=1
|
TEST_NO_NSPAWN=1
|
||||||
|
|
||||||
. $TEST_BASE_DIR/test-functions
|
. $TEST_BASE_DIR/test-functions
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
TEST_DESCRIPTION="Sysuser-related tests"
|
TEST_DESCRIPTION="Sysuser-related tests"
|
||||||
IMAGE_NAME=sysusers
|
IMAGE_NAME="sysusers"
|
||||||
. $TEST_BASE_DIR/test-functions
|
. $TEST_BASE_DIR/test-functions
|
||||||
|
|
||||||
test_setup() {
|
test_setup() {
|
||||||
|
|
|
@ -18,6 +18,7 @@ EFI_MOUNT="${EFI_MOUNT:-$(bootctl -x 2>/dev/null || echo /boot)}"
|
||||||
QEMU_MEM="${QEMU_MEM:-512M}"
|
QEMU_MEM="${QEMU_MEM:-512M}"
|
||||||
IMAGE_NAME=${IMAGE_NAME:-default}
|
IMAGE_NAME=${IMAGE_NAME:-default}
|
||||||
TEST_REQUIRE_INSTALL_TESTS="${TEST_REQUIRE_INSTALL_TESTS:-1}"
|
TEST_REQUIRE_INSTALL_TESTS="${TEST_REQUIRE_INSTALL_TESTS:-1}"
|
||||||
|
TEST_PARALLELIZE="${TEST_PARALLELIZE:-0}"
|
||||||
LOOPDEV=
|
LOOPDEV=
|
||||||
|
|
||||||
# Decide if we can (and want to) run QEMU with KVM acceleration.
|
# Decide if we can (and want to) run QEMU with KVM acceleration.
|
||||||
|
@ -329,12 +330,13 @@ systemd.wants=testsuite-$1.service ${_end} \
|
||||||
$KERNEL_APPEND \
|
$KERNEL_APPEND \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
[ -e "$IMAGE_PRIVATE" ] && image="$IMAGE_PRIVATE" || image="$IMAGE_PUBLIC"
|
||||||
QEMU_OPTIONS="-smp $QEMU_SMP \
|
QEMU_OPTIONS="-smp $QEMU_SMP \
|
||||||
-net none \
|
-net none \
|
||||||
-m $QEMU_MEM \
|
-m $QEMU_MEM \
|
||||||
-nographic \
|
-nographic \
|
||||||
-kernel $KERNEL_BIN \
|
-kernel $KERNEL_BIN \
|
||||||
-drive format=raw,cache=unsafe,file=${IMAGESTATEDIR}/${IMAGE_NAME}.img \
|
-drive format=raw,cache=unsafe,file=$image \
|
||||||
$QEMU_OPTIONS \
|
$QEMU_OPTIONS \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
@ -692,16 +694,14 @@ create_empty_image() {
|
||||||
_size=$((4*_size))
|
_size=$((4*_size))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image="${TESTDIR}/${IMAGE_NAME}.img"
|
echo "Setting up $IMAGE_PUBLIC (${_size} MB)"
|
||||||
public="$IMAGESTATEDIR/${IMAGE_NAME}.img"
|
rm -f "$IMAGE_PRIVATE" "$IMAGE_PUBLIC"
|
||||||
echo "Setting up $public (${_size} MB)"
|
|
||||||
rm -f "$image" "$public"
|
|
||||||
|
|
||||||
# Create the blank file to use as a root filesystem
|
# Create the blank file to use as a root filesystem
|
||||||
truncate -s "${_size}M" "$image"
|
truncate -s "${_size}M" "$IMAGE_PRIVATE"
|
||||||
ln -vs "$(realpath $image)" "$public"
|
ln -vs "$(realpath $IMAGE_PRIVATE)" "$IMAGE_PUBLIC"
|
||||||
|
|
||||||
LOOPDEV=$(losetup --show -P -f "$public")
|
LOOPDEV=$(losetup --show -P -f "$IMAGE_PUBLIC")
|
||||||
[ -b "$LOOPDEV" ] || return 1
|
[ -b "$LOOPDEV" ] || return 1
|
||||||
sfdisk "$LOOPDEV" <<EOF
|
sfdisk "$LOOPDEV" <<EOF
|
||||||
,$((_size-50))M
|
,$((_size-50))M
|
||||||
|
@ -722,7 +722,7 @@ EOF
|
||||||
|
|
||||||
mount_initdir() {
|
mount_initdir() {
|
||||||
if [ -z "${LOOPDEV}" ]; then
|
if [ -z "${LOOPDEV}" ]; then
|
||||||
image="${IMAGESTATEDIR}/${IMAGE_NAME}.img"
|
[ -e "$IMAGE_PRIVATE" ] && image="$IMAGE_PRIVATE" || image="$IMAGE_PUBLIC"
|
||||||
LOOPDEV=$(losetup --show -P -f "$image")
|
LOOPDEV=$(losetup --show -P -f "$image")
|
||||||
[ -b "$LOOPDEV" ] || return 1
|
[ -b "$LOOPDEV" ] || return 1
|
||||||
|
|
||||||
|
@ -744,8 +744,7 @@ cleanup_initdir() {
|
||||||
umount_loopback() {
|
umount_loopback() {
|
||||||
# unmount the loopback device from all places. Otherwise we risk file
|
# unmount the loopback device from all places. Otherwise we risk file
|
||||||
# system corruption.
|
# system corruption.
|
||||||
image="${IMAGESTATEDIR}/${IMAGE_NAME}.img"
|
for device in $(losetup -l | awk '$6=="'"$IMAGE_PUBLIC"'" {print $1}'); do
|
||||||
for device in $(losetup -l | awk '$6=="'"$image"'" {print $1}'); do
|
|
||||||
ddebug "Unmounting all uses of $device"
|
ddebug "Unmounting all uses of $device"
|
||||||
mount | awk '/^'"${device}"'p/{print $1}' | xargs --no-run-if-empty umount -v
|
mount | awk '/^'"${device}"'p/{print $1}' | xargs --no-run-if-empty umount -v
|
||||||
done
|
done
|
||||||
|
@ -1215,6 +1214,9 @@ TESTDIR="$TESTDIR"
|
||||||
EOF
|
EOF
|
||||||
export TESTDIR
|
export TESTDIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
IMAGE_PRIVATE="${TESTDIR}/${IMAGE_NAME}.img"
|
||||||
|
IMAGE_PUBLIC="${IMAGESTATEDIR}/${IMAGE_NAME}.img"
|
||||||
}
|
}
|
||||||
|
|
||||||
import_initdir() {
|
import_initdir() {
|
||||||
|
@ -1964,7 +1966,7 @@ _test_cleanup() {
|
||||||
(
|
(
|
||||||
set +e
|
set +e
|
||||||
_umount_dir $initdir
|
_umount_dir $initdir
|
||||||
rm -vf "${IMAGESTATEDIR}/${IMAGE_NAME}.img"
|
rm -vf "$IMAGE_PUBLIC"
|
||||||
rm -vfr "$TESTDIR"
|
rm -vfr "$TESTDIR"
|
||||||
rm -vf "$STATEFILE"
|
rm -vf "$STATEFILE"
|
||||||
) || :
|
) || :
|
||||||
|
@ -2000,14 +2002,16 @@ test_setup() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image="${TESTDIR}/${IMAGE_NAME}.img"
|
if [ -e "$IMAGE_PRIVATE" ]; then
|
||||||
public="${IMAGESTATEDIR}/${IMAGE_NAME}.img"
|
echo "Reusing existing image $IMAGE_PRIVATE → $(realpath $IMAGE_PRIVATE)"
|
||||||
if [ -e "$image" ]; then
|
|
||||||
echo "Reusing existing image $PWD/$image → $(realpath $image)"
|
|
||||||
mount_initdir
|
mount_initdir
|
||||||
elif [ -e "$public" ]; then
|
elif [ -e "$IMAGE_PUBLIC" ]; then
|
||||||
echo "Reusing existing cached image $PWD/$public → $(realpath $public)"
|
echo "Reusing existing cached image $IMAGE_PUBLIC → $(realpath $IMAGE_PUBLIC)"
|
||||||
ln -s "$(realpath $public)" "$image"
|
if [ ${TEST_PARALLELIZE} -ne 0 ]; then
|
||||||
|
cp -v "$(realpath $IMAGE_PUBLIC)" "$IMAGE_PRIVATE"
|
||||||
|
else
|
||||||
|
ln -sv "$(realpath $IMAGE_PUBLIC)" "$IMAGE_PRIVATE"
|
||||||
|
fi
|
||||||
mount_initdir
|
mount_initdir
|
||||||
else
|
else
|
||||||
test_create_image
|
test_create_image
|
||||||
|
|
|
@ -27,9 +27,15 @@ build=$WORK/build
|
||||||
rm -rf $build
|
rm -rf $build
|
||||||
mkdir -p $build
|
mkdir -p $build
|
||||||
|
|
||||||
fuzzflag="oss-fuzz=true"
|
|
||||||
if [ -z "$FUZZING_ENGINE" ]; then
|
if [ -z "$FUZZING_ENGINE" ]; then
|
||||||
fuzzflag="llvm-fuzz=true"
|
fuzzflag="llvm-fuzz=true"
|
||||||
|
else
|
||||||
|
fuzzflag="oss-fuzz=true"
|
||||||
|
if [[ "$SANITIZER" == undefined ]]; then
|
||||||
|
UBSAN_FLAGS="-fsanitize=pointer-overflow -fno-sanitize-recover=pointer-overflow"
|
||||||
|
CFLAGS="$CFLAGS $UBSAN_FLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $UBSAN_FLAGS"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
meson $build -D$fuzzflag -Db_lundef=false
|
meson $build -D$fuzzflag -Db_lundef=false
|
||||||
|
|
Loading…
Reference in New Issue