PCIe CPER Section Enhancement

This commit improves PCIe error reporting capabilities by:
- Adding support for PCIe capability version detection and parsing
- Expanding Advanced Error Reporting information extraction

The changes include:
- New capability_registers structure to decode PCIe capability registers
- Updated PCIe JSON Schema to match
- Support for PCIe 2.0+ extended registers when detected
- Improved error source identification and root error status reporting
- Fix typo for Advanced Error Reporting capabilit[i]es_control
- Updated generate/gen-section-pcie.c and pcie.json example

In the future we could:
- Implement TLP header log parsing with detailed descriptions
- Add support for Flit mode in PCIe 2.0+ devices

Tested:
- test/cper-tests passes
- cper-convert to-json|to-cper on pcie.cper|json in example path
- Tested "cper-convert to-json-section" using an extracted OS GHES PCIE
CPER from error injection and compare against expected values

Note, schema validation is intentionally less restrictive than it could
be for pcie advanced error reporting as it evolves.

Change-Id: Ifebb9d97d28a3a487a0aab53bf9e757afeedd64a
Signed-off-by: Erwin Tsaur <etsaur@nvidia.com>
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/tests/ir-tests.cpp b/tests/ir-tests.cpp
index d255353..a43aced 100644
--- a/tests/ir-tests.cpp
+++ b/tests/ir-tests.cpp
@@ -488,7 +488,7 @@
 }
 
 //Entrypoint for the testing program.
-int main()
+int main(int argc, char **argv)
 {
 	if (GEN_EXAMPLES) {
 		cper_create_examples("arm");
@@ -508,6 +508,6 @@
 		cper_create_examples("nvidia");
 		cper_create_examples("unknown");
 	}
-	testing::InitGoogleTest();
+	testing::InitGoogleTest(&argc, argv);
 	return RUN_ALL_TESTS();
 }
diff --git a/tests/meson.build b/tests/meson.build
index f65dc41..ca21b42 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,6 +1,6 @@
 cmake = import('cmake')
 
-gtest = dependency('gtest', main: true, disabler: true, required: false)
+gtest = dependency('gtest', disabler: true, required: false)
 gmock = dependency('gmock', disabler: true, required: false)
 if not gtest.found() or not gmock.found()
     gtest_proj = import('cmake').subproject('googletest', required: false)
diff --git a/tests/test-utils.cpp b/tests/test-utils.cpp
index ca885fc..11d8a02 100644
--- a/tests/test-utils.cpp
+++ b/tests/test-utils.cpp
@@ -30,6 +30,13 @@
 		    "timedOut", "level", "operation", "preciseIP",
 		    "restartableIP", "overflow", "uncorrected",
 		    "transactionType" } },
+		// Several PCIe properties are dependent on the device capability
+		// version and whether the device is running in Flit-Mode.
+		// All of these properties are optional.
+		{ "./sections/cper-pcie.json",
+		  { "device_capabilities2", "device_status2", "device_control2",
+		    "link_capabilities2", "link_status2", "link_control2",
+		    "slot_capabilities2", "slot_status2", "slot_control2" } },
 	};
 
 nlohmann::json loadJson(const char *filePath)