From 4c8aa54197d2a212db1e3231b62bdcaf3427ab48 Mon Sep 17 00:00:00 2001 From: Shubham Shinde Date: Wed, 18 Oct 2023 19:35:18 +0530 Subject: [PATCH] (FACT-3438) Handle os.architecture fact for debian aarch64 --- acceptance/lib/facter/acceptance/base_fact_utils.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/acceptance/lib/facter/acceptance/base_fact_utils.rb b/acceptance/lib/facter/acceptance/base_fact_utils.rb index 14cd72e056..eb328a84a8 100644 --- a/acceptance/lib/facter/acceptance/base_fact_utils.rb +++ b/acceptance/lib/facter/acceptance/base_fact_utils.rb @@ -79,9 +79,15 @@ def debian_expected_facts(agent) if agent['platform'] =~ /amd64/ os_arch = 'amd64' os_hardware = 'x86_64' + processor_model_pattern = /(Intel\(R\).*)|(AMD.*)/ + elsif agent['platform'] =~ /aarch64/ + os_arch = 'aarch64' + os_hardware = 'aarch64' + processor_model_pattern = // # FACT-3439 - facter doesn't figure out the processor type on these machines else os_arch = 'i386' os_hardware = 'i686' + processor_model_pattern = /(Intel\(R\).*)|(AMD.*)/ end expected_facts = { @@ -101,7 +107,7 @@ def debian_expected_facts(agent) 'processors.count' => /[1-9]/, 'processors.physicalcount' => /[1-9]/, 'processors.isa' => /unknown|#{os_hardware}/, - 'processors.models' => /(Intel\(R\).*)|(AMD.*)/, + 'processors.models' => processor_model_pattern, 'kernel' => 'Linux', 'kernelrelease' => /\d+\.\d+\.\d+/, 'kernelversion' => /\d+\.\d+/,