From 33e40a678fab4aea91ea1a4bc11246af40223519 Mon Sep 17 00:00:00 2001 From: Huijing Hei Date: Tue, 22 Aug 2023 17:15:24 +0800 Subject: [PATCH] tests: add test to verify `/var/roothome/.bash*` files exist --- tests/kola/files/root-bash | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tests/kola/files/root-bash diff --git a/tests/kola/files/root-bash b/tests/kola/files/root-bash new file mode 100755 index 0000000000..ab258349bc --- /dev/null +++ b/tests/kola/files/root-bash @@ -0,0 +1,17 @@ +#!/bin/bash +## kola: +## exclusive: false +## description: Verify /var/roothome/.bash* files exist. + +# See https://bugzilla.redhat.com/show_bug.cgi?id=1193590 +set -xeuo pipefail + +. $KOLA_EXT_DATA/commonlib.sh + +for bashfile in .bashrc .bash_profile .bash_logout +do + if ! test -f "/var/roothome/${bashfile}"; then + fatal "Error: could not find /var/roothome/${bashfile}" + fi +done +ok "have /var/roothome/.bash* files"