Skip to content

Swift: Ignore some DB-CHECK results on Linux#21474

Open
jketema wants to merge 1 commit intogithub:mainfrom
jketema:jketema/swift-linux-2
Open

Swift: Ignore some DB-CHECK results on Linux#21474
jketema wants to merge 1 commit intogithub:mainfrom
jketema:jketema/swift-linux-2

Conversation

@jketema
Copy link
Contributor

@jketema jketema commented Mar 13, 2026

Some DB-CHECK results show up on Linux when re-enabling the integration tests. These seem to come from some standard libraries, and there's a limited number of them, so this does not seem worth fixing at this point.

=================================== FAILURES ===================================
_____________________________________ test _____________________________________
ql/swift/ql/integration-tests/posix/deduplication/test.py::test::DB-CHECK FAILED - EXTRACTION Cannot find DB-CHECK.expected file.
------------------------------ Captured diff (QL) ------------------------------
DB-CHECK.expected <-> DB-CHECK.actual
--- expected
+++ actual
@@ -1,1 +1,56 @@
-
+[INVALID_KEY_SET] predicate callable_params(@callable id, int index, @param_decl_or_none param): The key set {id, index} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 2:
+Tuple 1 in row 14310: (58517,0,-16721012)
+Tuple 2 in row 14311: (58517,0,-16720711)
+	Relevant element: Tuple 1: id=58517
+		Full ID for 58517: @"FuncDecl_(438)hexToAscii(_:)(58516)". The ID may expand to @"FuncDecl_{@"ModuleDecl_FoundationEssentials"}hexToAscii(_:){@"FunctionType_{@"StructType_{@"StructDecl_(15)UInt8"}"}_default->{@"StructType_{@"StructDecl_(15)UInt8"}"}"}"
+	Relevant element: Tuple 2: id=58517
+		Full ID for 58517: @"FuncDecl_(438)hexToAscii(_:)(58516)". The ID may expand to @"FuncDecl_{@"ModuleDecl_FoundationEssentials"}hexToAscii(_:){@"FunctionType_{@"StructType_{@"StructDecl_(15)UInt8"}"}_default->{@"StructType_{@"StructDecl_(15)UInt8"}"}"}"
+[INVALID_KEY_SET] predicate types(@type id, string name, @type_or_none canonical_type): The key set {id} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 1:
+Tuple 1 in row 95877: (141892,"Rope._Storage",141892)
+Tuple 2 in row 95878: (141892,"Rope<τ_0_0>._Storage",141892)
+	Relevant element: Tuple 1: id=141892
+		Full ID for 141892: @"UnboundGenericType_(141820)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}384"}_Storage"}"
+	Relevant element: Tuple 2: id=141892
+		Full ID for 141892: @"UnboundGenericType_(141820)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}384"}_Storage"}"
+	Relevant element: Tuple 1: canonical_type=141892
+		Full ID for 141892: @"UnboundGenericType_(141820)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}384"}_Storage"}"
+	Relevant element: Tuple 2: canonical_type=141892
+		Full ID for 141892: @"UnboundGenericType_(141820)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}384"}_Storage"}"
+[INVALID_KEY_SET] predicate types(@type id, string name, @type_or_none canonical_type): The key set {id} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 1:
+Tuple 1 in row 95908: (141933,"Rope<τ_0_0>._UnsafeHandle",141933)
+Tuple 2 in row 95909: (141933,"Rope<Element>._UnsafeHandle",141933)
+	Relevant element: Tuple 1: id=141933
+		Full ID for 141933: @"UnboundGenericType_(141932)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 2: id=141933
+		Full ID for 141933: @"UnboundGenericType_(141932)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 1: canonical_type=141933
+		Full ID for 141933: @"UnboundGenericType_(141932)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 2: canonical_type=141933
+		Full ID for 141933: @"UnboundGenericType_(141932)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}382"}_UnsafeHandle"}"
+[INVALID_KEY_SET] predicate any_generic_type_parents(@any_generic_type id, @type_or_none parent): The key set {id} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 1:
+Tuple 1 in row 2172: (141892,28841)
+Tuple 2 in row 2173: (141892,141677)
+	Relevant element: Tuple 1: id=141892
+		Full ID for 141892: @"UnboundGenericType_(141820)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}384"}_Storage"}"
+	Relevant element: Tuple 2: id=141892
+		Full ID for 141892: @"UnboundGenericType_(141820)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}384"}_Storage"}"
+	Relevant element: Tuple 1: parent=28841
+		Full ID for 28841: @"UnboundGenericType_(28724)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ModuleDecl__FoundationCollections"}Rope"}"
+	Relevant element: Tuple 2: parent=141677
+		Full ID for 141677: @"BoundGenericStructType_(28724)(5)". The ID may expand to @"BoundGenericStructType_{@"StructDecl_{@"ModuleDecl__FoundationCollections"}Rope"}{@"GenericTypeParamType_0_0"}"
+[INVALID_KEY_SET] predicate any_generic_type_parents(@any_generic_type id, @type_or_none parent): The key set {id} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 1:
+Tuple 1 in row 2178: (141933,28841)
+Tuple 2 in row 2179: (141933,141677)
+	Relevant element: Tuple 1: id=141933
+		Full ID for 141933: @"UnboundGenericType_(141932)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 2: id=141933
+		Full ID for 141933: @"UnboundGenericType_(141932)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28724)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 1: parent=28841
+		Full ID for 28841: @"UnboundGenericType_(28724)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ModuleDecl__FoundationCollections"}Rope"}"
+	Relevant element: Tuple 2: parent=141677
+		Full ID for 141677: @"BoundGenericStructType_(28724)(5)". The ID may expand to @"BoundGenericStructType_{@"StructDecl_{@"ModuleDecl__FoundationCollections"}Rope"}{@"GenericTypeParamType_0_0"}"
_____________________________________ test _____________________________________
ql/swift/ql/integration-tests/posix/hello-world/test.py::test::DB-CHECK FAILED - EXTRACTION Cannot find DB-CHECK.expected file.
------------------------------ Captured diff (QL) ------------------------------
DB-CHECK.expected <-> DB-CHECK.actual
--- expected
+++ actual
@@ -1,1 +1,56 @@
-
+[INVALID_KEY_SET] predicate callable_params(@callable id, int index, @param_decl_or_none param): The key set {id, index} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 2:
+Tuple 1 in row 14311: (58516,0,-16721012)
+Tuple 2 in row 14312: (58516,0,-16720711)
+	Relevant element: Tuple 1: id=58516
+		Full ID for 58516: @"FuncDecl_(437)hexToAscii(_:)(58515)". The ID may expand to @"FuncDecl_{@"ModuleDecl_FoundationEssentials"}hexToAscii(_:){@"FunctionType_{@"StructType_{@"StructDecl_(14)UInt8"}"}_default->{@"StructType_{@"StructDecl_(14)UInt8"}"}"}"
+	Relevant element: Tuple 2: id=58516
+		Full ID for 58516: @"FuncDecl_(437)hexToAscii(_:)(58515)". The ID may expand to @"FuncDecl_{@"ModuleDecl_FoundationEssentials"}hexToAscii(_:){@"FunctionType_{@"StructType_{@"StructDecl_(14)UInt8"}"}_default->{@"StructType_{@"StructDecl_(14)UInt8"}"}"}"
+[INVALID_KEY_SET] predicate types(@type id, string name, @type_or_none canonical_type): The key set {id} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 1:
+Tuple 1 in row 95877: (141891,"Rope._Storage",141891)
+Tuple 2 in row 95878: (141891,"Rope<τ_0_0>._Storage",141891)
+	Relevant element: Tuple 1: id=141891
+		Full ID for 141891: @"UnboundGenericType_(141819)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}384"}_Storage"}"
+	Relevant element: Tuple 2: id=141891
+		Full ID for 141891: @"UnboundGenericType_(141819)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}384"}_Storage"}"
+	Relevant element: Tuple 1: canonical_type=141891
+		Full ID for 141891: @"UnboundGenericType_(141819)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}384"}_Storage"}"
+	Relevant element: Tuple 2: canonical_type=141891
+		Full ID for 141891: @"UnboundGenericType_(141819)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}384"}_Storage"}"
+[INVALID_KEY_SET] predicate types(@type id, string name, @type_or_none canonical_type): The key set {id} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 1:
+Tuple 1 in row 95908: (141932,"Rope<τ_0_0>._UnsafeHandle",141932)
+Tuple 2 in row 95909: (141932,"Rope<Element>._UnsafeHandle",141932)
+	Relevant element: Tuple 1: id=141932
+		Full ID for 141932: @"UnboundGenericType_(141931)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 2: id=141932
+		Full ID for 141932: @"UnboundGenericType_(141931)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 1: canonical_type=141932
+		Full ID for 141932: @"UnboundGenericType_(141931)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 2: canonical_type=141932
+		Full ID for 141932: @"UnboundGenericType_(141931)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}382"}_UnsafeHandle"}"
+[INVALID_KEY_SET] predicate any_generic_type_parents(@any_generic_type id, @type_or_none parent): The key set {id} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 1:
+Tuple 1 in row 2172: (141891,28840)
+Tuple 2 in row 2173: (141891,141676)
+	Relevant element: Tuple 1: id=141891
+		Full ID for 141891: @"UnboundGenericType_(141819)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}384"}_Storage"}"
+	Relevant element: Tuple 2: id=141891
+		Full ID for 141891: @"UnboundGenericType_(141819)". The ID may expand to @"UnboundGenericType_{@"ClassDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}384"}_Storage"}"
+	Relevant element: Tuple 1: parent=28840
+		Full ID for 28840: @"UnboundGenericType_(28723)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ModuleDecl__FoundationCollections"}Rope"}"
+	Relevant element: Tuple 2: parent=141676
+		Full ID for 141676: @"BoundGenericStructType_(28723)(4)". The ID may expand to @"BoundGenericStructType_{@"StructDecl_{@"ModuleDecl__FoundationCollections"}Rope"}{@"GenericTypeParamType_0_0"}"
+[INVALID_KEY_SET] predicate any_generic_type_parents(@any_generic_type id, @type_or_none parent): The key set {id} does not functionally determine all fields.
+Here is a pair of tuples that agree on the key set but differ at index 1:
+Tuple 1 in row 2178: (141932,28840)
+Tuple 2 in row 2179: (141932,141676)
+	Relevant element: Tuple 1: id=141932
+		Full ID for 141932: @"UnboundGenericType_(141931)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 2: id=141932
+		Full ID for 141932: @"UnboundGenericType_(141931)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ExtensionDecl_{@"ModuleDecl__FoundationCollections"}{@"UnboundGenericType_(28723)"}382"}_UnsafeHandle"}"
+	Relevant element: Tuple 1: parent=28840
+		Full ID for 28840: @"UnboundGenericType_(28723)". The ID may expand to @"UnboundGenericType_{@"StructDecl_{@"ModuleDecl__FoundationCollections"}Rope"}"
+	Relevant element: Tuple 2: parent=141676
+		Full ID for 141676: @"BoundGenericStructType_(28723)(4)". The ID may expand to @"BoundGenericStructType_{@"StructDecl_{@"ModuleDecl__FoundationCollections"}Rope"}{@"GenericTypeParamType_0_0"}"

@github-actions github-actions bot added the Swift label Mar 13, 2026
@jketema jketema marked this pull request as ready for review March 13, 2026 19:37
@jketema jketema requested a review from a team as a code owner March 13, 2026 19:37
Copilot AI review requested due to automatic review settings March 13, 2026 19:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Swift POSIX integration tests to tolerate known Linux-only DB-CHECK noise (coming from standard libraries) by marking DB-CHECK as an expected failure on Linux, enabling the integration test suite to be re-enabled without requiring extractor fixes right now.

Changes:

  • Mark DB-CHECK as xfail on Linux for the Swift POSIX hello-world integration test.
  • Mark DB-CHECK as xfail on Linux for the Swift POSIX deduplication integration test (and add the missing pytest import).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
swift/ql/integration-tests/posix/hello-world/test.py Adds a Linux-conditional xfail for the DB-CHECK ql_test marker.
swift/ql/integration-tests/posix/deduplication/test.py Adds pytest import and a Linux-conditional xfail for DB-CHECK.

You can also share your feedback on Copilot code review. Take the survey.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants