1b02eb5b0SPaul E. McKenney			============
2b02eb5b0SPaul E. McKenney			LKMM SCRIPTS
3b02eb5b0SPaul E. McKenney			============
4b02eb5b0SPaul E. McKenney
5b02eb5b0SPaul E. McKenney
6b02eb5b0SPaul E. McKenneyThese scripts are run from the tools/memory-model directory.
7b02eb5b0SPaul E. McKenney
8b02eb5b0SPaul E. McKenneycheckalllitmus.sh
9b02eb5b0SPaul E. McKenney
10b02eb5b0SPaul E. McKenney	Run all litmus tests in the litmus-tests directory, checking
11b02eb5b0SPaul E. McKenney	the results against the expected results recorded in the
12b02eb5b0SPaul E. McKenney	"Result:" comment lines.
13b02eb5b0SPaul E. McKenney
14b02eb5b0SPaul E. McKenneycheckghlitmus.sh
15b02eb5b0SPaul E. McKenney
16b02eb5b0SPaul E. McKenney	Run all litmus tests in the https://github.com/paulmckrcu/litmus
17b02eb5b0SPaul E. McKenney	archive that are C-language and that have "Result:" comment lines
18b02eb5b0SPaul E. McKenney	documenting expected results, comparing the actual results to
19b02eb5b0SPaul E. McKenney	those expected.
20b02eb5b0SPaul E. McKenney
21b02eb5b0SPaul E. McKenneychecklitmushist.sh
22b02eb5b0SPaul E. McKenney
23b02eb5b0SPaul E. McKenney	Run all litmus tests having .litmus.out files from previous
24b02eb5b0SPaul E. McKenney	initlitmushist.sh or newlitmushist.sh runs, comparing the
2537c600a3SAndrea Parri	herd7 output to that of the original runs.
26b02eb5b0SPaul E. McKenney
27b02eb5b0SPaul E. McKenneychecklitmus.sh
28b02eb5b0SPaul E. McKenney
29b02eb5b0SPaul E. McKenney	Check a single litmus test against its "Result:" expected result.
30df0f6750SPaul E. McKenney	Not intended to for manual use.
31df0f6750SPaul E. McKenney
32df0f6750SPaul E. McKenneychecktheselitmus.sh
33df0f6750SPaul E. McKenney
34df0f6750SPaul E. McKenney	Check the specified list of litmus tests against their "Result:"
35df0f6750SPaul E. McKenney	expected results.  This takes optional parseargs.sh arguments,
36df0f6750SPaul E. McKenney	followed by "--" followed by pathnames starting from the current
37df0f6750SPaul E. McKenney	directory.
38b02eb5b0SPaul E. McKenney
39b02eb5b0SPaul E. McKenneycmplitmushist.sh
40b02eb5b0SPaul E. McKenney
41b02eb5b0SPaul E. McKenney	Compare output from two different runs of the same litmus tests,
42b02eb5b0SPaul E. McKenney	with the absolute pathnames of the tests to run provided one
43b02eb5b0SPaul E. McKenney	name per line on standard input.  Not normally run manually,
44b02eb5b0SPaul E. McKenney	provided instead for use by other scripts.
45b02eb5b0SPaul E. McKenney
46b02eb5b0SPaul E. McKenneyinitlitmushist.sh
47b02eb5b0SPaul E. McKenney
48b02eb5b0SPaul E. McKenney	Run all litmus tests having no more than the specified number
49b02eb5b0SPaul E. McKenney	of processes given a specified timeout, recording the results
50b02eb5b0SPaul E. McKenney	in .litmus.out files.
51b02eb5b0SPaul E. McKenney
52b02eb5b0SPaul E. McKenneyjudgelitmus.sh
53b02eb5b0SPaul E. McKenney
542024436dSPaul E. McKenney	Given a .litmus file and its herd7 output, check the output file
552024436dSPaul E. McKenney	against the .litmus file's "Result:" comment to judge whether
562024436dSPaul E. McKenney	the test ran correctly.  Not normally run manually, provided
572024436dSPaul E. McKenney	instead for use by other scripts.
58b02eb5b0SPaul E. McKenney
59b02eb5b0SPaul E. McKenneynewlitmushist.sh
60b02eb5b0SPaul E. McKenney
61b02eb5b0SPaul E. McKenney	For all new or updated litmus tests having no more than the
62b02eb5b0SPaul E. McKenney	specified number of processes given a specified timeout, run
63b02eb5b0SPaul E. McKenney	and record the results in .litmus.out files.
64b02eb5b0SPaul E. McKenney
65b02eb5b0SPaul E. McKenneyparseargs.sh
66b02eb5b0SPaul E. McKenney
67b02eb5b0SPaul E. McKenney	Parse command-line arguments.  Not normally run manually,
68b02eb5b0SPaul E. McKenney	provided instead for use by other scripts.
69b02eb5b0SPaul E. McKenney
70b02eb5b0SPaul E. McKenneyrunlitmushist.sh
71b02eb5b0SPaul E. McKenney
72b02eb5b0SPaul E. McKenney	Run the litmus tests whose absolute pathnames are provided one
73b02eb5b0SPaul E. McKenney	name per line on standard input.  Not normally run manually,
74b02eb5b0SPaul E. McKenney	provided instead for use by other scripts.
75b02eb5b0SPaul E. McKenney
76b02eb5b0SPaul E. McKenneyREADME
77b02eb5b0SPaul E. McKenney
78b02eb5b0SPaul E. McKenney	This file
79*05dc8470SPaul E. McKenney
80*05dc8470SPaul E. McKenneyTesting a change to LKMM might go as follows:
81*05dc8470SPaul E. McKenney
82*05dc8470SPaul E. McKenney	# Populate expected results without that change, and
83*05dc8470SPaul E. McKenney	# runs for about an hour on an 8-CPU x86 system:
84*05dc8470SPaul E. McKenney	scripts/initlitmushist.sh --timeout 10m --procs 10
85*05dc8470SPaul E. McKenney	# Incorporate the change:
86*05dc8470SPaul E. McKenney	git am -s -3 /path/to/patch # Or whatever it takes.
87*05dc8470SPaul E. McKenney
88*05dc8470SPaul E. McKenney	# Test the new version of LKMM as follows...
89*05dc8470SPaul E. McKenney
90*05dc8470SPaul E. McKenney	# Runs in seconds, good smoke test:
91*05dc8470SPaul E. McKenney	scripts/checkalllitmus.sh
92*05dc8470SPaul E. McKenney
93*05dc8470SPaul E. McKenney	# Compares results to those produced by initlitmushist.sh,
94*05dc8470SPaul E. McKenney	# and runs for about an hour on an 8-CPU x86 system:
95*05dc8470SPaul E. McKenney	scripts/checklitmushist.sh --timeout 10m --procs 10
96*05dc8470SPaul E. McKenney
97*05dc8470SPaul E. McKenney	# Checks results against Result tags, runs in minutes:
98*05dc8470SPaul E. McKenney	scripts/checkghlitmus.sh --timeout 10m --procs 10
99*05dc8470SPaul E. McKenney
100*05dc8470SPaul E. McKenneyThe checkghlitmus.sh should not report errors in cases where the
101*05dc8470SPaul E. McKenneychecklitmushist.sh script did not also report a change.  However,
102*05dc8470SPaul E. McKenneythis check is nevertheless valuable because it can find errors in the
103*05dc8470SPaul E. McKenneyoriginal version of LKMM.  Note however, that given the above procedure,
104*05dc8470SPaul E. McKenneyan error in the original LKMM version that is fixed by the patch will
105*05dc8470SPaul E. McKenneybe reported both as a mismatch by checklitmushist.sh and as an error
106*05dc8470SPaul E. McKenneyby checkghlitmus.sh.  One exception to this rule of thumb is when the
107*05dc8470SPaul E. McKenneytest fails completely on the original version of LKMM and passes on the
108*05dc8470SPaul E. McKenneynew version.  In this case, checklitmushist.sh will report a mismatch
109*05dc8470SPaul E. McKenneyand checkghlitmus.sh will report success.  This happens when the change
110*05dc8470SPaul E. McKenneyto LKMM introduces a new primitive for which litmus tests already existed.
111