From 8c0e37a5df6e29d9707744c71e27fda8da2130b6 Mon Sep 17 00:00:00 2001 From: Huijing Hei Date: Fri, 16 Jun 2023 15:12:12 +0800 Subject: [PATCH] tests: check that we should not find `/dev/disk/by-id/google*` device links on non GCP See https://issues.redhat.com/browse/OCPBUGS-13754 https://github.com/coreos/fedora-coreos-tracker/issues/1475#issuecomment-1551857322 --- tests/kola/disks/device-link | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tests/kola/disks/device-link diff --git a/tests/kola/disks/device-link b/tests/kola/disks/device-link new file mode 100755 index 0000000000..9477200696 --- /dev/null +++ b/tests/kola/disks/device-link @@ -0,0 +1,16 @@ +#!/bin/bash +## kola: +## platforms: qemu +## description: Verify no /dev/disk/by-id/*google* device links are found on non GCP. + +# See https://issues.redhat.com/browse/OCPBUGS-13754 + +set -xeuo pipefail + +. $KOLA_EXT_DATA/commonlib.sh + +links=$(find /dev/disk/by-id/ -iname "*google*") +if [[ -n "${links:-}" ]]; then + fatal "Error: should not find /dev/disk/by-id/*google* device links on non GCP" +fi +ok "No /dev/disk/by-id/*google* device links are found on non GCP"