Oc Cheat Sheet

broken image


Orange County Public Law Library 515 N. Flower Street, Santa Ana, CA 92703 (714) 338-6790, www.ocpll.org COMMUNITY LEGAL AID SOCAL 2101 N. Tustin Avenue, Santa Ana, CA 92705 (714) 571-5200 or (800) 834-5001 www.communitylegalsocal.org Free Lawyer Referral Service: (714) 571-5204 www.socallawyerreferral.com ORANGE COUNTY BAR ASSOCIATION. OpenShift Cheat Sheet includes basic commands to help you using OpenShift. OpenShift is a family of containerization software developed by Red Hat. I haven't overclocked a CPU since I bought a Celeron 300 and got it to 450mhz. I never really saw the need for it since the cost of ram and other equipment outweighed the price difference of the chip. Plus I never wanted the fastest, just stable. I do a lot of side work.

  • 1Branch Coverage Cheat Sheet
    • 1.1General Guidance
    • 1.2C/x86
    • 1.3GNAT Ada/x86
    • 1.4XLC/PPC
    • 1.5PowerAda/PPC

This document provides information about interpreting the Branch Coverage Reports produced from data collected by the predefined probes coverage,ual (and brcov.ual) and the tool abrmerge. There are sections providing general guidance and sections for target-specific and compiler-specific guidance.

General Guidance

This section provides guidance applicable to all target ins compilers.

Markers/Colors

A source line with no line count (no color / no marker) is either a line with no object code and can be ignored or it is part of a subprogram for which coverage was not requested.

A source line with a positive line count (no marker / green color) is OK (has been executed).

A source line with a zero line count (+ marker / yellow color) needs attention (has not been executed).

A source line with a zero line count (* marker / red color) needs attention (has not been instrumented).

A branch with positive count (green color) is OK (has been executed).

A branch with a zero count (+ marker / yellow color) need attention (has not been executed).

A branch with a zero count (+ marker / red color) need attention (has not been instrumented).

Multiple Branches Per Line

Oc Cheat Sheet

Lines with multiple branches may be easier to work with if the source code is modified to put one decision per line.

versus

C/x86

This section provides guidance for GNU C compiler (gcc) on x86.

Functions

At the end of a function the closing brace may have a line count of 0 due to a patching problem. This is fixed in ap.4.4.63/7. Otherwise, the 0 line count can be ignored.

Loops

In a for loop, the index bounds test is completed at the top of the loop. If the branch associated with the for loop in not taken, then the body of the loop will not have been executed (line counts should be 0).

In a for loop, the index bounds test is completed at the top of the loop. The line count of the for loop should be greater than the branch count of the for loop because the final bounds check will fail and not branch back to the loop body.

In a while loop, the while test is completed at the top of the loop. If the branch associated with the while loop in not taken, then the body of the loop will not have been executed (line counts should be 0).

In a while loop, the while test is completed at the bottom of the loop. The line count of the while loop should be greater than the branch count of the for loop because the final while test will fail and not branch back to the loop body.

In a do-while loop, the while test is completed at the bottom of the loop. The line count of the do-while loop should be greater than the branch count of the for loop because the final while test will fail and not branch back to the loop body.

Conditional Operator (?)

Conditional operator expressions will generate one branch for each conditional operator (?).

Conditional operators on a single line will include a branch to the same line which is for the FALSE condition. If the branch is not taken then the TRUE conditional has not been executed. If the branch is executed fewer times than the line count then both conditions have been executed.

Conditional operator expressions spanning multiple source lines allow for easier (not easy) determination of decisions tested.

versus

Switch Statements

Switch statements with a default case will have a single branch to the default case and use a jump table for the rest. Line counts will indicate which cases have been executed.

Switch statements without a default will have branches for each case. Line counts will indicate which cases have been executed. There will also be a branch to the same line as the switch expression (which represents the default case) which is executed when no explicit cases are executed.

Switch statements with null or no statements will have branches to the next statement following the switch statement. If the switch statement is at the end of a loop, the next statement may be the loop condition test, whose source line number may/will be at the top of the loop.

If Statements

If statements will include (at least) one branch for the condition of each leg. If the branch count is not the same as the line count then both paths of the decision have been tested.

Oc Cheat Sheet

If statements with null/empty legs..TBD

If statement conditions with multiple boolean operators will have one branch associated with the whole condition. If the boolean operands are spread on separate source lines they will all have the same line count. (See short circuit operators.)

If statement conditions with short circuit operators will have one branch for each operand of the short circuit operator. If a branch has a count of 0 then that path has not been executed. If the boolean operands are spread on separate source lines they will have separate line counts which will indicate if each operand was executed.

GNAT Ada/x86

Exception Checks

Straight-line code will often include exception checks for ranges and bounds. If straight-line code contains branches to the same line then these are exception checks. If the branch counts are the same as the line counts then the exception checks passed and an exception was not raised.

Loops

All for loops will include a branch for the loop range check at the top. The normal loop range check should have a line count greater than the line count of the body statements to indicate the loop reached completion and the branch count should be non-zero to indicate the exit was taken. Testing for 0, 1, and multiple loop executions should be achieved with separate test runs.

For loops with dynamic bounds will test for a null loop range at the top of the loop and contain a branch to the next statement which is taken when the loop range is null.

While loops will test loop exit condition at the top of the loop and contain a branch to the next statement which is taken when the loop exit is taken. The loop exit condition should have a line count greater than the line count of the body statements to indicate the loop reached completion. Using short circuits operators in the loop exit condition will increase the number of branches, and each should be executed for complete coverage. Testing for 0, 1, and multiple loop executions should be achieved with separate test runs.

Exit Statements

Loop exit statements will include a branch which is taken when the exit is taken. The branch count should be less than the line count to indicate that both paths of the decision are taken. Using short circuits operators in the loop exit condition will increase the number of branches, and each should be executed for complete coverage.

Case Statements

Oc Client Cheat Sheet

Case statements will have a single branch at the top to handle the others case. Coverage of the when alternatives can be confirmed by line counts.

If Statements

If statements will include (at least) one branch for the condition of each leg. If the branch count is greater than zero but less than the line count then both paths of the decision have been tested. Wechip g20 remote control manual.

If statements conditions with multiple boolean operators will have one branch associated with the whole condition. If the boolean operands are spread on separate source lines they will all have the same line count. (See short circuit operators.)

If statement conditions with short circuit operators will have one branch for each operand of the short circuit operator. If a branch has a count of 0 then that path has not been executed. If the boolean operands are spread on separate source lines they will have separate line counts which will indicate if each operand was executed.

XLC/PPC

This section covers the IBM XLC compiler on AIX PPC targets.

Functions

At the end of a function the closing brace may have a line count of 0. This can be safely ignored.

Oc Voting Cheat Sheet

Loops

In a for loop, an index bounds test is completed at the top and bottom of the loop. The branches generated for those tests are associated with the first line ofthe loop, and the first is from the top of the loop and the second is from the bottom of the loop. test, the loop body was not executed (the difference of the counts).If the first branch count is less than the line count of the loop test, the loop body was not executed (the difference of the counts).

In a while loop, an loop exit test is completed at the top and bottom of the loop. The branches generated for those tests are associated with the first line ofthe loop, and the first is from the top of the loop and the second is from the bottom of the loop. test, the loop body was not executed (the difference of the counts).

In a do-while loop, an loop exit test is completed at the bottom of the loop. The branch generated for that test is associated with the last line of the loop. The loop body will have been executed one more time then the branch count, as confirmed by loop body line counts.

Conditional Operator (?)

Conditional operator expressions will generate one branch for each conditional operator (?). Conditional operators on a single line will include a branch to the same line which is for the FALSE condition. If the branch is not taken then the TRUE conditional has not been executed. If the branch is executed fewer times than the line count then both conditions have been executed.

Conditional operator expressions spanning multiple source lines allow for easier (not easy) determination of decisions tested.

Chrome updates happen automatically when you close and reopen Chrome. Discover how to check your version and apply a pending update.

Update my google chrome app

Lines with multiple branches may be easier to work with if the source code is modified to put one decision per line.

versus

C/x86

This section provides guidance for GNU C compiler (gcc) on x86.

Functions

At the end of a function the closing brace may have a line count of 0 due to a patching problem. This is fixed in ap.4.4.63/7. Otherwise, the 0 line count can be ignored.

Loops

In a for loop, the index bounds test is completed at the top of the loop. If the branch associated with the for loop in not taken, then the body of the loop will not have been executed (line counts should be 0).

In a for loop, the index bounds test is completed at the top of the loop. The line count of the for loop should be greater than the branch count of the for loop because the final bounds check will fail and not branch back to the loop body.

In a while loop, the while test is completed at the top of the loop. If the branch associated with the while loop in not taken, then the body of the loop will not have been executed (line counts should be 0).

In a while loop, the while test is completed at the bottom of the loop. The line count of the while loop should be greater than the branch count of the for loop because the final while test will fail and not branch back to the loop body.

In a do-while loop, the while test is completed at the bottom of the loop. The line count of the do-while loop should be greater than the branch count of the for loop because the final while test will fail and not branch back to the loop body.

Conditional Operator (?)

Conditional operator expressions will generate one branch for each conditional operator (?).

Conditional operators on a single line will include a branch to the same line which is for the FALSE condition. If the branch is not taken then the TRUE conditional has not been executed. If the branch is executed fewer times than the line count then both conditions have been executed.

Conditional operator expressions spanning multiple source lines allow for easier (not easy) determination of decisions tested.

versus

Switch Statements

Switch statements with a default case will have a single branch to the default case and use a jump table for the rest. Line counts will indicate which cases have been executed.

Switch statements without a default will have branches for each case. Line counts will indicate which cases have been executed. There will also be a branch to the same line as the switch expression (which represents the default case) which is executed when no explicit cases are executed.

Switch statements with null or no statements will have branches to the next statement following the switch statement. If the switch statement is at the end of a loop, the next statement may be the loop condition test, whose source line number may/will be at the top of the loop.

If Statements

If statements will include (at least) one branch for the condition of each leg. If the branch count is not the same as the line count then both paths of the decision have been tested.

If statements with null/empty legs..TBD

If statement conditions with multiple boolean operators will have one branch associated with the whole condition. If the boolean operands are spread on separate source lines they will all have the same line count. (See short circuit operators.)

If statement conditions with short circuit operators will have one branch for each operand of the short circuit operator. If a branch has a count of 0 then that path has not been executed. If the boolean operands are spread on separate source lines they will have separate line counts which will indicate if each operand was executed.

GNAT Ada/x86

Exception Checks

Straight-line code will often include exception checks for ranges and bounds. If straight-line code contains branches to the same line then these are exception checks. If the branch counts are the same as the line counts then the exception checks passed and an exception was not raised.

Loops

All for loops will include a branch for the loop range check at the top. The normal loop range check should have a line count greater than the line count of the body statements to indicate the loop reached completion and the branch count should be non-zero to indicate the exit was taken. Testing for 0, 1, and multiple loop executions should be achieved with separate test runs.

For loops with dynamic bounds will test for a null loop range at the top of the loop and contain a branch to the next statement which is taken when the loop range is null.

While loops will test loop exit condition at the top of the loop and contain a branch to the next statement which is taken when the loop exit is taken. The loop exit condition should have a line count greater than the line count of the body statements to indicate the loop reached completion. Using short circuits operators in the loop exit condition will increase the number of branches, and each should be executed for complete coverage. Testing for 0, 1, and multiple loop executions should be achieved with separate test runs.

Exit Statements

Loop exit statements will include a branch which is taken when the exit is taken. The branch count should be less than the line count to indicate that both paths of the decision are taken. Using short circuits operators in the loop exit condition will increase the number of branches, and each should be executed for complete coverage.

Case Statements

Oc Client Cheat Sheet

Case statements will have a single branch at the top to handle the others case. Coverage of the when alternatives can be confirmed by line counts.

If Statements

If statements will include (at least) one branch for the condition of each leg. If the branch count is greater than zero but less than the line count then both paths of the decision have been tested. Wechip g20 remote control manual.

If statements conditions with multiple boolean operators will have one branch associated with the whole condition. If the boolean operands are spread on separate source lines they will all have the same line count. (See short circuit operators.)

If statement conditions with short circuit operators will have one branch for each operand of the short circuit operator. If a branch has a count of 0 then that path has not been executed. If the boolean operands are spread on separate source lines they will have separate line counts which will indicate if each operand was executed.

XLC/PPC

This section covers the IBM XLC compiler on AIX PPC targets.

Functions

At the end of a function the closing brace may have a line count of 0. This can be safely ignored.

Oc Voting Cheat Sheet

Loops

In a for loop, an index bounds test is completed at the top and bottom of the loop. The branches generated for those tests are associated with the first line ofthe loop, and the first is from the top of the loop and the second is from the bottom of the loop. test, the loop body was not executed (the difference of the counts).If the first branch count is less than the line count of the loop test, the loop body was not executed (the difference of the counts).

In a while loop, an loop exit test is completed at the top and bottom of the loop. The branches generated for those tests are associated with the first line ofthe loop, and the first is from the top of the loop and the second is from the bottom of the loop. test, the loop body was not executed (the difference of the counts).

In a do-while loop, an loop exit test is completed at the bottom of the loop. The branch generated for that test is associated with the last line of the loop. The loop body will have been executed one more time then the branch count, as confirmed by loop body line counts.

Conditional Operator (?)

Conditional operator expressions will generate one branch for each conditional operator (?). Conditional operators on a single line will include a branch to the same line which is for the FALSE condition. If the branch is not taken then the TRUE conditional has not been executed. If the branch is executed fewer times than the line count then both conditions have been executed.

Conditional operator expressions spanning multiple source lines allow for easier (not easy) determination of decisions tested.

Chrome updates happen automatically when you close and reopen Chrome. Discover how to check your version and apply a pending update. To update Google Chrome: On your computer, open Chrome. At the top right, click More. Click Update Google Chrome. Important: If you can't find this button, you're on the latest version. Get more done with the new Google Chrome. A more simple, secure, and faster web browser than ever, with Google's smarts built-in. Restart Phone and Modem. Before you try the below-mentioned fixes, we would suggest you restart. For example, Google rolled out Chrome 90 to the stable channel for Windows, Mac, and Linux on April 14th with dozens of security fixes, but less than a week later, another update has arrived that.

Switch Statements

Switch statements with a default case will have a single branch to the default case which shows up as a branch to the top of the switch statement. (This is a conditional branch to an unconditional branch to the default case.) Line counts will indicate which cases have been executed.

Switch statements without a default will have branches for each case. Line counts will indicate which cases have been executed.

Switch statements with null or no statements will not have branches to those cases. For multiple cases with the same statements, each case will have a branch to the same source line.

If Statements

If statements will include (at least) one branch for the condition of each leg. If the branch count is not the same as the line count then both paths of the decision have been tested.

If statements with null/empty legs..TBD

If statement conditions with multiple boolean operators will have one branch associated with the whole condition. If the boolean operands are spread on separate source lines they will all have the same line count. (See short circuit operators.)

If statement conditions with short circuit operators will have one branch for each operand of the short circuit operator. If a branch has a count of 0 then that path has not been executed. If the boolean operands are spread on separate source lines they will have separate line counts which will indicate if each operand was executed.

Openshift Oc Client Cheat Sheet

PowerAda/PPC

This section covers the OCS PowerAda compiler for the PPC target.

Exception Checks

Straight-line code will often include exception checks for ranges and bounds. If straight-line code contains branches to the end of a subprogram then these are exception checks. Branch counts will indicate how many time the exception was raised.

Loops

All for loops will include a branch for the loop range check at the bottom. The normal loop range check should have a branch count less than the line count of the body statements to indicate the loop reached completion. Testing for 0, 1, and multiple loop executions should be achieved with separate test runs.

For loops with dynamic bounds will test for a null loop range at the top of the loop and contain a branch to the next statement which is taken when the loop range is null.

While loops will test the loop exit condition at the top of the loop and contain a branch to the next statement which is taken when the loop exit is taken. While loops will test the loop exit condition at the bottom of the loop too and contain a branch to the top of the loop which is taken when the loop continues. The loop exit condition should have a line count greater than the line count of the body statements to indicate the loop reached completion. Using short circuits operators in the loop exit condition will increase the number of branches, and each should be executed for complete coverage. Testing for 0, 1, and multiple loop executions should be achieved with separate test runs.

Oc Cli Cheat Sheet

Exit Statements

Loop exit statements will include a branch which is taken when the exit is taken. The branch count should be less than the line count to indicate that both paths of the decision are taken. Using short circuits operators in the loop exit condition will increase the number of branches, and each should be executed for complete coverage.

Oc Command Line Cheat Sheet

Case Statements

Case statements will have a branch for each alternative listed. The others alternative will have branches associated with values not handled by the specified alternatives, including values below the range, above the range, and values in between. Coverage of the when alternatives can be confirmed by line counts. Coverage of out of bound values can be confirmed by the branch counts.

If Statements

Oc Ballot Cheat Sheet

If statements will include (at least) one branch for the condition of each leg. If the branch count is greater than zero but less than the line count then both paths of the decision have been tested.

If statements conditions with multiple boolean operators will have one branch associated with the whole condition. If the boolean operands are spread on separate source lines they will all have the same line count. (See short circuit operators.)

Orc Cheat Sheet

If statement conditions with short circuit operators will have one branch for each operand of the short circuit operator. If a branch has a count of 0 then that path has not been executed. If the boolean operands are spread on separate source lines they will have separate line counts which will indicate if each operand was executed.

Retrieved from 'http://www.ocsystems.com/w/index.php?title=Branch_Coverage_Cheat_Sheet&oldid=1122'




broken image