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