/* * if.stp * * Check the systemtap if statement works */ probe begin { println("systemtap starting probe") } probe end { rc = 0 println("systemtap ending probe") if (1) { rc += 1 } else { println("systemtap test failure"); } if (0) { println("systemtap test failure"); } else { rc += 1 } if (rc == 2) println("systemtap test success") else printf("systemtap test failure (%d passes)\n", rc) }