Overview
Comment: | Updates to manual on debugging |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.65-debugging-update-orig |
Files: | files | file ages | folders |
SHA1: |
3080c40f63a5b5748f881dbb1e627476 |
User & Date: | matt on 2021-09-08 05:48:03 |
Other Links: | branch diff | manifest | tags |
Context
2021-09-09
| ||
19:50 | Added debugging tutorial presentation (incomplete) check-in: 55e58540d6 user: matt tags: v1.65-debugging-update-orig | |
2021-09-08
| ||
05:48 | Updates to manual on debugging check-in: 3080c40f63 user: matt tags: v1.65-debugging-update-orig | |
2021-09-07
| ||
21:01 | Added more debugging info check-in: 21da809595 user: matt tags: v1.65-debugging-update-orig | |
Changes
Modified docs/manual/debugging.txt from [8c97f79f3e] to [2118252156].
︙ | ︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | A word on Bisecting ~~~~~~~~~~~~~~~~~~~ Bisecting is a debug strategy intended to speed up finding the root cause. ["graphviz", "bisecting.png"] ---------------------------------------------------------------------- include::bisecting.dot[] ---------------------------------------------------------------------- It is common to start debugging where the problem was observed and then work back. However by inspecting the output at stage "C" in the example above you would potentially save a lot of debug effort, this is similar to the feature in source control tools like git and fossil called biseceting. To know where to look for problems you will want to look at the log files at various stages in the execution process. ["graphviz", "megatest-test-stages.png"] ---------------------------------------------------------------------- include::megatest-test-stages.dot[] ---------------------------------------------------------------------- | > > > | | | | | > > > > > > > > > | | | > | > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | A word on Bisecting ~~~~~~~~~~~~~~~~~~~ Bisecting is a debug strategy intended to speed up finding the root cause. .A complex process with a problem found in stage "E" ["graphviz", "bisecting.png"] ---------------------------------------------------------------------- include::bisecting.dot[] ---------------------------------------------------------------------- It is common to start debugging where the problem was observed and then work back. However by inspecting the output at stage "C" in the example above you would potentially save a lot of debug effort, this is similar to the feature in source control tools like git and fossil called biseceting. To know where to look for problems you will want to look at the log files at various stages in the execution process. .A simplified diagram of the stages Megatest goes through to run a test. ["graphviz", "megatest-test-stages.png"] ---------------------------------------------------------------------- include::megatest-test-stages.dot[] ---------------------------------------------------------------------- .How to check variable values and inspect logs at each stage [width="80%",cols="<,2m,2m",frame="topbot",options="header"] |====================== |Stage | How to inspect | Watch for |A: post config processing | megatest -show-config -target your/target | #f (failed var processing) |B: post runconfig | megatest -show-runconfig -target your/target | |C: processing testconfigs | inspect output from "megatest -run ..." | Messages indicating issues process configs, dependency problems. |D: process testconfig for test launch | inspect output from megatest runner | Zero items (items expansion yielded no items) |E,F: launching test | start test xterm, look at mt_launch.log | Did your batch system accept the job? Has the job landed on a machine? |G: starting test | look at your batch systems logs for the process | Did the megatest -execute process start and run? |H,H1,H2: step exectution | look at <stepname>.log, <stepname>.html and your own internal logs | Do you have sufficiently tight logpro rules? You must always have a "required" rule! |====================== Examining The Test Logs and Environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test Control Panel - xterm ^^^^^^^^^^^^^^^^^^^^^^^^^^ From the dashboard click on a test PASS/FAIL button. This brings up a test control panel. Aproximately near the center left of the window there is a button "Start Xterm". Push this to get an xterm with the full context and environment loaded for that test. You can run scripts or ezsteps by copying from the testconfig (hint, load up the testconfig in a separate text editor window). With more recent versions of Megatest you can step through your test from the test control panel. Click on the cell labeled "rerun this step" to only rerun the step or click on "restart from here" to rerun that step and downstream steps. NOTE 1: visual feedback can take some time, give it a few seconds and you will see the step change color to blue as it starts running. NOTE 2: steping through only works if you are using ezsteps. Config File Processing ^^^^^^^^^^^^^^^^^^^^^^ As described above it is often helpful to know the content of variables in various contexts as Megatest works through the actions needed to run your tests. A handy technique is to force the startup of an xterm in the context being examined. For example, if an item list is not being generated as expected you can inject the startup of an xterm as if it were an item: .Original items table ----------------- [items] |
︙ | ︙ |
Modified docs/manual/megatest_manual.html from [3ae4795548] to [3f040e4a9a].
︙ | ︙ | |||
1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 | <h3 id="_a_word_on_bisecting">A word on Bisecting</h3> <div class="paragraph"><p>Bisecting is a debug strategy intended to speed up finding the root cause.</p></div> <div class="imageblock graphviz"> <div class="content"> <img src="bisecting.png" alt="bisecting.png"> </div> </div> <div class="paragraph"><p>It is common to start debugging where the problem was observed and then work back. However by inspecting the output at stage "C" in the example above you would potentially save a lot of debug effort, this is similar to the feature in source control tools like git and fossil called biseceting.</p></div> <div class="paragraph"><p>To know where to look for problems you will want to look at the log files at various stages in the execution process.</p></div> <div class="imageblock graphviz"> <div class="content"> <img src="megatest-test-stages.png" alt="megatest-test-stages.png"> </div> </div> <table class="tableblock frame-topbot grid-all" style=" width:80%; "> | > > | | 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 | <h3 id="_a_word_on_bisecting">A word on Bisecting</h3> <div class="paragraph"><p>Bisecting is a debug strategy intended to speed up finding the root cause.</p></div> <div class="imageblock graphviz"> <div class="content"> <img src="bisecting.png" alt="bisecting.png"> </div> <div class="title">Figure 1. A complex process with a problem found in stage "E"</div> </div> <div class="paragraph"><p>It is common to start debugging where the problem was observed and then work back. However by inspecting the output at stage "C" in the example above you would potentially save a lot of debug effort, this is similar to the feature in source control tools like git and fossil called biseceting.</p></div> <div class="paragraph"><p>To know where to look for problems you will want to look at the log files at various stages in the execution process.</p></div> <div class="imageblock graphviz"> <div class="content"> <img src="megatest-test-stages.png" alt="megatest-test-stages.png"> </div> <div class="title">Figure 2. A simplified diagram of the stages Megatest goes through to run a test.</div> </div> <table class="tableblock frame-topbot grid-all" style=" width:80%; "> <caption class="title">Table 2. How to check variable values and inspect logs at each stage</caption> <col style="width:20%;"> <col style="width:40%;"> <col style="width:40%;"> <thead> <tr> <th class="tableblock halign-left valign-top" >Stage </th> <th class="tableblock halign-left valign-top" > How to inspect </th> |
︙ | ︙ | |||
2004 2005 2006 2007 2008 2009 2010 | <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">look at <stepname>.log, <stepname>.html and your own internal logs</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">Do you have sufficiently tight logpro rules? You must always have a "required" rule!</p></td> </tr> </tbody> </table> </div> <div class="sect2"> | | | > > > | > > > | | > | > | 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 | <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">look at <stepname>.log, <stepname>.html and your own internal logs</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">Do you have sufficiently tight logpro rules? You must always have a "required" rule!</p></td> </tr> </tbody> </table> </div> <div class="sect2"> <h3 id="_examining_the_test_logs_and_environment">Examining The Test Logs and Environment</h3> <div class="sect3"> <h4 id="_test_control_panel_xterm">Test Control Panel - xterm</h4> <div class="paragraph"><p>From the dashboard click on a test PASS/FAIL button. This brings up a test control panel. Aproximately near the center left of the window there is a button "Start Xterm". Push this to get an xterm with the full context and environment loaded for that test. You can run scripts or ezsteps by copying from the testconfig (hint, load up the testconfig in a separate text editor window).</p></div> <div class="paragraph"><p>With more recent versions of Megatest you can step through your test from the test control panel. Click on the cell labeled "rerun this step" to only rerun the step or click on "restart from here" to rerun that step and downstream steps.</p></div> <div class="paragraph"><p>NOTE 1: visual feedback can take some time, give it a few seconds and you will see the step change color to blue as it starts running.</p></div> <div class="paragraph"><p>NOTE 2: steping through only works if you are using ezsteps.</p></div> </div> <div class="sect3"> <h4 id="_config_file_processing">Config File Processing</h4> <div class="paragraph"><p>As described above it is often helpful to know the content of variables in various contexts as Megatest works through the actions needed to run your tests. A handy technique is to force the startup of an xterm in the context being examined.</p></div> <div class="paragraph"><p>For example, if an item list is not being generated as expected you can inject the startup of an xterm as if it were an item:</p></div> <div class="listingblock"> <div class="title">Original items table</div> <div class="content monospaced"> <pre>[items] CELLNAME [system getcellname.sh]</pre> |
︙ | ︙ |
Modified docs/manual/megatest_manual.pdf from [0043fc7813] to [b8b9dd9fc4].
cannot compute difference between binary files