Add test for Alibaba Cloud Linux
Weisson authored 2 years ago
Richard W.M. Jones committed 2 years ago
33 | 33 | |
34 | 34 | dnl List of tests. |
35 | 35 | tests="\ |
36 | alibaba-cloud-x86 \ | |
36 | 37 | aws-baremetal-x86 \ |
37 | 38 | aws-kvm-arm \ |
38 | 39 | aws-kvm-x86 \ |
78 | 79 | AC_CONFIG_FILES([virt-what],[chmod +x virt-what]) |
79 | 80 | AC_CONFIG_FILES([Makefile |
80 | 81 | tests/Makefile |
82 | tests/alibaba-cloud-x86/Makefile | |
81 | 83 | tests/aws-baremetal-x86/Makefile |
82 | 84 | tests/aws-kvm-arm/Makefile |
83 | 85 | tests/aws-kvm-x86/Makefile |
0 | # Makefile for virt-what | |
1 | # Copyright (C) 2008-2011 Red Hat Inc. | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
16 | ||
17 | CLEANFILES = *~ | |
18 | ||
19 | TESTS = test.sh | |
20 | ||
21 | EXTRA_DIST = \ | |
22 | test.sh \ | |
23 | proc/cpuinfo \ | |
24 | proc/self/status \ | |
25 | sbin/dmidecode \ | |
26 | sbin/virt-what-cpuid-helper |
0 | processor : 0 | |
1 | vendor_id : GenuineIntel | |
2 | cpu family : 6 | |
3 | model : 85 | |
4 | model name : Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz | |
5 | stepping : 7 | |
6 | microcode : 0x1 | |
7 | cpu MHz : 2500.002 | |
8 | cache size : 36608 KB | |
9 | physical id : 0 | |
10 | siblings : 2 | |
11 | core id : 0 | |
12 | cpu cores : 1 | |
13 | apicid : 0 | |
14 | initial apicid : 0 | |
15 | fpu : yes | |
16 | fpu_exception : yes | |
17 | cpuid level : 22 | |
18 | wp : yes | |
19 | flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512_vnni | |
20 | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit | |
21 | bogomips : 5000.00 | |
22 | clflush size : 64 | |
23 | cache_alignment : 64 | |
24 | address sizes : 46 bits physical, 48 bits virtual | |
25 | power management: | |
26 | ||
27 | processor : 1 | |
28 | vendor_id : GenuineIntel | |
29 | cpu family : 6 | |
30 | model : 85 | |
31 | model name : Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz | |
32 | stepping : 7 | |
33 | microcode : 0x1 | |
34 | cpu MHz : 2500.002 | |
35 | cache size : 36608 KB | |
36 | physical id : 0 | |
37 | siblings : 2 | |
38 | core id : 0 | |
39 | cpu cores : 1 | |
40 | apicid : 1 | |
41 | initial apicid : 1 | |
42 | fpu : yes | |
43 | fpu_exception : yes | |
44 | cpuid level : 22 | |
45 | wp : yes | |
46 | flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512_vnni | |
47 | bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit | |
48 | bogomips : 5000.00 | |
49 | clflush size : 64 | |
50 | cache_alignment : 64 | |
51 | address sizes : 46 bits physical, 48 bits virtual | |
52 | power management:⏎ |
0 | Name: cat | |
1 | Umask: 0022 | |
2 | State: R (running) | |
3 | Tgid: 25933 | |
4 | Ngid: 0 | |
5 | Pid: 25933 | |
6 | PPid: 25932 | |
7 | TracerPid: 0 | |
8 | Uid: 0 0 0 0 | |
9 | Gid: 0 0 0 0 | |
10 | FDSize: 64 | |
11 | Groups: 0 | |
12 | NStgid: 25933 | |
13 | NSpid: 25933 | |
14 | NSpgid: 25932 | |
15 | NSsid: 25039 | |
16 | VmPeak: 108084 kB | |
17 | VmSize: 108084 kB | |
18 | VmLck: 0 kB | |
19 | VmPin: 0 kB | |
20 | VmHWM: 748 kB | |
21 | VmRSS: 748 kB | |
22 | RssAnon: 76 kB | |
23 | RssFile: 672 kB | |
24 | RssShmem: 0 kB | |
25 | VmData: 188 kB | |
26 | VmStk: 132 kB | |
27 | VmExe: 44 kB | |
28 | VmLib: 1952 kB | |
29 | VmPTE: 68 kB | |
30 | VmSwap: 0 kB | |
31 | HugetlbPages: 0 kB | |
32 | CoreDumping: 0 | |
33 | Threads: 1 | |
34 | SigQ: 0/30350 | |
35 | SigPnd: 0000000000000000 | |
36 | ShdPnd: 0000000000000000 | |
37 | SigBlk: 0000000000000000 | |
38 | SigIgn: 0000000000000000 | |
39 | SigCgt: 0000000000000000 | |
40 | CapInh: 0000000000000000 | |
41 | CapPrm: 0000003fffffffff | |
42 | CapEff: 0000003fffffffff | |
43 | CapBnd: 0000003fffffffff | |
44 | CapAmb: 0000000000000000 | |
45 | NoNewPrivs: 0 | |
46 | Seccomp: 0 | |
47 | Speculation_Store_Bypass: vulnerable | |
48 | Cpus_allowed: 3 | |
49 | Cpus_allowed_list: 0-1 | |
50 | Mems_allowed: 00000000,00000001 | |
51 | Mems_allowed_list: 0 | |
52 | voluntary_ctxt_switches: 0 | |
53 | nonvoluntary_ctxt_switches: 2 |
0 | #!/bin/sh - | |
1 | cat <<'EOF' | |
2 | # dmidecode 3.2 | |
3 | Getting SMBIOS data from sysfs. | |
4 | SMBIOS 2.8 present. | |
5 | 10 structures occupying 462 bytes. | |
6 | Table at 0x000F5840. | |
7 | ||
8 | Handle 0x0000, DMI type 0, 24 bytes | |
9 | BIOS Information | |
10 | Vendor: SeaBIOS | |
11 | Version: 8c24b4c | |
12 | Release Date: 04/01/2014 | |
13 | Address: 0xE8000 | |
14 | Runtime Size: 96 kB | |
15 | ROM Size: 64 kB | |
16 | Characteristics: | |
17 | BIOS characteristics not supported | |
18 | Targeted content distribution is supported | |
19 | BIOS Revision: 0.0 | |
20 | ||
21 | Handle 0x0100, DMI type 1, 27 bytes | |
22 | System Information | |
23 | Manufacturer: Alibaba Cloud | |
24 | Product Name: Alibaba Cloud ECS | |
25 | Version: pc-i440fx-2.1 | |
26 | Serial Number: 20fb1c97-feb0-4c45-b8b9-bb06feeba0b5 | |
27 | UUID: 20fb1c97-feb0-4c45-b8b9-bb06feeba0b5 | |
28 | Wake-up Type: Power Switch | |
29 | SKU Number: Not Specified | |
30 | Family: Not Specified | |
31 | ||
32 | Handle 0x0300, DMI type 3, 21 bytes | |
33 | Chassis Information | |
34 | Manufacturer: Alibaba Cloud | |
35 | Type: Other | |
36 | Lock: Not Present | |
37 | Version: pc-i440fx-2.1 | |
38 | Serial Number: Not Specified | |
39 | Asset Tag: Not Specified | |
40 | Boot-up State: Safe | |
41 | Power Supply State: Safe | |
42 | Thermal State: Safe | |
43 | Security Status: Unknown | |
44 | OEM Information: 0x00000000 | |
45 | Height: Unspecified | |
46 | Number Of Power Cords: Unspecified | |
47 | Contained Elements: 0 | |
48 | ||
49 | Handle 0x0400, DMI type 4, 42 bytes | |
50 | Processor Information | |
51 | Socket Designation: CPU 0 | |
52 | Type: Central Processor | |
53 | Family: Other | |
54 | Manufacturer: Alibaba Cloud | |
55 | ID: 57 06 05 00 FF FB 8B 0F | |
56 | Version: pc-i440fx-2.1 | |
57 | Voltage: Unknown | |
58 | External Clock: Unknown | |
59 | Max Speed: Unknown | |
60 | Current Speed: Unknown | |
61 | Status: Populated, Enabled | |
62 | Upgrade: Other | |
63 | L1 Cache Handle: Not Provided | |
64 | L2 Cache Handle: Not Provided | |
65 | L3 Cache Handle: Not Provided | |
66 | Serial Number: Not Specified | |
67 | Asset Tag: Not Specified | |
68 | Part Number: Not Specified | |
69 | Core Count: 1 | |
70 | Core Enabled: 1 | |
71 | Thread Count: 2 | |
72 | Characteristics: None | |
73 | ||
74 | Handle 0x1000, DMI type 16, 23 bytes | |
75 | Physical Memory Array | |
76 | Location: Other | |
77 | Use: System Memory | |
78 | Error Correction Type: Multi-bit ECC | |
79 | Maximum Capacity: 8 GB | |
80 | Error Information Handle: Not Provided | |
81 | Number Of Devices: 1 | |
82 | ||
83 | Handle 0x1100, DMI type 17, 40 bytes | |
84 | Memory Device | |
85 | Array Handle: 0x1000 | |
86 | Error Information Handle: Not Provided | |
87 | Total Width: Unknown | |
88 | Data Width: Unknown | |
89 | Size: 8192 MB | |
90 | Form Factor: DIMM | |
91 | Set: None | |
92 | Locator: DIMM 0 | |
93 | Bank Locator: Not Specified | |
94 | Type: RAM | |
95 | Type Detail: Other | |
96 | Speed: Unknown | |
97 | Manufacturer: Alibaba Cloud | |
98 | Serial Number: Not Specified | |
99 | Asset Tag: Not Specified | |
100 | Part Number: Not Specified | |
101 | Rank: Unknown | |
102 | Configured Memory Speed: Unknown | |
103 | Minimum Voltage: Unknown | |
104 | Maximum Voltage: Unknown | |
105 | Configured Voltage: Unknown | |
106 | ||
107 | Handle 0x1300, DMI type 19, 31 bytes | |
108 | Memory Array Mapped Address | |
109 | Starting Address: 0x00000000000 | |
110 | Ending Address: 0x000BFFFFFFF | |
111 | Range Size: 3 GB | |
112 | Physical Array Handle: 0x1000 | |
113 | Partition Width: 1 | |
114 | ||
115 | Handle 0x1301, DMI type 19, 31 bytes | |
116 | Memory Array Mapped Address | |
117 | Starting Address: 0x00100000000 | |
118 | Ending Address: 0x0023FFFFFFF | |
119 | Range Size: 5 GB | |
120 | Physical Array Handle: 0x1000 | |
121 | Partition Width: 1 | |
122 | ||
123 | Handle 0x2000, DMI type 32, 11 bytes | |
124 | System Boot Information | |
125 | Status: No errors detected | |
126 | ||
127 | Handle 0x7F00, DMI type 127, 4 bytes | |
128 | End Of Table | |
129 | ||
130 | EOF |
0 | # Test for Alibaba Cloud | |
1 | # Copyright (C) 2018 Red Hat Inc. | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
16 | ||
17 | output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)" | |
18 | expected="alibaba_cloud | |
19 | kvm" | |
20 | ||
21 | if [ "$output" != "$expected" ]; then | |
22 | echo "$0: test failed because output did not match expected" | |
23 | echo "Expected output was:" | |
24 | echo "----------------------------------------" | |
25 | echo "$expected" | |
26 | echo "----------------------------------------" | |
27 | echo "But the actual output of the program was:" | |
28 | echo "----------------------------------------" | |
29 | echo "$output" | |
30 | echo "----------------------------------------" | |
31 | exit 1 | |
32 | fi |