From 6179a370d89b073d19407ec3d29e5e890367582b Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 15 Oct 2009 21:55:16 +0200 Subject: Fix transok/tval-opt.stp testcase. Pick diffent function and non-empty block. This testcase succeeded just because the value being set couldn't be found. So the error message being compared was the same. Set -o pipefail to catch that case. On vta compiled kernels it failed because the optimizer turned { statement } into statement. So pick a function and argument which location can always be found and add an extra 'next' statement so the block isn't folded. * testsuite/transok/tval-opt.stp: Set -o pipefail. Add 'next' to make sure block isn't empty. Use "do_filp_open" and "mode". --- testsuite/transok/tval-opt.stp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testsuite/transok/tval-opt.stp b/testsuite/transok/tval-opt.stp index 76dcfd24..6c795a5d 100755 --- a/testsuite/transok/tval-opt.stp +++ b/testsuite/transok/tval-opt.stp @@ -1,8 +1,9 @@ #! /bin/sh set -e +set -o pipefail -script='probe kernel.function("kbd_keycode") { if ($keycode==50) $keycode=49 }' +script='probe kernel.function("do_filp_open") { if ($mode==50) $mode=49 next }' s1=`stap -p3 -g -e "$script" | sum` s2=`stap -p3 -g -u -e "$script" | sum` -- cgit