From bdf6b2d49de9c665c3bb181daac4972c6ed682ef Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Thu, 21 Mar 2019 12:16:43 +0000 Subject: [PATCH] scripts: Handle missing partitions in collect script Add an extra check in the data collection script to ensure partitions are found in the image. Signed-off-by: James O. D. Hunt --- data/kata-collect-data.sh.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/kata-collect-data.sh.in b/data/kata-collect-data.sh.in index 5e6ddc895..87a1cf1f3 100644 --- a/data/kata-collect-data.sh.in +++ b/data/kata-collect-data.sh.in @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2017-2018 Intel Corporation +# Copyright (c) 2017-2019 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # @@ -407,6 +407,11 @@ get_image_details() fi partitions=$(get_partitions "$loop_device") + if [ -z "$partitions" ]; then + release_device "$loop_device" + continue + fi + count=$(echo "$partitions"|wc -l) expected=1