[libcxx] [llvm] Add more debug output to the builders for a moment. (PR #83508)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 2 08:37:50 PST 2024
https://github.com/EricWF updated https://github.com/llvm/llvm-project/pull/83508
>From 1973366cde252887047ec93f3e896f8e64a399cf Mon Sep 17 00:00:00 2001
From: eric <eric at efcs.ca>
Date: Thu, 29 Feb 2024 19:18:47 -0500
Subject: [PATCH 1/5] Add more debug output to the builders for a moment.
---
libcxx/utils/ci/run-buildbot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 2905745355b68e..e0760c5e285aa7 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -127,7 +127,7 @@ function generate-cmake-base() {
-DLIBCXXABI_ENABLE_WERROR=YES \
-DLIBUNWIND_ENABLE_WERROR=YES \
-DLIBCXX_ENABLE_CLANG_TIDY=${ENABLE_CLANG_TIDY} \
- -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
+ -DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
"${@}"
}
>From fb34a045f140c2dafd3b32a4c649de96fb9f8795 Mon Sep 17 00:00:00 2001
From: eric <eric at efcs.ca>
Date: Thu, 29 Feb 2024 21:58:16 -0500
Subject: [PATCH 2/5] make changes
---
libcxx/utils/run.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/libcxx/utils/run.py b/libcxx/utils/run.py
index 6b4d615444bcfa..ac98db9f7c29aa 100755
--- a/libcxx/utils/run.py
+++ b/libcxx/utils/run.py
@@ -17,7 +17,7 @@
import os
import platform
import subprocess
-
+import signal
def main():
parser = argparse.ArgumentParser()
@@ -65,8 +65,10 @@ def main():
env["TEMP"] = os.environ.get("TEMP")
# Run the command line with the given environment in the execution directory.
- return subprocess.call(commandLine, cwd=args.execdir, env=env, shell=False)
-
+ result = subprocess.call(commandLine, cwd=args.execdir, env=env, shell=False)
+ if result == -signal.SIGINT:
+ raise KeyboardInterrupt
+ return result
if __name__ == "__main__":
exit(main())
>From 807e5a6434025024e40eb7c808e98050272608af Mon Sep 17 00:00:00 2001
From: eric <eric at efcs.ca>
Date: Fri, 1 Mar 2024 22:09:28 -0500
Subject: [PATCH 3/5] attempt to find bug
---
llvm/utils/lit/lit/run.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py
index 535c859352cc4d..32c3f18705d05e 100644
--- a/llvm/utils/lit/lit/run.py
+++ b/llvm/utils/lit/lit/run.py
@@ -129,7 +129,7 @@ def _increase_process_limit(self):
soft_limit, hard_limit = resource.getrlimit(NPROC)
desired_limit = min(desired_limit, hard_limit)
-
+ assert desired_limit > 0
if soft_limit < desired_limit:
resource.setrlimit(NPROC, (desired_limit, hard_limit))
self.lit_config.note(
>From 18ae68ad15d2c548ad1d2276b21fb314e6e84889 Mon Sep 17 00:00:00 2001
From: eric <eric at efcs.ca>
Date: Sat, 2 Mar 2024 11:17:49 -0500
Subject: [PATCH 4/5] Add more debugging of NPROC limits
---
llvm/utils/lit/lit/run.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py
index 32c3f18705d05e..fad2fd4e268b6d 100644
--- a/llvm/utils/lit/lit/run.py
+++ b/llvm/utils/lit/lit/run.py
@@ -129,13 +129,18 @@ def _increase_process_limit(self):
soft_limit, hard_limit = resource.getrlimit(NPROC)
desired_limit = min(desired_limit, hard_limit)
+ self.lit_config.warning(
+ "Raise process limit from %d to %d" % (soft_limit, desired_limit)
+ )
assert desired_limit > 0
if soft_limit < desired_limit:
resource.setrlimit(NPROC, (desired_limit, hard_limit))
self.lit_config.note(
"Raised process limit from %d to %d" % (soft_limit, desired_limit)
)
+ except AssertionError as assErr:
+ self.lit_config.warning('Tried to ')
except Exception as ex:
# Warn, unless this is Windows, in which case this is expected.
if os.name != "nt":
- self.lit_config.warning("Failed to raise process limit: %s" % ex)
+ self.lit_config.warning("Failed to raise process limit: %s" % type(ex))
>From 587d92bfdb9a38ec1f04f8b22f49f0ab5f306325 Mon Sep 17 00:00:00 2001
From: eric <eric at efcs.ca>
Date: Sat, 2 Mar 2024 11:37:40 -0500
Subject: [PATCH 5/5] Add some more debug information, also try shuffling the
tests
---
libcxx/utils/ci/run-buildbot | 2 +-
llvm/utils/lit/lit/run.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index e0760c5e285aa7..cb2fc31900d59a 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -127,7 +127,7 @@ function generate-cmake-base() {
-DLIBCXXABI_ENABLE_WERROR=YES \
-DLIBUNWIND_ENABLE_WERROR=YES \
-DLIBCXX_ENABLE_CLANG_TIDY=${ENABLE_CLANG_TIDY} \
- -DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
+ -DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml --timeout=1500 --time-tests --order=random" \
"${@}"
}
diff --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py
index fad2fd4e268b6d..b72ca4db11dd5a 100644
--- a/llvm/utils/lit/lit/run.py
+++ b/llvm/utils/lit/lit/run.py
@@ -128,9 +128,10 @@ def _increase_process_limit(self):
NPROC = resource.RLIMIT_NPROC
soft_limit, hard_limit = resource.getrlimit(NPROC)
+ asked_limit = desired_limit
desired_limit = min(desired_limit, hard_limit)
self.lit_config.warning(
- "Raise process limit from %d to %d" % (soft_limit, desired_limit)
+ "soft limit: %d\nhard limit: %d\ndesired limit: %d\nasked limit: %d" % (soft_limit, hard_limit, desired_limit, asked_limit)
)
assert desired_limit > 0
if soft_limit < desired_limit:
More information about the llvm-commits
mailing list