From d6f447636c8f43e354b5cbf9a7d84bd867a08211 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 9 Nov 2011 10:52:45 +0100 Subject: [PATCH] plt.exp should be tolerant of slight function call variations. __cxa_finalize can be called more than once, the number of calls to free can be more than expected with different glibc versions. --- testsuite/systemtap.base/plt.exp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/testsuite/systemtap.base/plt.exp b/testsuite/systemtap.base/plt.exp index 45fbb3fda..0752a9c4c 100644 --- a/testsuite/systemtap.base/plt.exp +++ b/testsuite/systemtap.base/plt.exp @@ -87,14 +87,15 @@ expect { -re {asctime 1\r\n} { incr ok; exp_continue } -re {fputs 3\r\n} { incr ok; exp_continue } -re {strftime 2\r\n} { incr ok; exp_continue } - -re {__cxa_finalize 1\r\n} { incr ok; exp_continue } + -re {__cxa_finalize \d\r\n} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } catch { close}; catch { wait} -error_handler [expr {$ok == 31}] "plt" "($ok != 31)" +# The number of __cxa_finalize can be different or non-existent. +error_handler [expr {$ok == 31 || $ok == 32}] "plt" "($ok != 31 || $ok != 32)" # test process.library.plt @@ -113,7 +114,7 @@ expect { -re {strcpy 2\r\n} { incr ok; exp_continue } -re {open 2\r\n} { incr ok; exp_continue } -re {open3 1\r\n} { incr ok; exp_continue } - -re {free 4\r\n} { incr ok; exp_continue } + -re {free \d+\r\n} { incr ok; exp_continue } -re {basename2 1\r\n} { incr ok; exp_continue } -re {__xpg_basename 1\r\n} { incr ok; exp_continue } -re {critters 1\r\n} { incr ok; exp_continue } @@ -134,14 +135,15 @@ expect { -re {asctime 1\r\n} { incr ok; exp_continue } -re {fputs 3\r\n} { incr ok; exp_continue } -re {strftime 2\r\n} { incr ok; exp_continue } - -re {__cxa_finalize 1\r\n} { incr ok; exp_continue } + -re {__cxa_finalize \d\r\n} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } catch { close}; catch { wait} -error_handler [expr {$ok == 31}] "plt library" "($ok != 31)" +# The number of __cxa_finalize can be different or non-existent. +error_handler [expr {$ok == 31 || $ok == 32}] "plt library" "($ok != 31 || $ok != 32)" # test process.plt("glob") -- 2.43.5