[DTrace-devel] [PATCH] test: Make tests more resilient to changes in start-up performance
eugene.loh at oracle.com
eugene.loh at oracle.com
Tue Dec 10 06:20:52 UTC 2024
From: Eugene Loh <eugene.loh at oracle.com>
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 <eugene.loh at oracle.com>
---
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(-)
diff --git a/test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh
index 2184f2bbb..737f2cc88 100755
--- a/test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh
@@ -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
diff --git a/test/unittest/dtrace-util/tst.ListProbesFunc.sh b/test/unittest/dtrace-util/tst.ListProbesFunc.sh
index a311da217..b14aad2f5 100755
--- a/test/unittest/dtrace-util/tst.ListProbesFunc.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesFunc.sh
@@ -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:
diff --git a/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
index 587b2ddfb..f8083f2c9 100755
--- a/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
@@ -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
diff --git a/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
index 1c5cc986e..dc6cb1008 100755
--- a/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
@@ -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
diff --git a/test/unittest/dtrace-util/tst.ListProbesName.sh b/test/unittest/dtrace-util/tst.ListProbesName.sh
index 6fadf9482..4dd3cbcff 100755
--- a/test/unittest/dtrace-util/tst.ListProbesName.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesName.sh
@@ -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
##
#
diff --git a/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
index 865e2d00e..59b8dca56 100755
--- a/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
@@ -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
diff --git a/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
index a5e9b8b97..64fc185da 100755
--- a/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
@@ -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
--
2.43.5
More information about the DTrace-devel
mailing list