Overview
Comment: | manual updates |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.65-debugging-update-orig |
Files: | files | file ages | folders |
SHA1: |
92eeabb009c6a829c5b04d2d72a7092e |
User & Date: | mrwellan on 2021-10-22 15:04:32 |
Other Links: | branch diff | manifest | tags |
Context
2022-02-17
| ||
09:22 | Squashed branch for manual updates Closed-Leaf check-in: e5d45e029c user: mrwellan tags: v1.65-debugging-update | |
2021-10-22
| ||
15:04 | manual updates Closed-Leaf check-in: 92eeabb009 user: mrwellan tags: v1.65-debugging-update-orig | |
2021-09-15
| ||
15:53 | Updated manual check-in: e04d99ce6b user: mrwellan tags: v1.65-debugging-update-orig | |
Changes
Modified docs/manual/debugging.txt from [b59cfb8782] to [731079995f].
︙ | ︙ | |||
160 161 162 163 164 165 166 | ---------------------------------------------------------------------- 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"] |====================== | | | | | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | ---------------------------------------------------------------------- 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 or try ... |A: post config processing | megatest -show-config -target your/target | #f (failed var processing) |B: post runconfig | megatest -show-runconfig -target your/target | Add -debug 0,9 to see which file your settings come from |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? Extract the "megatest -execute ..." command and run it from your xterm. |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! |====================== Bisecting megatest.csh/sh ^^^^^^^^^^^^^^^^^^^^^^^^^ Sometimes finding the environment variable that is causing the problem |
︙ | ︙ | |||
230 231 232 233 234 235 236 237 238 239 240 241 242 243 | ----------------- When this test is run an xterm will pop up. In that xterm the environment is exactly that in which the script "getcellnames.sh" would run. You can now debug the script to find out why it isn't working as expected. NOTE: This technique can be very helpful in debugging running of EDA tools in Perl, Ruby, Python or tcl scripts: .Perl example .............................. some_code(); $cmdline="virtuoso -some-switches and params ..."; print "$cmdline"; # print the command line so you can paste it into the xterm that pops up | > | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | ----------------- When this test is run an xterm will pop up. In that xterm the environment is exactly that in which the script "getcellnames.sh" would run. You can now debug the script to find out why it isn't working as expected. Similarly in a script just call the xterm. NOTE: This technique can be very helpful in debugging running of EDA tools in Perl, Ruby, Python or tcl scripts: .Perl example .............................. some_code(); $cmdline="virtuoso -some-switches and params ..."; print "$cmdline"; # print the command line so you can paste it into the xterm that pops up |
︙ | ︙ | |||
268 269 270 271 272 273 274 | ................... In scripts just insert the commands, this example helps you identify if "some commands ..." changed any environment variables.: .myscript.sh .............................. | | | > > | > > > > > | > > > > | > | > > > > > > | > | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | ................... In scripts just insert the commands, this example helps you identify if "some commands ..." changed any environment variables.: .myscript.sh .............................. env | sort > somefile-before.log some commands ... env | sort > somefile-after.log .............................. .Use meld to examine the differences .............................. meld somefile-before.log somefile-after.log .............................. Oneshot Modifying a Variable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To try various values for a variable without mutating the current value .within a bash shell .............................. SOMEVAR=123 runcmd.sh .............................. .within csh .............................. (setenv SOMEVAR 123;runcmd.sh) # OR env SOMEVAR=123 runcmd.sh .............................. Capturing output from a command ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .Use the "script" utility .............................. script -c "virtuoso -params and switches ..." .............................. |
Modified docs/manual/megatest_manual.html from [f34de80915] to [e81b3bd0b8].
︙ | ︙ | |||
2072 2073 2074 2075 2076 2077 2078 | <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> | | | 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 | <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> <th class="tableblock halign-left valign-top" > Watch for or try …</th> </tr> </thead> <tbody> <tr> <td class="tableblock halign-left valign-top" ><p class="tableblock">A: post config processing</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">megatest -show-config -target your/target</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">#f (failed var processing)</p></td> |
︙ | ︙ | |||
2104 2105 2106 2107 2108 2109 2110 | <td class="tableblock halign-left valign-top" ><p class="tableblock">E,F: launching test</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">start test xterm, look at mt_launch.log</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">Did your batch system accept the job? Has the job landed on a machine?</p></td> </tr> <tr> <td class="tableblock halign-left valign-top" ><p class="tableblock">G: starting test</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">look at your batch systems logs for the process</p></td> | | | 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 | <td class="tableblock halign-left valign-top" ><p class="tableblock">E,F: launching test</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">start test xterm, look at mt_launch.log</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">Did your batch system accept the job? Has the job landed on a machine?</p></td> </tr> <tr> <td class="tableblock halign-left valign-top" ><p class="tableblock">G: starting test</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">look at your batch systems logs for the process</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock monospaced">Did the megatest -execute process start and run? Extract the "megatest -execute …" command and run it from your xterm.</p></td> </tr> <tr> <td class="tableblock halign-left valign-top" ><p class="tableblock">H,H1,H2: step exectution</p></td> <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> |
︙ | ︙ | |||
2164 2165 2166 2167 2168 2169 2170 | DEBUG [system xterm] CELLNAME [system getcellnames.sh]</pre> </div></div> <div class="paragraph"><p>When this test is run an xterm will pop up. In that xterm the environment is exactly that in which the script "getcellnames.sh" would run. You can now debug the script to find out why it isn’t working as expected.</p></div> | | < < < < | < < | 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 | DEBUG [system xterm] CELLNAME [system getcellnames.sh]</pre> </div></div> <div class="paragraph"><p>When this test is run an xterm will pop up. In that xterm the environment is exactly that in which the script "getcellnames.sh" would run. You can now debug the script to find out why it isn’t working as expected.</p></div> <div class="paragraph"><p>Similarly in a script just call the xterm. NOTE: This technique can be very helpful in debugging running of EDA tools in Perl, Ruby, Python or tcl scripts:</p></div> <div class="literalblock"> <div class="title">Perl example</div> <div class="content monospaced"> <pre>some_code(); $cmdline="virtuoso -some-switches and params ..."; print "$cmdline"; # print the command line so you can paste it into the xterm that pops up system("xterm"); # this line is added for the debug and removed when done |
︙ | ︙ | |||
2205 2206 2207 2208 2209 2210 2211 | [system env | sort > stagename.log]</pre> </div></div> <div class="paragraph"><p>In scripts just insert the commands, this example helps you identify if "some commands …" changed any environment variables.:</p></div> <div class="literalblock"> <div class="title">myscript.sh</div> <div class="content monospaced"> | | | > | > | > > > > > | > | > > > < | 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 | [system env | sort > stagename.log]</pre> </div></div> <div class="paragraph"><p>In scripts just insert the commands, this example helps you identify if "some commands …" changed any environment variables.:</p></div> <div class="literalblock"> <div class="title">myscript.sh</div> <div class="content monospaced"> <pre>env | sort > somefile-before.log some commands ... env | sort > somefile-after.log</pre> </div></div> <div class="literalblock"> <div class="title">Use meld to examine the differences</div> <div class="content monospaced"> <pre>meld somefile-before.log somefile-after.log</pre> </div></div> </div> <div class="sect3"> <h4 id="_oneshot_modifying_a_variable">Oneshot Modifying a Variable</h4> <div class="paragraph"><p>To try various values for a variable without mutating the current value</p></div> <div class="literalblock"> <div class="title">within a bash shell</div> <div class="content monospaced"> <pre>SOMEVAR=123 runcmd.sh</pre> </div></div> <div class="literalblock"> <div class="title">within csh</div> <div class="content monospaced"> <pre>(setenv SOMEVAR 123;runcmd.sh) # OR env SOMEVAR=123 runcmd.sh</pre> </div></div> </div> </div> </div> </div> <div class="sect1"> <h2 id="_how_to_do_things">How To Do Things</h2> <div class="sectionbody"> |
︙ | ︙ |
Modified docs/manual/megatest_manual.pdf from [04c5fe16a4] to [8fe19d594b].
cannot compute difference between binary files