test: Make tests more resilient to changes in start-up performance
PATCH 1/1 test: Make tests more resilient to changes in start-up performance
From: Eugene Loh <[email protected]>
The tests with no target might start dtrace many times. The test time-out values should be long enough to withstand many starts even on slow test systems. Use time-out values for dtrace start-up times of as long as 10 seconds.
The tests with a target might start the target first and then expect more than one dtrace to start up and find that target. Make sure the target runs sufficiently long. Do not worry about making the target run too long, since the test will kill the target anyhow once it is no longer needed.
Signed-off-by Eugene Loh <[email protected]>
--- test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh | 2 +- test/unittest/dtrace-util/tst.ListProbesFunc.sh | 4 +++- test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh | 4 ++-- test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh | 4 ++-- test/unittest/dtrace-util/tst.ListProbesName.sh | 4 ++-- test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh | 4 ++-- test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh | 4 ++-- 7 files changed, 14 insertions(+), 12 deletions(-)
test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh +1 -1
@@ -53,7 +53,7 @@ main(int argc, char **argv) TEST_PROV_GO_DOUBLED(666, "foo"); TEST_PROV_GO_HALVED(666, "foo"); TEST_PROV_GO_VANISHING(666, "foo"); - sleep(10); + sleep(1000); /* long sleep is okay; we kill the process when we no longer need it */ } EOF
test/unittest/dtrace-util/tst.ListProbesFunc.sh +3 -1
@@ -1,11 +1,13 @@ #!/bin/bash # # Oracle Linux DTrace. -# Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at # http://oss.oracle.com/licenses/upl. # +# @@timeout: 100 + ## # # ASSERTION:
test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh +2 -2
@@ -1,7 +1,7 @@ #!/bin/bash # # Oracle Linux DTrace. -# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at # http://oss.oracle.com/licenses/upl. #
@@ -49,7 +49,7 @@ int main(int argc, char **argv) { TEST_PROV_GO(); - sleep(10); + sleep(1000); /* long sleep is okay; we kill the process when we no longer need it */ } EOF
test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh +2 -2
@@ -1,7 +1,7 @@ #!/bin/bash # # Oracle Linux DTrace. -# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at # http://oss.oracle.com/licenses/upl. #
@@ -49,7 +49,7 @@ int main(int argc, char **argv) { TEST_PROV_GO(); - sleep(10); + sleep(1000); /* long sleep is okay; we kill the process when we no longer need it */ } EOF
test/unittest/dtrace-util/tst.ListProbesName.sh +2 -2
@@ -1,12 +1,12 @@ #!/bin/bash # # Oracle Linux DTrace. -# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at # http://oss.oracle.com/licenses/upl. # -# @@timeout: 90 +# @@timeout: 160 ## #
test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh +2 -2
@@ -1,7 +1,7 @@ #!/bin/bash # # Oracle Linux DTrace. -# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at # http://oss.oracle.com/licenses/upl. #
@@ -49,7 +49,7 @@ int main(int argc, char **argv) { TEST_PROV_GO(); - sleep(10); + sleep(1000); /* long sleep is okay; we kill the process when we no longer need it */ } EOF
test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh +2 -2
@@ -1,7 +1,7 @@ #!/bin/bash # # Oracle Linux DTrace. -# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at # http://oss.oracle.com/licenses/upl. #
@@ -49,7 +49,7 @@ int main(int argc, char **argv) { TEST_PROV_GO(); - sleep(10); + sleep(1000); /* long sleep is okay; we kill the process when we no longer need it */ } EOF
Signature · 1 line
2.43.5