util: update unit testing for deep flatten

updated unit testing for the kernel check
for deep flatten feature for both supported
upstream kernel version (5.1.0+) and RHEL
8.2 backport

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-07-06 16:56:51 +05:30 committed by mergify[bot]
parent 969b032f1c
commit 82080dcfa9

View File

@ -272,8 +272,9 @@ func TestCheckKernelSupport(t *testing.T) {
} }
supportsDeepFlatten := []string{ supportsDeepFlatten := []string{
"5.2.0", "5.1.0", // 5.1+ supports deep-flatten
"5.3.0", "5.3.0",
"4.18.0-193.9.1.el8_2.x86_64", // RHEL 8.2 kernel
} }
noDeepFlatten := []string{ noDeepFlatten := []string{
@ -284,7 +285,8 @@ func TestCheckKernelSupport(t *testing.T) {
} }
deepFlattenSupport := []KernelVersion{ deepFlattenSupport := []KernelVersion{
{5, 2, 0, 0, "", false}, // standard 5.2+ versions {5, 1, 0, 0, "", false}, // standard 5.1+ versions
{4, 18, 0, 193, ".el8", true}, // RHEL 8.2 backport
} }
for _, kernel := range supportsDeepFlatten { for _, kernel := range supportsDeepFlatten {
ok := CheckKernelSupport(kernel, deepFlattenSupport) ok := CheckKernelSupport(kernel, deepFlattenSupport)