Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/memory-model: Document LKMM test procedure

This commit documents how to run the various scripts in order to test
a potentially pervasive change to the memory model.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

+32
+32
tools/memory-model/scripts/README
··· 76 76 README 77 77 78 78 This file 79 + 80 + Testing a change to LKMM might go as follows: 81 + 82 + # Populate expected results without that change, and 83 + # runs for about an hour on an 8-CPU x86 system: 84 + scripts/initlitmushist.sh --timeout 10m --procs 10 85 + # Incorporate the change: 86 + git am -s -3 /path/to/patch # Or whatever it takes. 87 + 88 + # Test the new version of LKMM as follows... 89 + 90 + # Runs in seconds, good smoke test: 91 + scripts/checkalllitmus.sh 92 + 93 + # Compares results to those produced by initlitmushist.sh, 94 + # and runs for about an hour on an 8-CPU x86 system: 95 + scripts/checklitmushist.sh --timeout 10m --procs 10 96 + 97 + # Checks results against Result tags, runs in minutes: 98 + scripts/checkghlitmus.sh --timeout 10m --procs 10 99 + 100 + The checkghlitmus.sh should not report errors in cases where the 101 + checklitmushist.sh script did not also report a change. However, 102 + this check is nevertheless valuable because it can find errors in the 103 + original version of LKMM. Note however, that given the above procedure, 104 + an error in the original LKMM version that is fixed by the patch will 105 + be reported both as a mismatch by checklitmushist.sh and as an error 106 + by checkghlitmus.sh. One exception to this rule of thumb is when the 107 + test fails completely on the original version of LKMM and passes on the 108 + new version. In this case, checklitmushist.sh will report a mismatch 109 + and checkghlitmus.sh will report success. This happens when the change 110 + to LKMM introduces a new primitive for which litmus tests already existed.