cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

_chk_dependency.sh (393B)


      1#!/bin/bash
      2# SPDX-License-Identifier: GPL-2.0
      3
      4# Kselftest framework requirement - SKIP code is 4.
      5ksft_skip=4
      6
      7DBGFS=/sys/kernel/debug/damon
      8
      9if [ $EUID -ne 0 ];
     10then
     11	echo "Run as root"
     12	exit $ksft_skip
     13fi
     14
     15if [ ! -d "$DBGFS" ]
     16then
     17	echo "$DBGFS not found"
     18	exit $ksft_skip
     19fi
     20
     21for f in attrs target_ids monitor_on
     22do
     23	if [ ! -f "$DBGFS/$f" ]
     24	then
     25		echo "$f not found"
     26		exit 1
     27	fi
     28done