Skip to content
Snippets Groups Projects
Commit 07683a3b authored by Philip Withnall's avatar Philip Withnall
Browse files

common: Add a test to check whether any processes crashed on boot


This should hopefully catch failures like T2040, where the launcher
crashed on boot. It checks for ANOM_ABEND lines in the audit log.

Signed-off-by: default avatarPhilip Withnall <philip.withnall@collabora.co.uk>

Differential Revision: https://phabricator.apertis.org/D3540
parent d9d96009
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
# boot-no-crashes.sh
#
# Verify that no processes crashed so far during this boot. The journal is
# automatically attached to LAVA test failures, so we don’t need to manually
# include that.
# Copyright © 2016 Collabora Ltd.
#
# SPDX-License-Identifier: MPL-2.0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -e
echo "# Anomalous process terminations:"
sudo journalctl -b | grep ANOM_ABEND | sed 's/^/# /g'
if sudo journalctl -b | grep -q ANOM_ABEND; then
echo "TEST_RESULT:fail:boot-no-crashes:ANOM_ABEND found in journalctl logs" >&2
exit 1
else
echo "TEST_RESULT:pass:boot-no-crashes:"
exit 0
fi
metadata:
name: boot-no-crashes
format: "Lava-Test-Shell Test Definition 1.0"
description: "Check that nothing crashed when booting"
maintainer: "philip.withnall@collabora.co.uk"
scope:
- functional
environment:
- lava-test-shell
run:
steps:
- "common/run-test-in-systemd --name=run-test common/boot-no-crashes.sh"
parse:
pattern: 'TEST_RESULT:(?P<result>\w+):(?P<test_case_id>[^:]+):'
# vim:set sw=2 sts=2 et:
......@@ -51,6 +51,11 @@
"revision": "master",
"testdef": "common/sanity-check.yaml"
},
{
"git-repo": "https://git.apertis.org/git/apertis-tests.git",
"revision": "master",
"testdef": "common/boot-no-crashes.yaml"
},
{
"git-repo": "https://git.apertis.org/git/apertis-tests.git",
"revision": "master",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment