1f08c3bdfSopenharmony_ciMCE test suite 2f08c3bdfSopenharmony_ci--------------- 3f08c3bdfSopenharmony_ci 4f08c3bdfSopenharmony_ciThe MCE test suite is a collection of tools and test scripts for 5f08c3bdfSopenharmony_citesting the Linux kernel machine check error recovery 6f08c3bdfSopenharmony_cifeatures. This is the code that deals with recovery from memory 7f08c3bdfSopenharmony_cibit errors and other hardware problems. 8f08c3bdfSopenharmony_ci 9f08c3bdfSopenharmony_ciFor some more details on machine checks see http://www.mcelog.org 10f08c3bdfSopenharmony_ci 11f08c3bdfSopenharmony_ciThe goal is to cover most Linux kernel MCE processing code paths 12f08c3bdfSopenharmony_ciand features with automation tests. 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_ciIn the Package 15f08c3bdfSopenharmony_ci-------------- 16f08c3bdfSopenharmony_ci 17f08c3bdfSopenharmony_ciHere is a short description of what is included in the package 18f08c3bdfSopenharmony_ci 19f08c3bdfSopenharmony_ciREADME 20f08c3bdfSopenharmony_ci This document 21f08c3bdfSopenharmony_ci 22f08c3bdfSopenharmony_ciCOPYING 23f08c3bdfSopenharmony_ci GNU General Public License 24f08c3bdfSopenharmony_ci 25f08c3bdfSopenharmony_ciMakefile 26f08c3bdfSopenharmony_ci Top level make file for MCE test suite 27f08c3bdfSopenharmony_ci 28f08c3bdfSopenharmony_cidrivers/* 29f08c3bdfSopenharmony_ci Contains test drivers, which drive test procedure and do some 30f08c3bdfSopenharmony_ci common works for test drivers. There is one directory for each 31f08c3bdfSopenharmony_ci test driver, the user interface of a driver is the driver.sh 32f08c3bdfSopenharmony_ci in corresponding directory, such as: 33f08c3bdfSopenharmony_ci drivers/kdump/driver.sh 34f08c3bdfSopenharmony_ci is user interface of kdump test driver. 35f08c3bdfSopenharmony_ci 36f08c3bdfSopenharmony_cicases/* 37f08c3bdfSopenharmony_ci Contains all test cases, which may be organized in 38f08c3bdfSopenharmony_ci sub-directories, the interface of a class of test cases is a 39f08c3bdfSopenharmony_ci shell script under cases/, such as: 40f08c3bdfSopenharmony_ci -- cases/soft-inj/panic/cases.sh 41f08c3bdfSopenharmony_ci is for test cases triggered by soft-inject and may cause system 42f08c3bdfSopenharmony_ci panic during testing. 43f08c3bdfSopenharmony_ci -- cases/apei-inj/ucr/cases.sh 44f08c3bdfSopenharmony_ci is for test cases triggered by apei-inject. 45f08c3bdfSopenharmony_ci 46f08c3bdfSopenharmony_ciconfig/* 47f08c3bdfSopenharmony_ci Contains test configuration files, which specifies the 48f08c3bdfSopenharmony_ci parameters for test driver, which test cases are used in test, 49f08c3bdfSopenharmony_ci the parameters for test cases, etc. 50f08c3bdfSopenharmony_ci 51f08c3bdfSopenharmony_citsrc/* 52f08c3bdfSopenharmony_ci Some standalone test programs for various parts of the machine 53f08c3bdfSopenharmony_ci check code. 54f08c3bdfSopenharmony_ci 55f08c3bdfSopenharmony_cilib/* 56f08c3bdfSopenharmony_ci Contains some shell scripts, in which some common shell 57f08c3bdfSopenharmony_ci functions and variable definitions are defined to be used by 58f08c3bdfSopenharmony_ci multiple test drivers or test cases. 59f08c3bdfSopenharmony_ci 60f08c3bdfSopenharmony_citools/* 61f08c3bdfSopenharmony_ci Some tools used by MCE test suites. 62f08c3bdfSopenharmony_ci 63f08c3bdfSopenharmony_cidoc/* 64f08c3bdfSopenharmony_ci Documentation for MCE test suites include howto and 65f08c3bdfSopenharmony_ci descriptions of every test case. 66f08c3bdfSopenharmony_ci 67f08c3bdfSopenharmony_ciresults/ 68f08c3bdfSopenharmony_ci When test is done, the test result will be placed in this 69f08c3bdfSopenharmony_ci directory, test results for a specific test driver will be 70f08c3bdfSopenharmony_ci placed in corresponding directory, such as test results of 71f08c3bdfSopenharmony_ci kdump test driver will be placed in "results/kdump". General 72f08c3bdfSopenharmony_ci test result is in results/$driver/result; additional results 73f08c3bdfSopenharmony_ci of various cases may be in corresponding directory, for 74f08c3bdfSopenharmony_ci example, files in 75f08c3bdfSopenharmony_ci results/kdump/soft-inj/panic/fatal/ 76f08c3bdfSopenharmony_ci is for additional result for test case soft-inj/panic/fatal. 77f08c3bdfSopenharmony_ci 78f08c3bdfSopenharmony_ciwork/ 79f08c3bdfSopenharmony_ci During test, some temporary file will be put in work 80f08c3bdfSopenharmony_ci directory, temporary files for a specific test driver will be 81f08c3bdfSopenharmony_ci placed in corresponding directory, such as temporary files of 82f08c3bdfSopenharmony_ci kdump test driver will be placed in "work/kdump". Test log is 83f08c3bdfSopenharmony_ci in work/$driver/log. 84f08c3bdfSopenharmony_ci 85f08c3bdfSopenharmony_cibin/ 86f08c3bdfSopenharmony_ci Some tools used by test drivers or test cases will be 87f08c3bdfSopenharmony_ci installed into this directory. 88f08c3bdfSopenharmony_ci 89f08c3bdfSopenharmony_cistress/ 90f08c3bdfSopenharmony_ci Linux MCE stress test suite. 91f08c3bdfSopenharmony_ci 92f08c3bdfSopenharmony_ciTest Instruction 93f08c3bdfSopenharmony_ci---------------- 94f08c3bdfSopenharmony_ci 95f08c3bdfSopenharmony_ciPlease refer to corresponding section in doc/howto.txt. 96f08c3bdfSopenharmony_ci 97f08c3bdfSopenharmony_ciVery quick way to test this: 98f08c3bdfSopenharmony_ci be root 99f08c3bdfSopenharmony_ci make sure you have a kernel with CONFIG_X86_MCE_INJECT 100f08c3bdfSopenharmony_ci and CONFIG_HWPOISON_INJECT and soft-offlining support 101f08c3bdfSopenharmony_ci run "make test" 102f08c3bdfSopenharmony_ci 103f08c3bdfSopenharmony_ciFuther Information 104f08c3bdfSopenharmony_ci------------------ 105f08c3bdfSopenharmony_ci 106f08c3bdfSopenharmony_ciFor futher information about MCE test suite, please refer to documents 107f08c3bdfSopenharmony_ciin doc sub-directory. 108f08c3bdfSopenharmony_ci 109f08c3bdfSopenharmony_cidoc/howto.txt: a more detailed HOWTO document 110f08c3bdfSopenharmony_ci 111f08c3bdfSopenharmony_cidoc/stress-howto.txt: Detailed HOWTO document for MCE stress test suite 112f08c3bdfSopenharmony_ci 113f08c3bdfSopenharmony_cidoc/cases/*.txt: Description of every test case, including test 114f08c3bdfSopenharmony_ci objective, code patch tested, reference and 115f08c3bdfSopenharmony_ci expected results 116