From 020ec91cd005724e9625d632dade5c4550a9fa6c Mon Sep 17 00:00:00 2001 From: Paco Xu Date: Tue, 6 Aug 2024 16:10:46 +0800 Subject: [PATCH] update according to kernel official active kernel releases Signed-off-by: Paco Xu --- validators/kernel_validator_test.go | 6 +++--- validators/types_unix.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/validators/kernel_validator_test.go b/validators/kernel_validator_test.go index 77f046f..f07f28f 100644 --- a/validators/kernel_validator_test.go +++ b/validators/kernel_validator_test.go @@ -31,7 +31,7 @@ func TestValidateKernelVersion(t *testing.T) { // they may be different. // This is fine, because the test mainly tests the kernel version validation logic, // not the DefaultSysSpec. The DefaultSysSpec should be tested with node e2e. - testRegex := []string{`^4\.4.*$`, `^4\.19.*$`, `^4\.[2-9][0-9].*$`, `^([5-9]|[1-9][0-9]+)\.([0-9]+)\.([0-9]+).*$`} + testRegex := []string{`^4\.19.*$`, `^4\.[2-9][0-9].*$`, `^([5-9]|[1-9][0-9]+)\.([0-9]+)\.([0-9]+).*$`} for _, test := range []struct { name string version string @@ -43,9 +43,9 @@ func TestValidateKernelVersion(t *testing.T) { err: true, }, { - name: "4.4.14+ first version regex matches", + name: "4.4.14+ no version regex matches", version: "4.4.14+", - err: false, + err: true, }, { name: "4.7.1 no version regex matches", diff --git a/validators/types_unix.go b/validators/types_unix.go index 4bf23c8..f01861c 100644 --- a/validators/types_unix.go +++ b/validators/types_unix.go @@ -28,9 +28,9 @@ import ( var DefaultSysSpec = SysSpec{ OS: "Linux", KernelSpec: KernelSpec{ - // 4.4 & 4.19 are selected as kernel Super Long Term Support (SLTS), and the Civil Infrastructure Platform will provide support until at least 2026. - Versions: []string{`^4\.4.*$`, `^4\.19.*$`, `^4\.[2-9][0-9].*$`, `^([5-9]|[1-9][0-9]+)\.([0-9]+)\.([0-9]+).*$`}, - VersionsNote: "Recommended LTS versions from the 4.x series are 4.4 and 4.19. Any 4.x version newer than 4.19 is also supported. For cgroups v2 support, the minimal version is 4.15 and the recommended version is 5.8+", + // 4.19 is active kernel Long Term Support (LTS) release in https://www.kernel.org/category/releases.html. + Versions: []string{`^4\.19.*$`, `^4\.[2-9][0-9].*$`, `^([5-9]|[1-9][0-9]+)\.([0-9]+)\.([0-9]+).*$`}, + VersionsNote: "Recommended LTS versions from the 4.x series is 4.19. Any 5.x or 6.x versions are also supported. For cgroups v2 support, the minimal version is 4.15 and the recommended version is 5.8+", // TODO(random-liu): Add more config // TODO(random-liu): Add description for each kernel configuration: Required: []KernelConfig{