ohai 15.3.1 → 15.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -6
- data/lib/ohai/mixin/{network_constants.rb → network_helper.rb} +8 -1
- data/lib/ohai/plugins/aix/network.rb +3 -8
- data/lib/ohai/plugins/darwin/network.rb +6 -4
- data/lib/ohai/plugins/filesystem.rb +166 -0
- data/lib/ohai/plugins/network.rb +5 -5
- data/lib/ohai/plugins/openstack.rb +2 -1
- data/lib/ohai/plugins/solaris2/network.rb +6 -4
- data/lib/ohai/version.rb +1 -1
- data/ohai.gemspec +1 -1
- metadata +3 -162
- data/Rakefile +0 -42
- data/lib/ohai/plugins/windows/filesystem.rb +0 -147
- data/spec/data/plugins/dpkg-query.output +0 -4
- data/spec/data/plugins/lslpp.output +0 -50
- data/spec/data/plugins/pacman.output +0 -51
- data/spec/data/plugins/pkg-query.output +0 -58
- data/spec/data/plugins/pkginfo.output +0 -50
- data/spec/data/plugins/pkglist.output +0 -24
- data/spec/data/plugins/rpmquery.output +0 -7
- data/spec/functional/application_spec.rb +0 -107
- data/spec/functional/loader_spec.rb +0 -53
- data/spec/functional/plugins/powershell_spec.rb +0 -88
- data/spec/functional/plugins/root_group_spec.rb +0 -41
- data/spec/functional/plugins/windows/uptime_spec.rb +0 -51
- data/spec/ohai_spec.rb +0 -27
- data/spec/rcov.opts +0 -2
- data/spec/spec.opts +0 -2
- data/spec/spec_helper.rb +0 -124
- data/spec/support/integration_helper.rb +0 -61
- data/spec/support/platform_helpers.rb +0 -38
- data/spec/unit/application_spec.rb +0 -96
- data/spec/unit/config_spec.rb +0 -57
- data/spec/unit/dsl/plugin_spec.rb +0 -634
- data/spec/unit/hints_spec.rb +0 -65
- data/spec/unit/loader_spec.rb +0 -195
- data/spec/unit/mixin/azure_metadata_spec.rb +0 -72
- data/spec/unit/mixin/command_spec.rb +0 -151
- data/spec/unit/mixin/dmi_decode.rb +0 -75
- data/spec/unit/mixin/ec2_metadata_spec.rb +0 -88
- data/spec/unit/mixin/softlayer_metadata_spec.rb +0 -72
- data/spec/unit/plugin_config_spec.rb +0 -117
- data/spec/unit/plugins/abort_spec.rb +0 -69
- data/spec/unit/plugins/aix/cpu_spec.rb +0 -127
- data/spec/unit/plugins/aix/filesystem_spec.rb +0 -238
- data/spec/unit/plugins/aix/hostname_spec.rb +0 -33
- data/spec/unit/plugins/aix/kernel_spec.rb +0 -61
- data/spec/unit/plugins/aix/memory_spec.rb +0 -49
- data/spec/unit/plugins/aix/network_spec.rb +0 -313
- data/spec/unit/plugins/aix/platform_spec.rb +0 -44
- data/spec/unit/plugins/aix/uptime_spec.rb +0 -42
- data/spec/unit/plugins/aix/virtualization_spec.rb +0 -319
- data/spec/unit/plugins/azure_spec.rb +0 -243
- data/spec/unit/plugins/bsd/filesystem_spec.rb +0 -138
- data/spec/unit/plugins/bsd/virtualization_spec.rb +0 -145
- data/spec/unit/plugins/c_spec.rb +0 -341
- data/spec/unit/plugins/chef_spec.rb +0 -44
- data/spec/unit/plugins/cloud_spec.rb +0 -484
- data/spec/unit/plugins/darwin/cpu_spec.rb +0 -124
- data/spec/unit/plugins/darwin/filesystem_spec.rb +0 -140
- data/spec/unit/plugins/darwin/hardware_spec.rb +0 -105
- data/spec/unit/plugins/darwin/hardware_system_profiler_output.rb +0 -1110
- data/spec/unit/plugins/darwin/hostname_spec.rb +0 -43
- data/spec/unit/plugins/darwin/kernel_spec.rb +0 -65
- data/spec/unit/plugins/darwin/memory_spec.rb +0 -64
- data/spec/unit/plugins/darwin/network_spec.rb +0 -849
- data/spec/unit/plugins/darwin/platform_spec.rb +0 -71
- data/spec/unit/plugins/darwin/virtualization_spec.rb +0 -156
- data/spec/unit/plugins/digital_ocean_spec.rb +0 -106
- data/spec/unit/plugins/dmi_spec.rb +0 -156
- data/spec/unit/plugins/docker_spec.rb +0 -100
- data/spec/unit/plugins/ec2_spec.rb +0 -452
- data/spec/unit/plugins/elixir_spec.rb +0 -55
- data/spec/unit/plugins/erlang_spec.rb +0 -71
- data/spec/unit/plugins/eucalyptus_spec.rb +0 -109
- data/spec/unit/plugins/fail_spec.rb +0 -260
- data/spec/unit/plugins/freebsd/cpu_spec.rb +0 -129
- data/spec/unit/plugins/freebsd/hostname_spec.rb +0 -35
- data/spec/unit/plugins/freebsd/kernel_spec.rb +0 -36
- data/spec/unit/plugins/freebsd/platform_spec.rb +0 -38
- data/spec/unit/plugins/gce_spec.rb +0 -81
- data/spec/unit/plugins/go_spec.rb +0 -48
- data/spec/unit/plugins/groovy_spec.rb +0 -66
- data/spec/unit/plugins/haskell_spec.rb +0 -231
- data/spec/unit/plugins/hostname_spec.rb +0 -162
- data/spec/unit/plugins/init_package_spec.rb +0 -60
- data/spec/unit/plugins/java_spec.rb +0 -230
- data/spec/unit/plugins/joyent_spec.rb +0 -100
- data/spec/unit/plugins/kernel_spec.rb +0 -38
- data/spec/unit/plugins/linode_spec.rb +0 -135
- data/spec/unit/plugins/linux/block_device_spec.rb +0 -75
- data/spec/unit/plugins/linux/cpu_spec.rb +0 -441
- data/spec/unit/plugins/linux/filesystem_spec.rb +0 -550
- data/spec/unit/plugins/linux/fips_spec.rb +0 -60
- data/spec/unit/plugins/linux/hostname_spec.rb +0 -52
- data/spec/unit/plugins/linux/hostnamectl_spec.rb +0 -59
- data/spec/unit/plugins/linux/kernel_spec.rb +0 -71
- data/spec/unit/plugins/linux/lsb_spec.rb +0 -147
- data/spec/unit/plugins/linux/lspci_spec.rb +0 -133
- data/spec/unit/plugins/linux/machineid_spec.rb +0 -46
- data/spec/unit/plugins/linux/mdadm_spec.rb +0 -170
- data/spec/unit/plugins/linux/memory_spec.rb +0 -256
- data/spec/unit/plugins/linux/network_spec.rb +0 -1392
- data/spec/unit/plugins/linux/platform_spec.rb +0 -812
- data/spec/unit/plugins/linux/sessions_spec.rb +0 -98
- data/spec/unit/plugins/linux/sysctl_spec.rb +0 -53
- data/spec/unit/plugins/linux/systemd_paths_spec.rb +0 -122
- data/spec/unit/plugins/linux/uptime_spec.rb +0 -48
- data/spec/unit/plugins/linux/virtualization_spec.rb +0 -650
- data/spec/unit/plugins/lua_spec.rb +0 -60
- data/spec/unit/plugins/mono_spec.rb +0 -67
- data/spec/unit/plugins/netbsd/hostname_spec.rb +0 -43
- data/spec/unit/plugins/netbsd/kernel_spec.rb +0 -35
- data/spec/unit/plugins/netbsd/platform_spec.rb +0 -38
- data/spec/unit/plugins/network_spec.rb +0 -1078
- data/spec/unit/plugins/nodejs_spec.rb +0 -55
- data/spec/unit/plugins/ohai_spec.rb +0 -32
- data/spec/unit/plugins/ohai_time_spec.rb +0 -44
- data/spec/unit/plugins/openbsd/hostname_spec.rb +0 -43
- data/spec/unit/plugins/openbsd/kernel_spec.rb +0 -36
- data/spec/unit/plugins/openbsd/platform_spec.rb +0 -33
- data/spec/unit/plugins/openstack_spec.rb +0 -311
- data/spec/unit/plugins/os_spec.rb +0 -115
- data/spec/unit/plugins/packages_spec.rb +0 -353
- data/spec/unit/plugins/passwd_spec.rb +0 -65
- data/spec/unit/plugins/perl_spec.rb +0 -62
- data/spec/unit/plugins/php_spec.rb +0 -97
- data/spec/unit/plugins/platform_spec.rb +0 -65
- data/spec/unit/plugins/powershell_spec.rb +0 -71
- data/spec/unit/plugins/python_spec.rb +0 -51
- data/spec/unit/plugins/rackspace_spec.rb +0 -350
- data/spec/unit/plugins/root_group_spec.rb +0 -90
- data/spec/unit/plugins/ruby_spec.rb +0 -60
- data/spec/unit/plugins/rust_spec.rb +0 -43
- data/spec/unit/plugins/scala_spec.rb +0 -58
- data/spec/unit/plugins/scaleway_spec.rb +0 -93
- data/spec/unit/plugins/scsi_spec.rb +0 -69
- data/spec/unit/plugins/shard_spec.rb +0 -121
- data/spec/unit/plugins/shells_spec.rb +0 -56
- data/spec/unit/plugins/softlayer_spec.rb +0 -60
- data/spec/unit/plugins/solaris2/cpu_spec.rb +0 -2926
- data/spec/unit/plugins/solaris2/dmi_spec.rb +0 -153
- data/spec/unit/plugins/solaris2/filesystem.rb +0 -407
- data/spec/unit/plugins/solaris2/hostname_spec.rb +0 -37
- data/spec/unit/plugins/solaris2/kernel_spec.rb +0 -183
- data/spec/unit/plugins/solaris2/memory_spec.rb +0 -43
- data/spec/unit/plugins/solaris2/network_spec.rb +0 -201
- data/spec/unit/plugins/solaris2/platform_spec.rb +0 -108
- data/spec/unit/plugins/solaris2/virtualization_spec.rb +0 -97
- data/spec/unit/plugins/ssh_host_keys_spec.rb +0 -116
- data/spec/unit/plugins/sysconf_spec.rb +0 -680
- data/spec/unit/plugins/timezone_spec.rb +0 -30
- data/spec/unit/plugins/vbox_host_spec.rb +0 -14
- data/spec/unit/plugins/virtualbox_spec.rb +0 -375
- data/spec/unit/plugins/vmware_spec.rb +0 -81
- data/spec/unit/plugins/windows/cpu_spec.rb +0 -118
- data/spec/unit/plugins/windows/filesystem_spec.rb +0 -226
- data/spec/unit/plugins/windows/fips_spec.rb +0 -60
- data/spec/unit/plugins/windows/kernel_spec.rb +0 -79
- data/spec/unit/plugins/windows/memory_spec.rb +0 -52
- data/spec/unit/plugins/windows/network_spec.rb +0 -137
- data/spec/unit/plugins/windows/system_enclosure_spec.rb +0 -45
- data/spec/unit/plugins/windows/uptime_spec.rb +0 -38
- data/spec/unit/plugins/windows/virtualization_spec.rb +0 -63
- data/spec/unit/plugins/zpools_spec.rb +0 -244
- data/spec/unit/provides_map_spec.rb +0 -208
- data/spec/unit/runner_spec.rb +0 -422
- data/spec/unit/system_spec.rb +0 -416
- data/spec/unit/util/file_helper_spec.rb +0 -47
- data/spec/unit/util/ip_helper_spec.rb +0 -128
@@ -1,108 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Trevor O (<trevoro@joyent.com>)
|
3
|
-
# Copyright:: Copyright (c) 2009-2016 Chef Software, Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
#
|
18
|
-
|
19
|
-
require "spec_helper"
|
20
|
-
|
21
|
-
describe Ohai::System, "Solaris plugin platform" do
|
22
|
-
before do
|
23
|
-
@plugin = get_plugin("solaris2/platform")
|
24
|
-
allow(@plugin).to receive(:collect_os).and_return(:solaris2)
|
25
|
-
allow(@plugin).to receive(:shell_out).with("/sbin/uname -X")
|
26
|
-
end
|
27
|
-
|
28
|
-
describe "on SmartOS" do
|
29
|
-
before do
|
30
|
-
@uname_x = <<~UNAME_X
|
31
|
-
System = SunOS
|
32
|
-
Node = node.example.com
|
33
|
-
Release = 5.11
|
34
|
-
KernelID = joyent_20120130T201844Z
|
35
|
-
Machine = i86pc
|
36
|
-
BusType = <unknown>
|
37
|
-
Serial = <unknown>
|
38
|
-
Users = <unknown>
|
39
|
-
OEM# = 0
|
40
|
-
Origin# = 1
|
41
|
-
NumCPU = 16
|
42
|
-
UNAME_X
|
43
|
-
|
44
|
-
allow(File).to receive(:exist?).with("/sbin/uname").and_return(true)
|
45
|
-
allow(@plugin).to receive(:shell_out).with("/sbin/uname -X").and_return(mock_shell_out(0, @uname_x, ""))
|
46
|
-
|
47
|
-
@release = StringIO.new(" SmartOS 20120130T201844Z x86_64\n")
|
48
|
-
allow(File).to receive(:open).with("/etc/release").and_yield(@release)
|
49
|
-
end
|
50
|
-
|
51
|
-
it "runs uname and set platform and build" do
|
52
|
-
@plugin.run
|
53
|
-
expect(@plugin[:platform_build]).to eq("joyent_20120130T201844Z")
|
54
|
-
end
|
55
|
-
|
56
|
-
it "sets the platform" do
|
57
|
-
@plugin.run
|
58
|
-
expect(@plugin[:platform]).to eq("smartos")
|
59
|
-
end
|
60
|
-
|
61
|
-
it "sets the platform_version" do
|
62
|
-
@plugin.run
|
63
|
-
expect(@plugin[:platform_version]).to eq("5.11")
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
describe "on Solaris 11" do
|
69
|
-
before do
|
70
|
-
@uname_x = <<~UNAME_X
|
71
|
-
System = SunOS
|
72
|
-
Node = node.example.com
|
73
|
-
Release = 5.11
|
74
|
-
KernelID = 11.1
|
75
|
-
Machine = i86pc
|
76
|
-
BusType = <unknown>
|
77
|
-
Serial = <unknown>
|
78
|
-
Users = <unknown>
|
79
|
-
OEM# = 0
|
80
|
-
Origin# = 1
|
81
|
-
NumCPU = 1
|
82
|
-
UNAME_X
|
83
|
-
|
84
|
-
allow(File).to receive(:exist?).with("/sbin/uname").and_return(true)
|
85
|
-
allow(@plugin).to receive(:shell_out).with("/sbin/uname -X").and_return(mock_shell_out(0, @uname_x, ""))
|
86
|
-
|
87
|
-
@release = StringIO.new(" Oracle Solaris 11.1 X86\n")
|
88
|
-
allow(File).to receive(:open).with("/etc/release").and_yield(@release)
|
89
|
-
end
|
90
|
-
|
91
|
-
it "runs uname and set platform and build" do
|
92
|
-
@plugin.run
|
93
|
-
expect(@plugin[:platform_build]).to eq("11.1")
|
94
|
-
end
|
95
|
-
|
96
|
-
it "sets the platform" do
|
97
|
-
@plugin.run
|
98
|
-
expect(@plugin[:platform]).to eq("solaris2")
|
99
|
-
end
|
100
|
-
|
101
|
-
it "sets the platform_version" do
|
102
|
-
@plugin.run
|
103
|
-
expect(@plugin[:platform_version]).to eq("5.11")
|
104
|
-
end
|
105
|
-
|
106
|
-
end
|
107
|
-
|
108
|
-
end
|
@@ -1,97 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Sean Walbran (<seanwalbran@gmail.com>)
|
3
|
-
# Copyright:: Copyright (c) 2009-2016 Chef Software, Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
#
|
18
|
-
|
19
|
-
require "spec_helper"
|
20
|
-
|
21
|
-
describe Ohai::System, "Solaris virtualization platform" do
|
22
|
-
let(:plugin) { get_plugin("solaris2/virtualization") }
|
23
|
-
|
24
|
-
before do
|
25
|
-
@psrinfo_pv = <<~PSRINFO_PV
|
26
|
-
The physical processor has 1 virtual processor (0)
|
27
|
-
x86 (GenuineIntel family 6 model 2 step 3 clock 2667 MHz)
|
28
|
-
Intel Pentium(r) Pro
|
29
|
-
PSRINFO_PV
|
30
|
-
|
31
|
-
allow(plugin).to receive(:collect_os).and_return(:solaris2)
|
32
|
-
|
33
|
-
# default to all requested Files not existing
|
34
|
-
allow(File).to receive(:exist?).with("/usr/sbin/psrinfo").and_return(false)
|
35
|
-
allow(File).to receive(:exist?).with("/usr/sbin/smbios").and_return(false)
|
36
|
-
allow(File).to receive(:exist?).with("/usr/sbin/zoneadm").and_return(false)
|
37
|
-
allow(plugin).to receive(:shell_out).with("/usr/sbin/smbios").and_return(mock_shell_out(0, "", ""))
|
38
|
-
allow(plugin).to receive(:shell_out).with("#{Ohai.abs_path( "/usr/sbin/psrinfo" )} -pv").and_return(mock_shell_out(0, "", ""))
|
39
|
-
end
|
40
|
-
|
41
|
-
describe "when we are checking for kvm" do
|
42
|
-
before do
|
43
|
-
expect(File).to receive(:exist?).with("/usr/sbin/psrinfo").and_return(true)
|
44
|
-
end
|
45
|
-
|
46
|
-
it "runs psrinfo -pv" do
|
47
|
-
expect(plugin).to receive(:shell_out).with("#{Ohai.abs_path( "/usr/sbin/psrinfo" )} -pv")
|
48
|
-
plugin.run
|
49
|
-
end
|
50
|
-
|
51
|
-
it "sets kvm guest if psrinfo -pv contains QEMU Virtual CPU" do
|
52
|
-
allow(plugin).to receive(:shell_out).with("#{Ohai.abs_path( "/usr/sbin/psrinfo" )} -pv").and_return(mock_shell_out(0, "QEMU Virtual CPU", ""))
|
53
|
-
plugin.run
|
54
|
-
expect(plugin[:virtualization][:system]).to eq("kvm")
|
55
|
-
expect(plugin[:virtualization][:role]).to eq("guest")
|
56
|
-
expect(plugin[:virtualization][:systems][:kvm]).to eq("guest")
|
57
|
-
end
|
58
|
-
|
59
|
-
it "does not set virtualization if kvm isn't there" do
|
60
|
-
expect(plugin).to receive(:shell_out).with("#{Ohai.abs_path( "/usr/sbin/psrinfo" )} -pv").and_return(mock_shell_out(0, @psrinfo_pv, ""))
|
61
|
-
plugin.run
|
62
|
-
expect(plugin[:virtualization][:systems]).to eq({})
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
describe "when we are parsing DMI data" do
|
67
|
-
|
68
|
-
it "sets virtualization attributes if the appropriate DMI data is present" do
|
69
|
-
plugin[:dmi] = { system: {
|
70
|
-
manufacturer: "Amazon EC2",
|
71
|
-
product: "c5n.large",
|
72
|
-
version: nil,
|
73
|
-
},
|
74
|
-
}
|
75
|
-
plugin.run
|
76
|
-
expect(plugin[:virtualization][:system]).to eq("amazonec2")
|
77
|
-
expect(plugin[:virtualization][:role]).to eq("guest")
|
78
|
-
expect(plugin[:virtualization][:systems][:amazonec2]).to eq("guest")
|
79
|
-
end
|
80
|
-
|
81
|
-
it "sets empty virtualization attributes if nothing is detected" do
|
82
|
-
plugin[:dmi] = { system: {
|
83
|
-
manufacturer: "Supermicro",
|
84
|
-
product: "X10SLH-N6-ST031",
|
85
|
-
version: "0123456789",
|
86
|
-
},
|
87
|
-
}
|
88
|
-
plugin.run
|
89
|
-
expect(plugin[:virtualization]).to eq({ "systems" => {} })
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
it "does not set virtualization if no tests match" do
|
94
|
-
plugin.run
|
95
|
-
expect(plugin[:virtualization][:systems]).to eq({})
|
96
|
-
end
|
97
|
-
end
|
@@ -1,116 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Bryan McLellan <btm@chef.io>
|
3
|
-
# Copyright:: Copyright (c) 2012-2016 Chef Software, Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
#
|
18
|
-
|
19
|
-
require "spec_helper"
|
20
|
-
|
21
|
-
describe Ohai::System, "ssh_host_key plugin" do
|
22
|
-
|
23
|
-
before do
|
24
|
-
@plugin = get_plugin("ssh_host_key")
|
25
|
-
@plugin[:keys] = Mash.new
|
26
|
-
|
27
|
-
allow(File).to receive(:exist?).with("/etc/ssh/sshd_config").and_return(true)
|
28
|
-
allow(File).to receive(:open).with("/etc/ssh/sshd_config").and_yield(sshd_config_file)
|
29
|
-
allow(File).to receive(:exist?).and_return(true)
|
30
|
-
allow(File).to receive(:exist?).with("/etc/ssh/ssh_host_dsa_key.pub").and_return(true)
|
31
|
-
allow(File).to receive(:exist?).with("/etc/ssh/ssh_host_rsa_key.pub").and_return(true)
|
32
|
-
allow(File).to receive(:exist?).with("/etc/ssh/ssh_host_ecdsa_key.pub").and_return(true)
|
33
|
-
allow(File).to receive(:exist?).with("/etc/ssh/ssh_host_ed25519_key.pub").and_return(true)
|
34
|
-
|
35
|
-
# Ensure we can still use IO.read
|
36
|
-
io_read = IO.method(:read)
|
37
|
-
allow(IO).to receive(:read) { |file| io_read.call(file) }
|
38
|
-
|
39
|
-
# Return fake public key files so we don't have to go digging for them in unit tests
|
40
|
-
@dsa_key = "ssh-dss AAAAB3NzaC1kc3MAAACBAMHlT02xN8kietxPfhcb98xHueTzKCOTz6dZlP/dmKILHrQOAExuSEeNiA2uvmhHNVQvs/cBsRiDxgSKux3ie2q8+MB6vHCiSpSkoPjrL75iT57YDilCB4/sytt6IJpj+H42wRDWTX0/QRybMHUvmnmEL0cwZXykSvrIum0BKB6hAAAAFQDsi6WUCClhtZIiTY9uh8eAre+SbQAAAIEAgNnuw0uEuqtcVif+AYd/bCZvL9FPqg7DrmTkamNEcVinhUGwsPGJTLJf+o5ens1X4RzQoi1R6Y6zCTL2FN/hZgINJNO0z9BN402wWrZmQd+Vb1U5DyDtveuvipqyQS+fm9neRwdLuv36Fc9f9nkZ7YHpkGPJp+yJpG4OoeREhwgAAACBAIf9kKLf2XiXnlByzlJ2Naa55d/hp2E059VKCRsBS++xFKYKvSqjnDQBFiMtAUhb8EdTyBGyalqOgqogDQVtwHfTZWZwqHAhry9aM06y92Eu/xSey4tWjKeknOsnRe640KC4zmKDBRTrjjkuAdrKPN9k3jl+OCc669JHlIfo6kqf oppa"
|
41
|
-
@rsa_key = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuhcVXV+nNapkyUC5p4TH1ymRxUjtMBKqYWmwyI29gVFnUNeHkKFHWon0KFeGJP2Rm8BfTiZa9ER9e8pRr4Nd+z1C1o0kVoxEEfB9tpSdTlpk1GG83D94l57fij8THRVIwuCEosViUlg1gDgC4SpxbqfdBkUN2qyf6JDOh7t2QpYh7berpDEWeBpb7BKdLEDT57uw7ijKzSNyaXqq8KkB9I+UFrRwpuos4W7ilX+PQ+mWLi2ZZJfTYZMxxVS+qJwiDtNxGCRwTOQZG03kI7eLBZG+igupr0uD4o6qeftPOr0kxgjoPU4nEKvYiGq8Rqd2vYrhiaJHLk9QB6xStQvS3Q== oppa"
|
42
|
-
@ecdsa_key = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBx8VgvxmHxs/sIn/ATh0iUcuz1I2Xc0e1ejXCGHBMZ98IE3FBt1ezlqCpNMcHVV2skQQ8vyLbKxzweyZuNSDU8= oppa"
|
43
|
-
@ed25519_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFYGnIM5K5JaRxbMCqz8cPMmLp57ZoJQvA5Tlj18EO6H djb"
|
44
|
-
allow(IO).to receive(:read).with("/etc/ssh/ssh_host_dsa_key.pub").and_return(@dsa_key)
|
45
|
-
allow(IO).to receive(:read).with("/etc/ssh/ssh_host_rsa_key.pub").and_return(@rsa_key)
|
46
|
-
allow(IO).to receive(:read).with("/etc/ssh/ssh_host_ecdsa_key.pub").and_return(@ecdsa_key)
|
47
|
-
allow(IO).to receive(:read).with("/etc/ssh/ssh_host_ed25519_key.pub").and_return(@ed25519_key)
|
48
|
-
end
|
49
|
-
|
50
|
-
shared_examples "loads keys" do
|
51
|
-
it "reads the key and sets the dsa attribute correctly" do
|
52
|
-
@plugin.run
|
53
|
-
expect(@plugin[:keys][:ssh][:host_dsa_public]).to eql(@dsa_key.split[1])
|
54
|
-
expect(@plugin[:keys][:ssh][:host_dsa_type]).to be_nil
|
55
|
-
end
|
56
|
-
|
57
|
-
it "reads the key and sets the rsa attribute correctly" do
|
58
|
-
@plugin.run
|
59
|
-
expect(@plugin[:keys][:ssh][:host_rsa_public]).to eql(@rsa_key.split[1])
|
60
|
-
expect(@plugin[:keys][:ssh][:host_rsa_type]).to be_nil
|
61
|
-
end
|
62
|
-
|
63
|
-
it "reads the key and sets the ecdsa attribute correctly" do
|
64
|
-
@plugin.run
|
65
|
-
expect(@plugin[:keys][:ssh][:host_ecdsa_public]).to eql(@ecdsa_key.split[1])
|
66
|
-
expect(@plugin[:keys][:ssh][:host_ecdsa_type]).to eql(@ecdsa_key.split[0])
|
67
|
-
end
|
68
|
-
|
69
|
-
it "reads the key and sets the ed25519 attribute correctly" do
|
70
|
-
@plugin.run
|
71
|
-
expect(@plugin[:keys][:ssh][:host_ed25519_public]).to eql(@ed25519_key.split[1])
|
72
|
-
expect(@plugin[:keys][:ssh][:host_ed25519_type]).to be_nil
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
context "when an sshd_config exists" do
|
77
|
-
let :sshd_config_file do
|
78
|
-
<<~EOS
|
79
|
-
# HostKeys for protocol version 2
|
80
|
-
HostKey /etc/ssh/ssh_host_rsa_key
|
81
|
-
HostKey /etc/ssh/ssh_host_dsa_key
|
82
|
-
HostKey /etc/ssh/ssh_host_ecdsa_key
|
83
|
-
HostKey /etc/ssh/ssh_host_ed25519_key
|
84
|
-
EOS
|
85
|
-
end
|
86
|
-
|
87
|
-
it_behaves_like "loads keys"
|
88
|
-
end
|
89
|
-
|
90
|
-
context "when an sshd_config exists with commented entries" do
|
91
|
-
let :sshd_config_file do
|
92
|
-
<<~EOS
|
93
|
-
# HostKeys for protocol version 2
|
94
|
-
#HostKey /etc/ssh/ssh_host_rsa_key
|
95
|
-
#HostKey /etc/ssh/ssh_host_dsa_key
|
96
|
-
#HostKey /etc/ssh/ssh_host_ecdsa_key
|
97
|
-
#HostKey /etc/ssh/ssh_host_ed25519_key
|
98
|
-
EOS
|
99
|
-
end
|
100
|
-
|
101
|
-
it_behaves_like "loads keys"
|
102
|
-
end
|
103
|
-
|
104
|
-
context "when an sshd_config can not be found" do
|
105
|
-
let :sshd_config_file do
|
106
|
-
nil
|
107
|
-
end
|
108
|
-
|
109
|
-
before do
|
110
|
-
allow(File).to receive(:exist?).with("/etc/ssh/sshd_config").and_return(false)
|
111
|
-
allow(File).to receive(:exist?).with("/etc/sshd_config").and_return(false)
|
112
|
-
end
|
113
|
-
|
114
|
-
it_behaves_like "loads keys"
|
115
|
-
end
|
116
|
-
end
|
@@ -1,680 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Davide Cavalca <dcavalca@fb.com>
|
3
|
-
# Copyright:: Copyright (c) 2016 Facebook
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
#
|
18
|
-
|
19
|
-
require "spec_helper"
|
20
|
-
|
21
|
-
describe Ohai::System, "sysconf plugin", :unix_only do
|
22
|
-
let(:plugin) { get_plugin("sysconf") }
|
23
|
-
|
24
|
-
it "populates sysconf if getconf is found" do
|
25
|
-
getconf_out = <<~GETCONF_OUT
|
26
|
-
LINK_MAX 65000
|
27
|
-
_POSIX_LINK_MAX 65000
|
28
|
-
MAX_CANON 255
|
29
|
-
_POSIX_MAX_CANON 255
|
30
|
-
MAX_INPUT 255
|
31
|
-
_POSIX_MAX_INPUT 255
|
32
|
-
NAME_MAX 255
|
33
|
-
_POSIX_NAME_MAX 255
|
34
|
-
PATH_MAX 4096
|
35
|
-
_POSIX_PATH_MAX 4096
|
36
|
-
PIPE_BUF 4096
|
37
|
-
_POSIX_PIPE_BUF 4096
|
38
|
-
SOCK_MAXBUF
|
39
|
-
_POSIX_ASYNC_IO
|
40
|
-
_POSIX_CHOWN_RESTRICTED 1
|
41
|
-
_POSIX_NO_TRUNC 1
|
42
|
-
_POSIX_PRIO_IO
|
43
|
-
_POSIX_SYNC_IO
|
44
|
-
_POSIX_VDISABLE 0
|
45
|
-
ARG_MAX 2097152
|
46
|
-
ATEXIT_MAX 2147483647
|
47
|
-
CHAR_BIT 8
|
48
|
-
CHAR_MAX 127
|
49
|
-
CHAR_MIN -128
|
50
|
-
CHILD_MAX 63672
|
51
|
-
CLK_TCK 100
|
52
|
-
INT_MAX 2147483647
|
53
|
-
INT_MIN -2147483648
|
54
|
-
IOV_MAX 1024
|
55
|
-
LOGNAME_MAX 256
|
56
|
-
LONG_BIT 64
|
57
|
-
MB_LEN_MAX 16
|
58
|
-
NGROUPS_MAX 65536
|
59
|
-
NL_ARGMAX 4096
|
60
|
-
NL_LANGMAX 2048
|
61
|
-
NL_MSGMAX 2147483647
|
62
|
-
NL_NMAX 2147483647
|
63
|
-
NL_SETMAX 2147483647
|
64
|
-
NL_TEXTMAX 2147483647
|
65
|
-
NSS_BUFLEN_GROUP 1024
|
66
|
-
NSS_BUFLEN_PASSWD 1024
|
67
|
-
NZERO 20
|
68
|
-
OPEN_MAX 1024
|
69
|
-
PAGESIZE 4096
|
70
|
-
PAGE_SIZE 4096
|
71
|
-
PASS_MAX 8192
|
72
|
-
PTHREAD_DESTRUCTOR_ITERATIONS 4
|
73
|
-
PTHREAD_KEYS_MAX 1024
|
74
|
-
PTHREAD_STACK_MIN 16384
|
75
|
-
PTHREAD_THREADS_MAX
|
76
|
-
SCHAR_MAX 127
|
77
|
-
SCHAR_MIN -128
|
78
|
-
SHRT_MAX 32767
|
79
|
-
SHRT_MIN -32768
|
80
|
-
SSIZE_MAX 32767
|
81
|
-
TTY_NAME_MAX 32
|
82
|
-
TZNAME_MAX 6
|
83
|
-
UCHAR_MAX 255
|
84
|
-
UINT_MAX 4294967295
|
85
|
-
UIO_MAXIOV 1024
|
86
|
-
ULONG_MAX 18446744073709551615
|
87
|
-
USHRT_MAX 65535
|
88
|
-
WORD_BIT 32
|
89
|
-
_AVPHYS_PAGES 2101393
|
90
|
-
_NPROCESSORS_CONF 8
|
91
|
-
_NPROCESSORS_ONLN 8
|
92
|
-
_PHYS_PAGES 4096040
|
93
|
-
_POSIX_ARG_MAX 2097152
|
94
|
-
_POSIX_ASYNCHRONOUS_IO 200809
|
95
|
-
_POSIX_CHILD_MAX 63672
|
96
|
-
_POSIX_FSYNC 200809
|
97
|
-
_POSIX_JOB_CONTROL 1
|
98
|
-
_POSIX_MAPPED_FILES 200809
|
99
|
-
_POSIX_MEMLOCK 200809
|
100
|
-
_POSIX_MEMLOCK_RANGE 200809
|
101
|
-
_POSIX_MEMORY_PROTECTION 200809
|
102
|
-
_POSIX_MESSAGE_PASSING 200809
|
103
|
-
_POSIX_NGROUPS_MAX 65536
|
104
|
-
_POSIX_OPEN_MAX 1024
|
105
|
-
_POSIX_PII
|
106
|
-
_POSIX_PII_INTERNET
|
107
|
-
_POSIX_PII_INTERNET_DGRAM
|
108
|
-
_POSIX_PII_INTERNET_STREAM
|
109
|
-
_POSIX_PII_OSI
|
110
|
-
_POSIX_PII_OSI_CLTS
|
111
|
-
_POSIX_PII_OSI_COTS
|
112
|
-
_POSIX_PII_OSI_M
|
113
|
-
_POSIX_PII_SOCKET
|
114
|
-
_POSIX_PII_XTI
|
115
|
-
_POSIX_POLL
|
116
|
-
_POSIX_PRIORITIZED_IO 200809
|
117
|
-
_POSIX_PRIORITY_SCHEDULING 200809
|
118
|
-
_POSIX_REALTIME_SIGNALS 200809
|
119
|
-
_POSIX_SAVED_IDS 1
|
120
|
-
_POSIX_SELECT
|
121
|
-
_POSIX_SEMAPHORES 200809
|
122
|
-
_POSIX_SHARED_MEMORY_OBJECTS 200809
|
123
|
-
_POSIX_SSIZE_MAX 32767
|
124
|
-
_POSIX_STREAM_MAX 16
|
125
|
-
_POSIX_SYNCHRONIZED_IO 200809
|
126
|
-
_POSIX_THREADS 200809
|
127
|
-
_POSIX_THREAD_ATTR_STACKADDR 200809
|
128
|
-
_POSIX_THREAD_ATTR_STACKSIZE 200809
|
129
|
-
_POSIX_THREAD_PRIORITY_SCHEDULING 200809
|
130
|
-
_POSIX_THREAD_PRIO_INHERIT 200809
|
131
|
-
_POSIX_THREAD_PRIO_PROTECT 200809
|
132
|
-
_POSIX_THREAD_ROBUST_PRIO_INHERIT
|
133
|
-
_POSIX_THREAD_ROBUST_PRIO_PROTECT
|
134
|
-
_POSIX_THREAD_PROCESS_SHARED 200809
|
135
|
-
_POSIX_THREAD_SAFE_FUNCTIONS 200809
|
136
|
-
_POSIX_TIMERS 200809
|
137
|
-
TIMER_MAX
|
138
|
-
_POSIX_TZNAME_MAX 6
|
139
|
-
_POSIX_VERSION 200809
|
140
|
-
_T_IOV_MAX
|
141
|
-
_XOPEN_CRYPT 1
|
142
|
-
_XOPEN_ENH_I18N 1
|
143
|
-
_XOPEN_LEGACY 1
|
144
|
-
_XOPEN_REALTIME 1
|
145
|
-
_XOPEN_REALTIME_THREADS 1
|
146
|
-
_XOPEN_SHM 1
|
147
|
-
_XOPEN_UNIX 1
|
148
|
-
_XOPEN_VERSION 700
|
149
|
-
_XOPEN_XCU_VERSION 4
|
150
|
-
_XOPEN_XPG2 1
|
151
|
-
_XOPEN_XPG3 1
|
152
|
-
_XOPEN_XPG4 1
|
153
|
-
BC_BASE_MAX 99
|
154
|
-
BC_DIM_MAX 2048
|
155
|
-
BC_SCALE_MAX 99
|
156
|
-
BC_STRING_MAX 1000
|
157
|
-
CHARCLASS_NAME_MAX 2048
|
158
|
-
COLL_WEIGHTS_MAX 255
|
159
|
-
EQUIV_CLASS_MAX
|
160
|
-
EXPR_NEST_MAX 32
|
161
|
-
LINE_MAX 2048
|
162
|
-
POSIX2_BC_BASE_MAX 99
|
163
|
-
POSIX2_BC_DIM_MAX 2048
|
164
|
-
POSIX2_BC_SCALE_MAX 99
|
165
|
-
POSIX2_BC_STRING_MAX 1000
|
166
|
-
POSIX2_CHAR_TERM 200809
|
167
|
-
POSIX2_COLL_WEIGHTS_MAX 255
|
168
|
-
POSIX2_C_BIND 200809
|
169
|
-
POSIX2_C_DEV 200809
|
170
|
-
POSIX2_C_VERSION 200809
|
171
|
-
POSIX2_EXPR_NEST_MAX 32
|
172
|
-
POSIX2_FORT_DEV
|
173
|
-
POSIX2_FORT_RUN
|
174
|
-
_POSIX2_LINE_MAX 2048
|
175
|
-
POSIX2_LINE_MAX 2048
|
176
|
-
POSIX2_LOCALEDEF 200809
|
177
|
-
POSIX2_RE_DUP_MAX 32767
|
178
|
-
POSIX2_SW_DEV 200809
|
179
|
-
POSIX2_UPE
|
180
|
-
POSIX2_VERSION 200809
|
181
|
-
RE_DUP_MAX 32767
|
182
|
-
PATH /bin:/usr/bin
|
183
|
-
CS_PATH /bin:/usr/bin
|
184
|
-
LFS_CFLAGS
|
185
|
-
LFS_LDFLAGS
|
186
|
-
LFS_LIBS
|
187
|
-
LFS_LINTFLAGS
|
188
|
-
LFS64_CFLAGS -D_LARGEFILE64_SOURCE
|
189
|
-
LFS64_LDFLAGS
|
190
|
-
LFS64_LIBS
|
191
|
-
LFS64_LINTFLAGS -D_LARGEFILE64_SOURCE
|
192
|
-
_XBS5_WIDTH_RESTRICTED_ENVS XBS5_LP64_OFF64
|
193
|
-
XBS5_WIDTH_RESTRICTED_ENVS XBS5_LP64_OFF64
|
194
|
-
_XBS5_ILP32_OFF32
|
195
|
-
XBS5_ILP32_OFF32_CFLAGS
|
196
|
-
XBS5_ILP32_OFF32_LDFLAGS
|
197
|
-
XBS5_ILP32_OFF32_LIBS
|
198
|
-
XBS5_ILP32_OFF32_LINTFLAGS
|
199
|
-
_XBS5_ILP32_OFFBIG
|
200
|
-
XBS5_ILP32_OFFBIG_CFLAGS
|
201
|
-
XBS5_ILP32_OFFBIG_LDFLAGS
|
202
|
-
XBS5_ILP32_OFFBIG_LIBS
|
203
|
-
XBS5_ILP32_OFFBIG_LINTFLAGS
|
204
|
-
_XBS5_LP64_OFF64 1
|
205
|
-
XBS5_LP64_OFF64_CFLAGS -m64
|
206
|
-
XBS5_LP64_OFF64_LDFLAGS -m64
|
207
|
-
XBS5_LP64_OFF64_LIBS
|
208
|
-
XBS5_LP64_OFF64_LINTFLAGS
|
209
|
-
_XBS5_LPBIG_OFFBIG
|
210
|
-
XBS5_LPBIG_OFFBIG_CFLAGS
|
211
|
-
XBS5_LPBIG_OFFBIG_LDFLAGS
|
212
|
-
XBS5_LPBIG_OFFBIG_LIBS
|
213
|
-
XBS5_LPBIG_OFFBIG_LINTFLAGS
|
214
|
-
_POSIX_V6_ILP32_OFF32
|
215
|
-
POSIX_V6_ILP32_OFF32_CFLAGS
|
216
|
-
POSIX_V6_ILP32_OFF32_LDFLAGS
|
217
|
-
POSIX_V6_ILP32_OFF32_LIBS
|
218
|
-
POSIX_V6_ILP32_OFF32_LINTFLAGS
|
219
|
-
_POSIX_V6_WIDTH_RESTRICTED_ENVS POSIX_V6_LP64_OFF64
|
220
|
-
POSIX_V6_WIDTH_RESTRICTED_ENVS POSIX_V6_LP64_OFF64
|
221
|
-
_POSIX_V6_ILP32_OFFBIG
|
222
|
-
POSIX_V6_ILP32_OFFBIG_CFLAGS
|
223
|
-
POSIX_V6_ILP32_OFFBIG_LDFLAGS
|
224
|
-
POSIX_V6_ILP32_OFFBIG_LIBS
|
225
|
-
POSIX_V6_ILP32_OFFBIG_LINTFLAGS
|
226
|
-
_POSIX_V6_LP64_OFF64 1
|
227
|
-
POSIX_V6_LP64_OFF64_CFLAGS -m64
|
228
|
-
POSIX_V6_LP64_OFF64_LDFLAGS -m64
|
229
|
-
POSIX_V6_LP64_OFF64_LIBS
|
230
|
-
POSIX_V6_LP64_OFF64_LINTFLAGS
|
231
|
-
_POSIX_V6_LPBIG_OFFBIG
|
232
|
-
POSIX_V6_LPBIG_OFFBIG_CFLAGS
|
233
|
-
POSIX_V6_LPBIG_OFFBIG_LDFLAGS
|
234
|
-
POSIX_V6_LPBIG_OFFBIG_LIBS
|
235
|
-
POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
|
236
|
-
_POSIX_V7_ILP32_OFF32
|
237
|
-
POSIX_V7_ILP32_OFF32_CFLAGS
|
238
|
-
POSIX_V7_ILP32_OFF32_LDFLAGS
|
239
|
-
POSIX_V7_ILP32_OFF32_LIBS
|
240
|
-
POSIX_V7_ILP32_OFF32_LINTFLAGS
|
241
|
-
_POSIX_V7_WIDTH_RESTRICTED_ENVS POSIX_V7_LP64_OFF64
|
242
|
-
POSIX_V7_WIDTH_RESTRICTED_ENVS POSIX_V7_LP64_OFF64
|
243
|
-
_POSIX_V7_ILP32_OFFBIG
|
244
|
-
POSIX_V7_ILP32_OFFBIG_CFLAGS
|
245
|
-
POSIX_V7_ILP32_OFFBIG_LDFLAGS
|
246
|
-
POSIX_V7_ILP32_OFFBIG_LIBS
|
247
|
-
POSIX_V7_ILP32_OFFBIG_LINTFLAGS
|
248
|
-
_POSIX_V7_LP64_OFF64 1
|
249
|
-
POSIX_V7_LP64_OFF64_CFLAGS -m64
|
250
|
-
POSIX_V7_LP64_OFF64_LDFLAGS -m64
|
251
|
-
POSIX_V7_LP64_OFF64_LIBS
|
252
|
-
POSIX_V7_LP64_OFF64_LINTFLAGS
|
253
|
-
_POSIX_V7_LPBIG_OFFBIG
|
254
|
-
POSIX_V7_LPBIG_OFFBIG_CFLAGS
|
255
|
-
POSIX_V7_LPBIG_OFFBIG_LDFLAGS
|
256
|
-
POSIX_V7_LPBIG_OFFBIG_LIBS
|
257
|
-
POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
|
258
|
-
_POSIX_ADVISORY_INFO 200809
|
259
|
-
_POSIX_BARRIERS 200809
|
260
|
-
_POSIX_BASE
|
261
|
-
_POSIX_C_LANG_SUPPORT
|
262
|
-
_POSIX_C_LANG_SUPPORT_R
|
263
|
-
_POSIX_CLOCK_SELECTION 200809
|
264
|
-
_POSIX_CPUTIME 200809
|
265
|
-
_POSIX_THREAD_CPUTIME 200809
|
266
|
-
_POSIX_DEVICE_SPECIFIC
|
267
|
-
_POSIX_DEVICE_SPECIFIC_R
|
268
|
-
_POSIX_FD_MGMT
|
269
|
-
_POSIX_FIFO
|
270
|
-
_POSIX_PIPE
|
271
|
-
_POSIX_FILE_ATTRIBUTES
|
272
|
-
_POSIX_FILE_LOCKING
|
273
|
-
_POSIX_FILE_SYSTEM
|
274
|
-
_POSIX_MONOTONIC_CLOCK 200809
|
275
|
-
_POSIX_MULTI_PROCESS
|
276
|
-
_POSIX_SINGLE_PROCESS
|
277
|
-
_POSIX_NETWORKING
|
278
|
-
_POSIX_READER_WRITER_LOCKS 200809
|
279
|
-
_POSIX_SPIN_LOCKS 200809
|
280
|
-
_POSIX_REGEXP 1
|
281
|
-
_REGEX_VERSION
|
282
|
-
_POSIX_SHELL 1
|
283
|
-
_POSIX_SIGNALS
|
284
|
-
_POSIX_SPAWN 200809
|
285
|
-
_POSIX_SPORADIC_SERVER
|
286
|
-
_POSIX_THREAD_SPORADIC_SERVER
|
287
|
-
_POSIX_SYSTEM_DATABASE
|
288
|
-
_POSIX_SYSTEM_DATABASE_R
|
289
|
-
_POSIX_TIMEOUTS 200809
|
290
|
-
_POSIX_TYPED_MEMORY_OBJECTS
|
291
|
-
_POSIX_USER_GROUPS
|
292
|
-
_POSIX_USER_GROUPS_R
|
293
|
-
POSIX2_PBS
|
294
|
-
POSIX2_PBS_ACCOUNTING
|
295
|
-
POSIX2_PBS_LOCATE
|
296
|
-
POSIX2_PBS_TRACK
|
297
|
-
POSIX2_PBS_MESSAGE
|
298
|
-
SYMLOOP_MAX
|
299
|
-
STREAM_MAX 16
|
300
|
-
AIO_LISTIO_MAX
|
301
|
-
AIO_MAX
|
302
|
-
AIO_PRIO_DELTA_MAX 20
|
303
|
-
DELAYTIMER_MAX 2147483647
|
304
|
-
HOST_NAME_MAX 64
|
305
|
-
LOGIN_NAME_MAX 256
|
306
|
-
MQ_OPEN_MAX
|
307
|
-
MQ_PRIO_MAX 32768
|
308
|
-
_POSIX_DEVICE_IO
|
309
|
-
_POSIX_TRACE
|
310
|
-
_POSIX_TRACE_EVENT_FILTER
|
311
|
-
_POSIX_TRACE_INHERIT
|
312
|
-
_POSIX_TRACE_LOG
|
313
|
-
RTSIG_MAX 32
|
314
|
-
SEM_NSEMS_MAX
|
315
|
-
SEM_VALUE_MAX 2147483647
|
316
|
-
SIGQUEUE_MAX 63672
|
317
|
-
FILESIZEBITS 64
|
318
|
-
POSIX_ALLOC_SIZE_MIN 4096
|
319
|
-
POSIX_REC_INCR_XFER_SIZE
|
320
|
-
POSIX_REC_MAX_XFER_SIZE
|
321
|
-
POSIX_REC_MIN_XFER_SIZE 4096
|
322
|
-
POSIX_REC_XFER_ALIGN 4096
|
323
|
-
SYMLINK_MAX
|
324
|
-
GNU_LIBC_VERSION glibc 2.24
|
325
|
-
GNU_LIBPTHREAD_VERSION NPTL 2.24
|
326
|
-
POSIX2_SYMLINKS 1
|
327
|
-
LEVEL1_ICACHE_SIZE 32768
|
328
|
-
LEVEL1_ICACHE_ASSOC 8
|
329
|
-
LEVEL1_ICACHE_LINESIZE 64
|
330
|
-
LEVEL1_DCACHE_SIZE 32768
|
331
|
-
LEVEL1_DCACHE_ASSOC 8
|
332
|
-
LEVEL1_DCACHE_LINESIZE 64
|
333
|
-
LEVEL2_CACHE_SIZE 262144
|
334
|
-
LEVEL2_CACHE_ASSOC 4
|
335
|
-
LEVEL2_CACHE_LINESIZE 64
|
336
|
-
LEVEL3_CACHE_SIZE 8388608
|
337
|
-
LEVEL3_CACHE_ASSOC 16
|
338
|
-
LEVEL3_CACHE_LINESIZE 64
|
339
|
-
LEVEL4_CACHE_SIZE 0
|
340
|
-
LEVEL4_CACHE_ASSOC 0
|
341
|
-
LEVEL4_CACHE_LINESIZE 0
|
342
|
-
IPV6 200809
|
343
|
-
RAW_SOCKETS 200809
|
344
|
-
_POSIX_IPV6 200809
|
345
|
-
_POSIX_RAW_SOCKETS 200809
|
346
|
-
GETCONF_OUT
|
347
|
-
allow(plugin).to receive(:which).with("getconf").and_return("/usr/bin/getconf")
|
348
|
-
allow(plugin).to receive(:shell_out).with("/usr/bin/getconf -a").and_return(mock_shell_out(0, getconf_out, ""))
|
349
|
-
allow(plugin).to receive(:collect_os).and_return(:linux)
|
350
|
-
plugin.run
|
351
|
-
expect(plugin[:sysconf].to_hash).to eq({
|
352
|
-
"LINK_MAX" => 65000,
|
353
|
-
"_POSIX_LINK_MAX" => 65000,
|
354
|
-
"MAX_CANON" => 255,
|
355
|
-
"_POSIX_MAX_CANON" => 255,
|
356
|
-
"MAX_INPUT" => 255,
|
357
|
-
"_POSIX_MAX_INPUT" => 255,
|
358
|
-
"NAME_MAX" => 255,
|
359
|
-
"_POSIX_NAME_MAX" => 255,
|
360
|
-
"PATH_MAX" => 4096,
|
361
|
-
"_POSIX_PATH_MAX" => 4096,
|
362
|
-
"PIPE_BUF" => 4096,
|
363
|
-
"_POSIX_PIPE_BUF" => 4096,
|
364
|
-
"SOCK_MAXBUF" => nil,
|
365
|
-
"_POSIX_ASYNC_IO" => nil,
|
366
|
-
"_POSIX_CHOWN_RESTRICTED" => 1,
|
367
|
-
"_POSIX_NO_TRUNC" => 1,
|
368
|
-
"_POSIX_PRIO_IO" => nil,
|
369
|
-
"_POSIX_SYNC_IO" => nil,
|
370
|
-
"_POSIX_VDISABLE" => 0,
|
371
|
-
"ARG_MAX" => 2097152,
|
372
|
-
"ATEXIT_MAX" => 2147483647,
|
373
|
-
"CHAR_BIT" => 8,
|
374
|
-
"CHAR_MAX" => 127,
|
375
|
-
"CHAR_MIN" => -128,
|
376
|
-
"CHILD_MAX" => 63672,
|
377
|
-
"CLK_TCK" => 100,
|
378
|
-
"INT_MAX" => 2147483647,
|
379
|
-
"INT_MIN" => -2147483648,
|
380
|
-
"IOV_MAX" => 1024,
|
381
|
-
"LOGNAME_MAX" => 256,
|
382
|
-
"LONG_BIT" => 64,
|
383
|
-
"MB_LEN_MAX" => 16,
|
384
|
-
"NGROUPS_MAX" => 65536,
|
385
|
-
"NL_ARGMAX" => 4096,
|
386
|
-
"NL_LANGMAX" => 2048,
|
387
|
-
"NL_MSGMAX" => 2147483647,
|
388
|
-
"NL_NMAX" => 2147483647,
|
389
|
-
"NL_SETMAX" => 2147483647,
|
390
|
-
"NL_TEXTMAX" => 2147483647,
|
391
|
-
"NSS_BUFLEN_GROUP" => 1024,
|
392
|
-
"NSS_BUFLEN_PASSWD" => 1024,
|
393
|
-
"NZERO" => 20,
|
394
|
-
"OPEN_MAX" => 1024,
|
395
|
-
"PAGESIZE" => 4096,
|
396
|
-
"PAGE_SIZE" => 4096,
|
397
|
-
"PASS_MAX" => 8192,
|
398
|
-
"PTHREAD_DESTRUCTOR_ITERATIONS" => 4,
|
399
|
-
"PTHREAD_KEYS_MAX" => 1024,
|
400
|
-
"PTHREAD_STACK_MIN" => 16384,
|
401
|
-
"PTHREAD_THREADS_MAX" => nil,
|
402
|
-
"SCHAR_MAX" => 127,
|
403
|
-
"SCHAR_MIN" => -128,
|
404
|
-
"SHRT_MAX" => 32767,
|
405
|
-
"SHRT_MIN" => -32768,
|
406
|
-
"SSIZE_MAX" => 32767,
|
407
|
-
"TTY_NAME_MAX" => 32,
|
408
|
-
"TZNAME_MAX" => 6,
|
409
|
-
"UCHAR_MAX" => 255,
|
410
|
-
"UINT_MAX" => 4294967295,
|
411
|
-
"UIO_MAXIOV" => 1024,
|
412
|
-
"ULONG_MAX" => 18446744073709551615,
|
413
|
-
"USHRT_MAX" => 65535,
|
414
|
-
"WORD_BIT" => 32,
|
415
|
-
"_AVPHYS_PAGES" => 2101393,
|
416
|
-
"_NPROCESSORS_CONF" => 8,
|
417
|
-
"_NPROCESSORS_ONLN" => 8,
|
418
|
-
"_PHYS_PAGES" => 4096040,
|
419
|
-
"_POSIX_ARG_MAX" => 2097152,
|
420
|
-
"_POSIX_ASYNCHRONOUS_IO" => 200809,
|
421
|
-
"_POSIX_CHILD_MAX" => 63672,
|
422
|
-
"_POSIX_FSYNC" => 200809,
|
423
|
-
"_POSIX_JOB_CONTROL" => 1,
|
424
|
-
"_POSIX_MAPPED_FILES" => 200809,
|
425
|
-
"_POSIX_MEMLOCK" => 200809,
|
426
|
-
"_POSIX_MEMLOCK_RANGE" => 200809,
|
427
|
-
"_POSIX_MEMORY_PROTECTION" => 200809,
|
428
|
-
"_POSIX_MESSAGE_PASSING" => 200809,
|
429
|
-
"_POSIX_NGROUPS_MAX" => 65536,
|
430
|
-
"_POSIX_OPEN_MAX" => 1024,
|
431
|
-
"_POSIX_PII" => nil,
|
432
|
-
"_POSIX_PII_INTERNET" => nil,
|
433
|
-
"_POSIX_PII_INTERNET_DGRAM" => nil,
|
434
|
-
"_POSIX_PII_INTERNET_STREAM" => nil,
|
435
|
-
"_POSIX_PII_OSI" => nil,
|
436
|
-
"_POSIX_PII_OSI_CLTS" => nil,
|
437
|
-
"_POSIX_PII_OSI_COTS" => nil,
|
438
|
-
"_POSIX_PII_OSI_M" => nil,
|
439
|
-
"_POSIX_PII_SOCKET" => nil,
|
440
|
-
"_POSIX_PII_XTI" => nil,
|
441
|
-
"_POSIX_POLL" => nil,
|
442
|
-
"_POSIX_PRIORITIZED_IO" => 200809,
|
443
|
-
"_POSIX_PRIORITY_SCHEDULING" => 200809,
|
444
|
-
"_POSIX_REALTIME_SIGNALS" => 200809,
|
445
|
-
"_POSIX_SAVED_IDS" => 1,
|
446
|
-
"_POSIX_SELECT" => nil,
|
447
|
-
"_POSIX_SEMAPHORES" => 200809,
|
448
|
-
"_POSIX_SHARED_MEMORY_OBJECTS" => 200809,
|
449
|
-
"_POSIX_SSIZE_MAX" => 32767,
|
450
|
-
"_POSIX_STREAM_MAX" => 16,
|
451
|
-
"_POSIX_SYNCHRONIZED_IO" => 200809,
|
452
|
-
"_POSIX_THREADS" => 200809,
|
453
|
-
"_POSIX_THREAD_ATTR_STACKADDR" => 200809,
|
454
|
-
"_POSIX_THREAD_ATTR_STACKSIZE" => 200809,
|
455
|
-
"_POSIX_THREAD_PRIORITY_SCHEDULING" => 200809,
|
456
|
-
"_POSIX_THREAD_PRIO_INHERIT" => 200809,
|
457
|
-
"_POSIX_THREAD_PRIO_PROTECT" => 200809,
|
458
|
-
"_POSIX_THREAD_ROBUST_PRIO_INHERIT" => nil,
|
459
|
-
"_POSIX_THREAD_ROBUST_PRIO_PROTECT" => nil,
|
460
|
-
"_POSIX_THREAD_PROCESS_SHARED" => 200809,
|
461
|
-
"_POSIX_THREAD_SAFE_FUNCTIONS" => 200809,
|
462
|
-
"_POSIX_TIMERS" => 200809,
|
463
|
-
"TIMER_MAX" => nil,
|
464
|
-
"_POSIX_TZNAME_MAX" => 6,
|
465
|
-
"_POSIX_VERSION" => 200809,
|
466
|
-
"_T_IOV_MAX" => nil,
|
467
|
-
"_XOPEN_CRYPT" => 1,
|
468
|
-
"_XOPEN_ENH_I18N" => 1,
|
469
|
-
"_XOPEN_LEGACY" => 1,
|
470
|
-
"_XOPEN_REALTIME" => 1,
|
471
|
-
"_XOPEN_REALTIME_THREADS" => 1,
|
472
|
-
"_XOPEN_SHM" => 1,
|
473
|
-
"_XOPEN_UNIX" => 1,
|
474
|
-
"_XOPEN_VERSION" => 700,
|
475
|
-
"_XOPEN_XCU_VERSION" => 4,
|
476
|
-
"_XOPEN_XPG2" => 1,
|
477
|
-
"_XOPEN_XPG3" => 1,
|
478
|
-
"_XOPEN_XPG4" => 1,
|
479
|
-
"BC_BASE_MAX" => 99,
|
480
|
-
"BC_DIM_MAX" => 2048,
|
481
|
-
"BC_SCALE_MAX" => 99,
|
482
|
-
"BC_STRING_MAX" => 1000,
|
483
|
-
"CHARCLASS_NAME_MAX" => 2048,
|
484
|
-
"COLL_WEIGHTS_MAX" => 255,
|
485
|
-
"EQUIV_CLASS_MAX" => nil,
|
486
|
-
"EXPR_NEST_MAX" => 32,
|
487
|
-
"LINE_MAX" => 2048,
|
488
|
-
"POSIX2_BC_BASE_MAX" => 99,
|
489
|
-
"POSIX2_BC_DIM_MAX" => 2048,
|
490
|
-
"POSIX2_BC_SCALE_MAX" => 99,
|
491
|
-
"POSIX2_BC_STRING_MAX" => 1000,
|
492
|
-
"POSIX2_CHAR_TERM" => 200809,
|
493
|
-
"POSIX2_COLL_WEIGHTS_MAX" => 255,
|
494
|
-
"POSIX2_C_BIND" => 200809,
|
495
|
-
"POSIX2_C_DEV" => 200809,
|
496
|
-
"POSIX2_C_VERSION" => 200809,
|
497
|
-
"POSIX2_EXPR_NEST_MAX" => 32,
|
498
|
-
"POSIX2_FORT_DEV" => nil,
|
499
|
-
"POSIX2_FORT_RUN" => nil,
|
500
|
-
"_POSIX2_LINE_MAX" => 2048,
|
501
|
-
"POSIX2_LINE_MAX" => 2048,
|
502
|
-
"POSIX2_LOCALEDEF" => 200809,
|
503
|
-
"POSIX2_RE_DUP_MAX" => 32767,
|
504
|
-
"POSIX2_SW_DEV" => 200809,
|
505
|
-
"POSIX2_UPE" => nil,
|
506
|
-
"POSIX2_VERSION" => 200809,
|
507
|
-
"RE_DUP_MAX" => 32767,
|
508
|
-
"PATH" => "/bin:/usr/bin",
|
509
|
-
"CS_PATH" => "/bin:/usr/bin",
|
510
|
-
"LFS_CFLAGS" => nil,
|
511
|
-
"LFS_LDFLAGS" => nil,
|
512
|
-
"LFS_LIBS" => nil,
|
513
|
-
"LFS_LINTFLAGS" => nil,
|
514
|
-
"LFS64_CFLAGS" => "-D_LARGEFILE64_SOURCE",
|
515
|
-
"LFS64_LDFLAGS" => nil,
|
516
|
-
"LFS64_LIBS" => nil,
|
517
|
-
"LFS64_LINTFLAGS" => "-D_LARGEFILE64_SOURCE",
|
518
|
-
"_XBS5_WIDTH_RESTRICTED_ENVS" => "XBS5_LP64_OFF64",
|
519
|
-
"XBS5_WIDTH_RESTRICTED_ENVS" => "XBS5_LP64_OFF64",
|
520
|
-
"_XBS5_ILP32_OFF32" => nil,
|
521
|
-
"XBS5_ILP32_OFF32_CFLAGS" => nil,
|
522
|
-
"XBS5_ILP32_OFF32_LDFLAGS" => nil,
|
523
|
-
"XBS5_ILP32_OFF32_LIBS" => nil,
|
524
|
-
"XBS5_ILP32_OFF32_LINTFLAGS" => nil,
|
525
|
-
"_XBS5_ILP32_OFFBIG" => nil,
|
526
|
-
"XBS5_ILP32_OFFBIG_CFLAGS" => nil,
|
527
|
-
"XBS5_ILP32_OFFBIG_LDFLAGS" => nil,
|
528
|
-
"XBS5_ILP32_OFFBIG_LIBS" => nil,
|
529
|
-
"XBS5_ILP32_OFFBIG_LINTFLAGS" => nil,
|
530
|
-
"_XBS5_LP64_OFF64" => 1,
|
531
|
-
"XBS5_LP64_OFF64_CFLAGS" => "-m64",
|
532
|
-
"XBS5_LP64_OFF64_LDFLAGS" => "-m64",
|
533
|
-
"XBS5_LP64_OFF64_LIBS" => nil,
|
534
|
-
"XBS5_LP64_OFF64_LINTFLAGS" => nil,
|
535
|
-
"_XBS5_LPBIG_OFFBIG" => nil,
|
536
|
-
"XBS5_LPBIG_OFFBIG_CFLAGS" => nil,
|
537
|
-
"XBS5_LPBIG_OFFBIG_LDFLAGS" => nil,
|
538
|
-
"XBS5_LPBIG_OFFBIG_LIBS" => nil,
|
539
|
-
"XBS5_LPBIG_OFFBIG_LINTFLAGS" => nil,
|
540
|
-
"_POSIX_V6_ILP32_OFF32" => nil,
|
541
|
-
"POSIX_V6_ILP32_OFF32_CFLAGS" => nil,
|
542
|
-
"POSIX_V6_ILP32_OFF32_LDFLAGS" => nil,
|
543
|
-
"POSIX_V6_ILP32_OFF32_LIBS" => nil,
|
544
|
-
"POSIX_V6_ILP32_OFF32_LINTFLAGS" => nil,
|
545
|
-
"_POSIX_V6_WIDTH_RESTRICTED_ENVS" => "POSIX_V6_LP64_OFF64",
|
546
|
-
"POSIX_V6_WIDTH_RESTRICTED_ENVS" => "POSIX_V6_LP64_OFF64",
|
547
|
-
"_POSIX_V6_ILP32_OFFBIG" => nil,
|
548
|
-
"POSIX_V6_ILP32_OFFBIG_CFLAGS" => nil,
|
549
|
-
"POSIX_V6_ILP32_OFFBIG_LDFLAGS" => nil,
|
550
|
-
"POSIX_V6_ILP32_OFFBIG_LIBS" => nil,
|
551
|
-
"POSIX_V6_ILP32_OFFBIG_LINTFLAGS" => nil,
|
552
|
-
"_POSIX_V6_LP64_OFF64" => 1,
|
553
|
-
"POSIX_V6_LP64_OFF64_CFLAGS" => "-m64",
|
554
|
-
"POSIX_V6_LP64_OFF64_LDFLAGS" => "-m64",
|
555
|
-
"POSIX_V6_LP64_OFF64_LIBS" => nil,
|
556
|
-
"POSIX_V6_LP64_OFF64_LINTFLAGS" => nil,
|
557
|
-
"_POSIX_V6_LPBIG_OFFBIG" => nil,
|
558
|
-
"POSIX_V6_LPBIG_OFFBIG_CFLAGS" => nil,
|
559
|
-
"POSIX_V6_LPBIG_OFFBIG_LDFLAGS" => nil,
|
560
|
-
"POSIX_V6_LPBIG_OFFBIG_LIBS" => nil,
|
561
|
-
"POSIX_V6_LPBIG_OFFBIG_LINTFLAGS" => nil,
|
562
|
-
"_POSIX_V7_ILP32_OFF32" => nil,
|
563
|
-
"POSIX_V7_ILP32_OFF32_CFLAGS" => nil,
|
564
|
-
"POSIX_V7_ILP32_OFF32_LDFLAGS" => nil,
|
565
|
-
"POSIX_V7_ILP32_OFF32_LIBS" => nil,
|
566
|
-
"POSIX_V7_ILP32_OFF32_LINTFLAGS" => nil,
|
567
|
-
"_POSIX_V7_WIDTH_RESTRICTED_ENVS" => "POSIX_V7_LP64_OFF64",
|
568
|
-
"POSIX_V7_WIDTH_RESTRICTED_ENVS" => "POSIX_V7_LP64_OFF64",
|
569
|
-
"_POSIX_V7_ILP32_OFFBIG" => nil,
|
570
|
-
"POSIX_V7_ILP32_OFFBIG_CFLAGS" => nil,
|
571
|
-
"POSIX_V7_ILP32_OFFBIG_LDFLAGS" => nil,
|
572
|
-
"POSIX_V7_ILP32_OFFBIG_LIBS" => nil,
|
573
|
-
"POSIX_V7_ILP32_OFFBIG_LINTFLAGS" => nil,
|
574
|
-
"_POSIX_V7_LP64_OFF64" => 1,
|
575
|
-
"POSIX_V7_LP64_OFF64_CFLAGS" => "-m64",
|
576
|
-
"POSIX_V7_LP64_OFF64_LDFLAGS" => "-m64",
|
577
|
-
"POSIX_V7_LP64_OFF64_LIBS" => nil,
|
578
|
-
"POSIX_V7_LP64_OFF64_LINTFLAGS" => nil,
|
579
|
-
"_POSIX_V7_LPBIG_OFFBIG" => nil,
|
580
|
-
"POSIX_V7_LPBIG_OFFBIG_CFLAGS" => nil,
|
581
|
-
"POSIX_V7_LPBIG_OFFBIG_LDFLAGS" => nil,
|
582
|
-
"POSIX_V7_LPBIG_OFFBIG_LIBS" => nil,
|
583
|
-
"POSIX_V7_LPBIG_OFFBIG_LINTFLAGS" => nil,
|
584
|
-
"_POSIX_ADVISORY_INFO" => 200809,
|
585
|
-
"_POSIX_BARRIERS" => 200809,
|
586
|
-
"_POSIX_BASE" => nil,
|
587
|
-
"_POSIX_C_LANG_SUPPORT" => nil,
|
588
|
-
"_POSIX_C_LANG_SUPPORT_R" => nil,
|
589
|
-
"_POSIX_CLOCK_SELECTION" => 200809,
|
590
|
-
"_POSIX_CPUTIME" => 200809,
|
591
|
-
"_POSIX_THREAD_CPUTIME" => 200809,
|
592
|
-
"_POSIX_DEVICE_SPECIFIC" => nil,
|
593
|
-
"_POSIX_DEVICE_SPECIFIC_R" => nil,
|
594
|
-
"_POSIX_FD_MGMT" => nil,
|
595
|
-
"_POSIX_FIFO" => nil,
|
596
|
-
"_POSIX_PIPE" => nil,
|
597
|
-
"_POSIX_FILE_ATTRIBUTES" => nil,
|
598
|
-
"_POSIX_FILE_LOCKING" => nil,
|
599
|
-
"_POSIX_FILE_SYSTEM" => nil,
|
600
|
-
"_POSIX_MONOTONIC_CLOCK" => 200809,
|
601
|
-
"_POSIX_MULTI_PROCESS" => nil,
|
602
|
-
"_POSIX_SINGLE_PROCESS" => nil,
|
603
|
-
"_POSIX_NETWORKING" => nil,
|
604
|
-
"_POSIX_READER_WRITER_LOCKS" => 200809,
|
605
|
-
"_POSIX_SPIN_LOCKS" => 200809,
|
606
|
-
"_POSIX_REGEXP" => 1,
|
607
|
-
"_REGEX_VERSION" => nil,
|
608
|
-
"_POSIX_SHELL" => 1,
|
609
|
-
"_POSIX_SIGNALS" => nil,
|
610
|
-
"_POSIX_SPAWN" => 200809,
|
611
|
-
"_POSIX_SPORADIC_SERVER" => nil,
|
612
|
-
"_POSIX_THREAD_SPORADIC_SERVER" => nil,
|
613
|
-
"_POSIX_SYSTEM_DATABASE" => nil,
|
614
|
-
"_POSIX_SYSTEM_DATABASE_R" => nil,
|
615
|
-
"_POSIX_TIMEOUTS" => 200809,
|
616
|
-
"_POSIX_TYPED_MEMORY_OBJECTS" => nil,
|
617
|
-
"_POSIX_USER_GROUPS" => nil,
|
618
|
-
"_POSIX_USER_GROUPS_R" => nil,
|
619
|
-
"POSIX2_PBS" => nil,
|
620
|
-
"POSIX2_PBS_ACCOUNTING" => nil,
|
621
|
-
"POSIX2_PBS_LOCATE" => nil,
|
622
|
-
"POSIX2_PBS_TRACK" => nil,
|
623
|
-
"POSIX2_PBS_MESSAGE" => nil,
|
624
|
-
"SYMLOOP_MAX" => nil,
|
625
|
-
"STREAM_MAX" => 16,
|
626
|
-
"AIO_LISTIO_MAX" => nil,
|
627
|
-
"AIO_MAX" => nil,
|
628
|
-
"AIO_PRIO_DELTA_MAX" => 20,
|
629
|
-
"DELAYTIMER_MAX" => 2147483647,
|
630
|
-
"HOST_NAME_MAX" => 64,
|
631
|
-
"LOGIN_NAME_MAX" => 256,
|
632
|
-
"MQ_OPEN_MAX" => nil,
|
633
|
-
"MQ_PRIO_MAX" => 32768,
|
634
|
-
"_POSIX_DEVICE_IO" => nil,
|
635
|
-
"_POSIX_TRACE" => nil,
|
636
|
-
"_POSIX_TRACE_EVENT_FILTER" => nil,
|
637
|
-
"_POSIX_TRACE_INHERIT" => nil,
|
638
|
-
"_POSIX_TRACE_LOG" => nil,
|
639
|
-
"RTSIG_MAX" => 32,
|
640
|
-
"SEM_NSEMS_MAX" => nil,
|
641
|
-
"SEM_VALUE_MAX" => 2147483647,
|
642
|
-
"SIGQUEUE_MAX" => 63672,
|
643
|
-
"FILESIZEBITS" => 64,
|
644
|
-
"POSIX_ALLOC_SIZE_MIN" => 4096,
|
645
|
-
"POSIX_REC_INCR_XFER_SIZE" => nil,
|
646
|
-
"POSIX_REC_MAX_XFER_SIZE" => nil,
|
647
|
-
"POSIX_REC_MIN_XFER_SIZE" => 4096,
|
648
|
-
"POSIX_REC_XFER_ALIGN" => 4096,
|
649
|
-
"SYMLINK_MAX" => nil,
|
650
|
-
"GNU_LIBC_VERSION" => "glibc 2.24",
|
651
|
-
"GNU_LIBPTHREAD_VERSION" => "NPTL 2.24",
|
652
|
-
"POSIX2_SYMLINKS" => 1,
|
653
|
-
"LEVEL1_ICACHE_SIZE" => 32768,
|
654
|
-
"LEVEL1_ICACHE_ASSOC" => 8,
|
655
|
-
"LEVEL1_ICACHE_LINESIZE" => 64,
|
656
|
-
"LEVEL1_DCACHE_SIZE" => 32768,
|
657
|
-
"LEVEL1_DCACHE_ASSOC" => 8,
|
658
|
-
"LEVEL1_DCACHE_LINESIZE" => 64,
|
659
|
-
"LEVEL2_CACHE_SIZE" => 262144,
|
660
|
-
"LEVEL2_CACHE_ASSOC" => 4,
|
661
|
-
"LEVEL2_CACHE_LINESIZE" => 64,
|
662
|
-
"LEVEL3_CACHE_SIZE" => 8388608,
|
663
|
-
"LEVEL3_CACHE_ASSOC" => 16,
|
664
|
-
"LEVEL3_CACHE_LINESIZE" => 64,
|
665
|
-
"LEVEL4_CACHE_SIZE" => 0,
|
666
|
-
"LEVEL4_CACHE_ASSOC" => 0,
|
667
|
-
"LEVEL4_CACHE_LINESIZE" => 0,
|
668
|
-
"IPV6" => 200809,
|
669
|
-
"RAW_SOCKETS" => 200809,
|
670
|
-
"_POSIX_IPV6" => 200809,
|
671
|
-
"_POSIX_RAW_SOCKETS" => 200809,
|
672
|
-
})
|
673
|
-
end
|
674
|
-
|
675
|
-
it "does not populate sysconf if getconf is not found" do
|
676
|
-
allow(plugin).to receive(:which).with("getconf").and_return(false)
|
677
|
-
plugin.run
|
678
|
-
expect(plugin[:sysconf]).to be(nil)
|
679
|
-
end
|
680
|
-
end
|