1#!/bin/sh 2################################################################################ 3# 4# Copyright (C) 2022 Huawei Device Co., Ltd. 5# SPDX-License-Identifier: GPL-2.0 6# 7# Unless required by applicable law or agreed to in writing, software 8# distributed under the License is distributed on an "AS IS" BASIS, 9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10# See the License for the specific language governing permissions and 11# limitations under the License. 12# 13################################################################################ 14# File: enhancedswap_t_uninit.sh 15# 16# Description: enhancedswap_t testsuite uninit script 17# 18# Authors: Ma Feng - mafeng.ma@huawei.com 19# 20# History: Mar 24 2022 - init scripts 21# 22################################################################################ 23 24uninit_platform() 25{ 26 losetup -d /dev/block/loop7 27 echo ${hyperhold_device} > /proc/sys/kernel/hyperhold/device 28 echo ${hyperhold_enable} > /proc/sys/kernel/hyperhold/enable 29 echo ${zram0_group} > /sys/block/zram0/group 30 echo ${zram0_disksize} > /sys/block/zram0/disksize 31 rm -rf hpdisk 32 swapoff /dev/block/zram0 33 echo 1 > /sys/block/zram0/reset 34} 35 36echo "***************************ESWAP UNINIT START***************************" 37free -m 38uninit_platform 39echo "***************************ESWAP UNINIT END***************************"