summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/aix
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/aix')
-rw-r--r--spec/unit/plugins/aix/kernel_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/plugins/aix/kernel_spec.rb b/spec/unit/plugins/aix/kernel_spec.rb
index 2428a25a..85756962 100644
--- a/spec/unit/plugins/aix/kernel_spec.rb
+++ b/spec/unit/plugins/aix/kernel_spec.rb
@@ -26,6 +26,7 @@ describe Ohai::System, "AIX kernel plugin" do
allow(@plugin).to receive(:shell_out).with("uname -v").and_return(mock_shell_out(0, "6", nil))
allow(@plugin).to receive(:shell_out).with("uname -p").and_return(mock_shell_out(0, "powerpc", nil))
allow(@plugin).to receive(:shell_out).with("genkex -d").and_return(mock_shell_out(0, " Text address Size Data address Size File\nf1000000c0338000 77000 f1000000c0390000 1ec8c /usr/lib/drivers/cluster\n 6390000 20000 63a0000 ba8 /usr/lib/drivers/if_en", nil))
+ allow(@plugin).to receive(:shell_out).with("getconf KERNEL_BITMODE").and_return(mock_shell_out(0, "64", nil))
@plugin.run
end
@@ -45,6 +46,10 @@ describe Ohai::System, "AIX kernel plugin" do
expect(@plugin[:kernel][:machine]).to eq("powerpc")
end
+ it "getconf KERNEL_BITMODE detects the kernel's bittiness" do
+ expect(@plugin[:kernel][:bits]).to eq("64")
+ end
+
it "detects the modules" do
expect(@plugin[:kernel][:modules]["/usr/lib/drivers/cluster"]["text"]).to eq({ "address" => "f1000000c0338000", "size" => "77000" })
expect(@plugin[:kernel][:modules]["/usr/lib/drivers/cluster"]["data"]).to eq({ "address" => "f1000000c0390000", "size" => "1ec8c" })