-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ras: introduce ras feature into lkvs
Introduce RAS (Reliability, Availability, and Serviceability) into lkvs. Add several error injection test cases. Signed-off-by: Lai, Yi1 <[email protected]>
- Loading branch information
Showing
3 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
SUBDIRS := mce-test | ||
|
||
.PHONY: all | ||
all: $(SUBDIRS) | ||
|
||
.PHONY: $(SUBDIRS) | ||
$(SUBDIRS): | ||
$(MAKE) -C $@ | ||
|
||
.PHONY: install | ||
install: | ||
for dir in $(SUBDIRS); do \ | ||
$(MAKE) -C $$dir install; \ | ||
done | ||
|
||
.PHONY: clean | ||
clean: | ||
for dir in $(SUBDIRS); do \ | ||
$(MAKE) -C $$dir clean; \ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# Copyright (c) 2024 Intel Corporation | ||
# Author: Yi Lai <[email protected]> | ||
# @Desc Test script to verify Intel RAS functionality | ||
|
||
# Prerequisite | ||
if ! rpm -q screen &> /dev/null; then | ||
echo "screen is not installed. Installing now..." | ||
sudo yum install -y screen | ||
fi | ||
|
||
cd "$(dirname "$0")" 2>/dev/null || exit 1 | ||
source ../.env | ||
|
||
usage() { | ||
cat <<__EOF | ||
usage: ./${0##*/} [-t TESTCASE_ID] [-H] | ||
-t TEST CASE ID | ||
-H show this | ||
__EOF | ||
} | ||
|
||
ras_check_result() { | ||
local testcase=$1 | ||
|
||
if [ $? -eq 0 ]; then | ||
test_print_trc "${testcase} Test PASS" | ||
else | ||
die "${testcase} Test FAIL" | ||
fi | ||
} | ||
|
||
ras_test() { | ||
case $TEST_SCENARIO in | ||
apei-inj) | ||
cd mce-test/cases/function/apei-inj/ | ||
sh runtest.sh | ||
;; | ||
core_recovery_ifu) | ||
cd mce-test/cases/function/core_recovery/ | ||
sh runtest_ifu.sh | ||
;; | ||
core_recovery_dcu) | ||
cd mce-test/cases/function/core_recovery/ | ||
sh runtest_dcu.sh | ||
;; | ||
edac) | ||
cd mce-test/cases/function/edac/ | ||
sh runtest.sh | ||
;; | ||
einj-ext) | ||
cd mce-test/cases/function/einj-ext/ | ||
sh runtest.sh | ||
;; | ||
emca-inj) | ||
cd mce-test/cases/function/emca-inj/ | ||
sh runtest.sh | ||
;; | ||
erst-inject) | ||
cd mce-test/cases/function/erst-inject/ | ||
sh runtest.sh | ||
;; | ||
pfa) | ||
cd mce-test/cases/function/pfa/ | ||
sh runtest.sh | ||
;; | ||
esac | ||
ras_check_result $TEST_SCENARIO | ||
} | ||
|
||
while getopts :t:H arg; do | ||
case $arg in | ||
t) | ||
TEST_SCENARIO=$OPTARG | ||
;; | ||
H) | ||
usage && exit 0 | ||
;; | ||
\?) | ||
usage | ||
die "Invalid Option -$OPTARG" | ||
;; | ||
:) | ||
usage | ||
die "Option -$OPTARG requires an argument." | ||
;; | ||
esac | ||
done | ||
|
||
ras_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file collects Intel RAS/MCE testcases which can run against | ||
# Intel® Architecture-based platforms. | ||
# @other_dep: general_test.sh -t module -p einj @ No module einj | ||
|
||
ras_test.sh -t apei-inj | ||
ras_test.sh -t core_recovery_ifu | ||
ras_test.sh -t core_recovery_dcu | ||
ras_test.sh -t edac | ||
ras_test.sh -t einj-ext | ||
ras_test.sh -t emca-inj | ||
ras_test.sh -t erst-inject | ||
ras_test.sh -t pfa |