-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edac: introduce edac feature into lkvs
Intel i10nm EDAC driver supports the Intel 10nm series server integrated memory controller. Introduce this feature into lkvs test suite and add 2 test cases. Signed-off-by: Lai, Yi1 <[email protected]>
- Loading branch information
Showing
3 changed files
with
90 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,19 @@ | ||
# EDAC | ||
|
||
EDAC (Error Detection and Correction) framework provides support for detecting and correcting memory errors on systems with ECC (Error-Correcting Code) memory or other error detection mechanism. | ||
|
||
Intel i10nm EDAC driver supports the Intel 10nm series server integrated memory controller. | ||
|
||
## Usage | ||
|
||
You can run the cases one by one, e.g. command | ||
|
||
``` | ||
./intel_edac.sh -t check_edac_bus | ||
``` | ||
You also can run the cases together with runtests command, e.g. | ||
|
||
``` | ||
cd .. | ||
./runtests -f edac/tests -o logfile | ||
``` |
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,66 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# Copyright (c) 2022 Intel Corporation | ||
# Description: Test script for Intel i10nm EDAC driver, which supports 10nm series server | ||
# EDAC: Error Detection and Correction | ||
# @Author Yi Lai [email protected] | ||
|
||
|
||
cd "$(dirname "$0")" 2>/dev/null || exit 1 | ||
source ../.env | ||
|
||
EDAC_BUS="/sys/bus/edac" | ||
EDAC_DRIVER=i10nm_edac | ||
|
||
: "${CASE_NAME:=""}" | ||
|
||
usage() { | ||
cat <<__EOF | ||
usage: ./${0##*/} [-t TESTCASE_ID] [-H] | ||
-t TEST CASE ID | ||
-H show this | ||
__EOF | ||
} | ||
|
||
edac_test() { | ||
case $TEST_SCENARIO in | ||
check_edac_bus) | ||
edac_bus=$(ls $EDAC_BUS) | ||
if [ -n "$edac_bus" ]; then | ||
test_print_trc "EDAC bus is found" | ||
else | ||
die "EDAC bus is not found" | ||
fi | ||
;; | ||
check_edac_driver) | ||
test_print_trc "Check Intel i10nm edac driver" | ||
lsmod | grep -q $EDAC_DRIVER | ||
if ! lsmod | grep -q $EDAC_DRIVER; then | ||
die "Intel i10nm edac driver is not loaded" | ||
else | ||
test_print_trc "Intel i10nm edac driver is loaded" | ||
fi | ||
;; | ||
esac | ||
} | ||
|
||
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 | ||
|
||
edac_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,5 @@ | ||
# This file collects Intel EDAC driver testcases which can run against | ||
# on Intel 10nm series server | ||
|
||
intel_edac.sh -t check_edac_bus | ||
intel_edac.sh -t check_edac_driver |