Skip to content

update_test_checks: Relax DIFile filename checks #135692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

slinder1
Copy link
Contributor

Avoid baking in absolute paths in check lines generated for DIFile metadata. Generated test checks cannot be sensitive to absolute paths anyway, as those vary with the environment, but there could be situations where some sensitivity to partial paths is required for certain tests. This implementation just assumes such tests aren't worth the effort to support, but it could be supported in the future.

This is most useful for update_cc_test_checks with debug info enabled, where the test writer cannot manipulate the paths within the generated IR directly.

@llvmbot
Copy link
Member

llvmbot commented Apr 14, 2025

@llvm/pr-subscribers-testing-tools

Author: Scott Linder (slinder1)

Changes

Avoid baking in absolute paths in check lines generated for DIFile metadata. Generated test checks cannot be sensitive to absolute paths anyway, as those vary with the environment, but there could be situations where some sensitivity to partial paths is required for certain tests. This implementation just assumes such tests aren't worth the effort to support, but it could be supported in the future.

This is most useful for update_cc_test_checks with debug info enabled, where the test writer cannot manipulate the paths within the generated IR directly.


Full diff: https://github.com/llvm/llvm-project/pull/135692.diff

6 Files Affected:

  • (added) llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/difile_absolute_filenames.ll (+34)
  • (added) llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/difile_absolute_filenames.ll.expected (+58)
  • (modified) llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected (+1-1)
  • (modified) llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected (+1-1)
  • (added) llvm/test/tools/UpdateTestChecks/update_test_checks/difile_absolute_filenames.test (+7)
  • (modified) llvm/utils/UpdateTestChecks/common.py (+1-1)
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/difile_absolute_filenames.ll b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/difile_absolute_filenames.ll
new file mode 100644
index 0000000000000..0dbef0f75f34c
--- /dev/null
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/difile_absolute_filenames.ll
@@ -0,0 +1,34 @@
+; RUN: opt < %s -S | FileCheck %s
+
+; ModuleID = '/home/slinder1/llvm-project/foo.c'
+source_filename = "/home/slinder1/llvm-project/foo.c"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; Function Attrs: noinline nounwind optnone uwtable
+define dso_local void @f() #0 !dbg !10 {
+entry:
+  ret void, !dbg !14
+}
+
+attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8}
+!llvm.ident = !{!9}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 21.0.0git (git@github.com:AMD-Lightning-Internal/llvm-project ff31c4b867df0c606fba26eb1ec93996fc5f5920)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "/home/slinder1/llvm-project/foo.c", directory: "/home/slinder1/llvm-project/amd-staging", checksumkind: CSK_MD5, checksum: "e6ab1d5b7f82464c963a8522037dfa72")
+!2 = !{i32 7, !"Dwarf Version", i32 5}
+!3 = !{i32 2, !"Debug Info Version", i32 3}
+!4 = !{i32 1, !"wchar_size", i32 4}
+!5 = !{i32 8, !"PIC Level", i32 2}
+!6 = !{i32 7, !"PIE Level", i32 2}
+!7 = !{i32 7, !"uwtable", i32 2}
+!8 = !{i32 7, !"frame-pointer", i32 2}
+!9 = !{!"clang version 21.0.0git (git@github.com:AMD-Lightning-Internal/llvm-project ff31c4b867df0c606fba26eb1ec93996fc5f5920)"}
+!10 = distinct !DISubprogram(name: "f", scope: !11, file: !11, line: 1, type: !12, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0)
+!11 = !DIFile(filename: "foo.c", directory: "/home/slinder1/llvm-project", checksumkind: CSK_MD5, checksum: "e6ab1d5b7f82464c963a8522037dfa72")
+!12 = !DISubroutineType(types: !13)
+!13 = !{null}
+!14 = !DILocation(line: 1, column: 11, scope: !10)
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/difile_absolute_filenames.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/difile_absolute_filenames.ll.expected
new file mode 100644
index 0000000000000..78a4b7304eba9
--- /dev/null
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/difile_absolute_filenames.ll.expected
@@ -0,0 +1,58 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
+; RUN: opt < %s -S | FileCheck %s
+
+; ModuleID = '/home/slinder1/llvm-project/foo.c'
+source_filename = "/home/slinder1/llvm-project/foo.c"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; Function Attrs: noinline nounwind optnone uwtable
+define dso_local void @f() #0 !dbg !10 {
+; CHECK-LABEL: @f(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    ret void, !dbg [[DBG14:![0-9]+]]
+;
+entry:
+  ret void, !dbg !14
+}
+
+attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8}
+!llvm.ident = !{!9}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 21.0.0git (git@github.com:AMD-Lightning-Internal/llvm-project ff31c4b867df0c606fba26eb1ec93996fc5f5920)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "/home/slinder1/llvm-project/foo.c", directory: "/home/slinder1/llvm-project/amd-staging", checksumkind: CSK_MD5, checksum: "e6ab1d5b7f82464c963a8522037dfa72")
+!2 = !{i32 7, !"Dwarf Version", i32 5}
+!3 = !{i32 2, !"Debug Info Version", i32 3}
+!4 = !{i32 1, !"wchar_size", i32 4}
+!5 = !{i32 8, !"PIC Level", i32 2}
+!6 = !{i32 7, !"PIE Level", i32 2}
+!7 = !{i32 7, !"uwtable", i32 2}
+!8 = !{i32 7, !"frame-pointer", i32 2}
+!9 = !{!"clang version 21.0.0git (git@github.com:AMD-Lightning-Internal/llvm-project ff31c4b867df0c606fba26eb1ec93996fc5f5920)"}
+!10 = distinct !DISubprogram(name: "f", scope: !11, file: !11, line: 1, type: !12, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0)
+!11 = !DIFile(filename: "foo.c", directory: "/home/slinder1/llvm-project", checksumkind: CSK_MD5, checksum: "e6ab1d5b7f82464c963a8522037dfa72")
+!12 = !DISubroutineType(types: !13)
+!13 = !{null}
+!14 = !DILocation(line: 1, column: 11, scope: !10)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C11, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META1]] = !DIFile(filename: "{{.*}}foo.c", directory: {{.*}})
+; CHECK: [[META2:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 5}
+; CHECK: [[META3:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META4:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META5:![0-9]+]] = !{i32 8, !"PIC Level", i32 2}
+; CHECK: [[META6:![0-9]+]] = !{i32 7, !"PIE Level", i32 2}
+; CHECK: [[META7:![0-9]+]] = !{i32 7, !"uwtable", i32 2}
+; CHECK: [[META8:![0-9]+]] = !{i32 7, !"frame-pointer", i32 2}
+; CHECK: [[META9:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
+; CHECK: [[META10:![0-9]+]] = distinct !DISubprogram(name: "f", scope: [[META11:![0-9]+]], file: [[META11]], line: 1, type: [[META12:![0-9]+]], scopeLine: 1, spFlags: DISPFlagDefinition, unit: [[META0]])
+; CHECK: [[META11]] = !DIFile(filename: "{{.*}}foo.c", directory: {{.*}})
+; CHECK: [[META12]] = !DISubroutineType(types: [[META13:![0-9]+]])
+; CHECK: [[META13]] = !{null}
+; CHECK: [[DBG14]] = !DILocation(line: 1, column: 11, scope: [[META10]])
+;.
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected
index 82f1442f30166..02575d4cff11e 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected
@@ -244,7 +244,7 @@ attributes #2 = { nounwind }
 ; CHECK: attributes #[[ATTR2]] = { nounwind }
 ;.
 ; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: [[META2:![0-9]+]], splitDebugInlining: false, nameTableKind: None)
-; CHECK: [[META1]] = !DIFile(filename: "various_ir_values.c", directory: {{.*}})
+; CHECK: [[META1]] = !DIFile(filename: "{{.*}}various_ir_values.c", directory: {{.*}})
 ; CHECK: [[META2]] = !{}
 ; CHECK: [[META3:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
 ; CHECK: [[META4:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected
index 9addb55bda98d..cd8dac743e2e0 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected
@@ -238,7 +238,7 @@ attributes #2 = { nounwind }
 !62 = !DILocation(line: 11, column: 1, scope: !41)
 ;.
 ; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: [[META2:![0-9]+]], splitDebugInlining: false, nameTableKind: None)
-; CHECK: [[META1]] = !DIFile(filename: "various_ir_values.c", directory: {{.*}})
+; CHECK: [[META1]] = !DIFile(filename: "{{.*}}various_ir_values.c", directory: {{.*}})
 ; CHECK: [[META2]] = !{}
 ; CHECK: [[META7:![0-9]+]] = distinct !DISubprogram(name: "foo", scope: [[META1]], file: [[META1]], line: 1, type: [[META8:![0-9]+]], scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META12:![0-9]+]])
 ; CHECK: [[META8]] = !DISubroutineType(types: [[META9:![0-9]+]])
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/difile_absolute_filenames.test b/llvm/test/tools/UpdateTestChecks/update_test_checks/difile_absolute_filenames.test
new file mode 100644
index 0000000000000..cea600d7b787b
--- /dev/null
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/difile_absolute_filenames.test
@@ -0,0 +1,7 @@
+## Test that update_test_checks.py is not sensitive to absolute paths in
+## DIFile's filename field.
+# RUN: cp -f %S/Inputs/difile_absolute_filenames.ll %t.ll && %update_test_checks %t.ll --check-globals
+# RUN: diff -u %t.ll %S/Inputs/difile_absolute_filenames.ll.expected
+## Check that running the script again does not change the result:
+# RUN: %update_test_checks %t.ll --check-globals
+# RUN: diff -u %t.ll %S/Inputs/difile_absolute_filenames.ll.expected
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 274614c2bd272..e747ae3f385a9 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -2358,7 +2358,7 @@ def add(var):
         r"(?<=\")(.+ )?(\w+ version )[\d.]+(?:[^\" ]*)(?: \([^)]+\))?",
         r"{{.*}}\2{{.*}}",
     ),  # preface with glob also, to capture optional CLANG_VENDOR
-    (r'(!DIFile\(filename: ".+", directory: )".+"', r"\1{{.*}}"),
+    (r'(!DIFile\(filename: ")(.+/)?([^/]+", directory: )".+"', r"\1{{.*}}\3{{.*}}"),
 ]
 METADATA_FILTERS_RE = [(re.compile(f), r) for (f, r) in METADATA_FILTERS]
 

Copy link
Contributor

@OCHyams OCHyams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me, LGTM with nit/questions

Comment on lines 5 to 6
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need the datalayout or triple, or function attributes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, they aren't required by any stretch, but I wanted to commit the unadulterated output of cc1, just to avoid biasing the test away from the ultimate goal for the change, which is to enable tests for CGDebugInfo related changes using update_cc_test_checks.py

I don't actually have an upstream test which will immediately benefit, and I wasn't sure how best to add a test which relies on clang but ultimately is testing UpdateTestChecks itself. If there is a better approach I'm happy to switch to it, and I am also fine stripping obviously unrelated bits from this test if I'm still not being convincing!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks for the background. I don't feel particularly strongly in any direction so I'm happy for you to go ahead either way. (patch still LGTM!)

Copy link
Contributor

@SLTozer SLTozer Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, if I understand the intent here correctly, I think that since the test is set up specifically for filenames in debug info, it'd be better to trim the usual stuff from the test, e.g. target info, attributes, checksums, git hashes, etc, unless they are also going to be treated similarly (i.e. have their checks relaxed), in which case they can also be explicitly tested for.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, I can trim it down to focus just on the change, and I'll try to find another place to test that update_cc_test_checks round-trips with debug info enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to trim down the testcase, let me know if I missed anything!

@@ -2358,7 +2358,7 @@ def add(var):
r"(?<=\")(.+ )?(\w+ version )[\d.]+(?:[^\" ]*)(?: \([^)]+\))?",
r"{{.*}}\2{{.*}}",
), # preface with glob also, to capture optional CLANG_VENDOR
(r'(!DIFile\(filename: ".+", directory: )".+"', r"\1{{.*}}"),
(r'(!DIFile\(filename: ")(.+/)?([^/]+", directory: )".+"', r"\1{{.*}}\3{{.*}}"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we get file paths in the filename field? (off the top of my head I can't remember - I assume that's why you've added the {{.*}} prefix to file base names here?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and in particular update_cc_test_checks.py seems to invoke clang in such a way as to always generate absolute paths.

The approach I took leaves some potential for ambiguity in some cases, but I think real issues would only crop up for largely contrived test cases (like having a test which depends on multiple input files at different relative paths but with the same filename) and even then the order of the metadata in the output should be stable, so it should be pretty inconsequential.

Copy link
Member

@hnrklssn hnrklssn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@OCHyams OCHyams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Still LGTM)

Copy link
Member

@jmorse jmorse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem recently bit me; thanks for fixing!

Avoid baking in absolute paths in check lines generated for DIFile
metadata. Generated test checks cannot be sensitive to absolute paths
anyway, as those vary with the environment, but there could be
situations where some sensitivity to partial paths is required for
certain tests. This implementation just assumes such tests aren't worth
the effort to support, but it could be supported in the future.

This is most useful for update_cc_test_checks with debug info enabled,
where the test writer cannot manipulate the paths within the generated
IR directly.
@slinder1 slinder1 force-pushed the main_difile_absolute_filenames branch from 2c95bb2 to 146b024 Compare April 24, 2025 17:01
@slinder1 slinder1 merged commit e78b763 into llvm:main Apr 24, 2025
6 of 10 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 24, 2025

LLVM Buildbot has detected a new failure on builder lldb-aarch64-ubuntu running on linaro-lldb-aarch64-ubuntu while building llvm at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/16587

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: python_api/watchpoint/watchlocation/TestTargetWatchAddress.py (1159 of 2127)
PASS: lldb-api :: tools/lldb-dap/completions/TestDAP_completions.py (1160 of 2127)
PASS: lldb-api :: tools/lldb-dap/console/TestDAP_redirection_to_console.py (1161 of 2127)
PASS: lldb-api :: tools/lldb-dap/console/TestDAP_console.py (1162 of 2127)
PASS: lldb-api :: tools/lldb-dap/coreFile/TestDAP_coreFile.py (1163 of 2127)
PASS: lldb-api :: tools/lldb-dap/disassemble/TestDAP_disassemble.py (1164 of 2127)
PASS: lldb-api :: tools/lldb-dap/attach/TestDAP_attachByPortNum.py (1165 of 2127)
PASS: lldb-api :: tools/lldb-dap/exception/TestDAP_exception.py (1166 of 2127)
PASS: lldb-api :: tools/lldb-dap/exception/cpp/TestDAP_exception_cpp.py (1167 of 2127)
UNRESOLVED: lldb-api :: tools/lldb-dap/disconnect/TestDAP_disconnect.py (1168 of 2127)
******************** TEST 'lldb-api :: tools/lldb-dap/disconnect/TestDAP_disconnect.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin --arch aarch64 --build-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/disconnect -p TestDAP_disconnect.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision e78b763568e47e685926614195c3075afa35668c)
  clang revision e78b763568e47e685926614195c3075afa35668c
  llvm revision e78b763568e47e685926614195c3075afa35668c
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
========= DEBUG ADAPTER PROTOCOL LOGS =========
1745514852.051930428 --> (stdin/stdout) {"command":"initialize","type":"request","arguments":{"adapterID":"lldb-native","clientID":"vscode","columnsStartAt1":true,"linesStartAt1":true,"locale":"en-us","pathFormat":"path","supportsRunInTerminalRequest":true,"supportsVariablePaging":true,"supportsVariableType":true,"supportsStartDebuggingRequest":true,"supportsProgressReporting":true,"$__lldb_sourceInitFile":false},"seq":1}
1745514852.054027796 <-- (stdin/stdout) {"body":{"$__lldb_version":"lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision e78b763568e47e685926614195c3075afa35668c)\n  clang revision e78b763568e47e685926614195c3075afa35668c\n  llvm revision e78b763568e47e685926614195c3075afa35668c","completionTriggerCharacters":["."," ","\t"],"exceptionBreakpointFilters":[{"default":false,"filter":"cpp_catch","label":"C++ Catch"},{"default":false,"filter":"cpp_throw","label":"C++ Throw"},{"default":false,"filter":"objc_catch","label":"Objective-C Catch"},{"default":false,"filter":"objc_throw","label":"Objective-C Throw"}],"supportTerminateDebuggee":true,"supportsBreakpointLocationsRequest":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsReadMemoryRequest":true,"supportsRestartRequest":true,"supportsSetVariable":true,"supportsStepInTargetsRequest":true,"supportsSteppingGranularity":true,"supportsValueFormattingOptions":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
1745514852.054333448 --> (stdin/stdout) {"command":"attach","type":"request","arguments":{"pid":2044576,"initCommands":["settings clear -all","settings set symbols.enable-external-lookup false","settings set target.inherit-tcc true","settings set target.disable-aslr false","settings set target.detach-on-error false","settings set target.auto-apply-fixits false","settings set plugin.process.gdb-remote.packet-timeout 60","settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"","settings set use-color false","settings set show-statusline false"]},"seq":2}
1745514852.054570436 <-- (stdin/stdout) {"body":{"category":"console","output":"Running initCommands:\n"},"event":"output","seq":0,"type":"event"}
1745514852.054597855 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings clear -all\n"},"event":"output","seq":0,"type":"event"}
1745514852.054608107 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set symbols.enable-external-lookup false\n"},"event":"output","seq":0,"type":"event"}
1745514852.054616928 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.inherit-tcc true\n"},"event":"output","seq":0,"type":"event"}
1745514852.054625034 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.disable-aslr false\n"},"event":"output","seq":0,"type":"event"}
1745514852.054632902 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.detach-on-error false\n"},"event":"output","seq":0,"type":"event"}
1745514852.054640293 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.auto-apply-fixits false\n"},"event":"output","seq":0,"type":"event"}
1745514852.054648161 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set plugin.process.gdb-remote.packet-timeout 60\n"},"event":"output","seq":0,"type":"event"}
1745514852.054656506 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"\n"},"event":"output","seq":0,"type":"event"}
1745514852.054674387 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set use-color false\n"},"event":"output","seq":0,"type":"event"}
1745514852.054683208 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set show-statusline false\n"},"event":"output","seq":0,"type":"event"}
1745514852.149633884 <-- (stdin/stdout) {"command":"attach","request_seq":2,"seq":0,"success":true,"type":"response"}
1745514852.149691820 <-- (stdin/stdout) {"body":{"isLocalProcess":true,"name":"/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/disconnect/TestDAP_disconnect.test_attach/a.out","startMethod":"attach","systemProcessId":2044576},"event":"process","seq":0,"type":"event"}
1745514852.149701118 <-- (stdin/stdout) {"event":"initialized","seq":0,"type":"event"}
1745514852.149939537 --> (stdin/stdout) {"command":"threads","type":"request","arguments":{},"seq":3}
1745514852.150030136 <-- (stdin/stdout) {"body":{"threads":[{"id":2044576,"name":"a.out"}]},"command":"threads","request_seq":3,"seq":0,"success":true,"type":"response"}
1745514852.150151491 --> (stdin/stdout) {"command":"stackTrace","type":"request","arguments":{"threadId":2044576,"startFrame":0,"levels":1},"seq":4}
1745514852.152645111 <-- (stdin/stdout) {"body":{"stackFrames":[{"column":1,"id":524288,"instructionPointerReference":"0xFFFF94F6190C","line":32,"name":"clock_nanosleep","source":{"name":"clock_nanosleep","path":"/lib/aarch64-linux-gnu/libc.so.6`clock_nanosleep","presentationHint":"deemphasize","sourceReference":524288}}],"totalFrames":21},"command":"stackTrace","request_seq":4,"seq":0,"success":true,"type":"response"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants