Framework of install-iso-release.
Signed-off-by: Yu Chuan 13186087857@163.com --- jobs/install-iso-release.yaml | 26 +++++++++++++++++++ tests/install-iso-release | 47 +++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 jobs/install-iso-release.yaml create mode 100755 tests/install-iso-release
diff --git a/jobs/install-iso-release.yaml b/jobs/install-iso-release.yaml new file mode 100644 index 000000000000..fabb2cd50902 --- /dev/null +++ b/jobs/install-iso-release.yaml @@ -0,0 +1,26 @@ +suite: install-iso-release +category: benchmark +install-iso-release: + ################# + # iso info + ################# + iso_os: + iso_arch: + iso_version: + + ################# + # nfs server info, used for store rootfs + ################# + NFS_SERVER_HOST: + NFS_ROOT_DIR: + + ################# + # result rootfs suffix, format: $(date "+%Y%m%d%H%M%S") + ################# + ROOTFS_SUFFIX: + + ################# + # name of volume group which stores the logical volume of rootfs + ################# + VG_NAME: + diff --git a/tests/install-iso-release b/tests/install-iso-release new file mode 100755 index 000000000000..23e8fbff8e4f --- /dev/null +++ b/tests/install-iso-release @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. + +set -e + +. $LKP_SRC/lib/debug.sh +. $LKP_SRC/lib/log.sh + +check_params() +{ + log_info "start check params" + + local required_vars=( + "iso_os" + "iso_arch" + "iso_version" + + "NFS_SERVER_HOST" + "NFS_ROOT_DIR" + + "ROOTFS_SUFFIX" + "VG_NAME" + ) + + for i in "${required_vars[@]}" + do + [ -n "$(eval echo $$i)" ] || die "cannot get value of var: $i" + done +} + +release_rootfs() +{ + : +} + +main() +{ + check_params + + release_rootfs + + lvchange --permission r /dev/mapper/${VG_NAME}-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX} || + die "change logical volume permission to readonly failed:/dev/mapper/${VG_NAME}-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX}" +} + +main