Merge pull request #2908 from cji/cji-kconftest

Extend kernel config test
This commit is contained in:
Justin Cormack 2018-02-08 16:56:21 +00:00 committed by GitHub
commit 957d0a100e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 5 deletions

View File

@ -6,7 +6,7 @@ init:
- linuxkit/runc:52ecfdef1ae051e7fd5ac5f1d0b7dd859adff015
onboot:
- name: check-kernel-config
image: linuxkit/test-kernel-config:80bb1cd57205e47b5976f7fa4fb036384d012a1d
image: linuxkit/test-kernel-config:f658811da20f069f71a863ba9469b4a2ae8910e1
- name: poweroff
image: linuxkit/poweroff:f9a0a5e52fd2a97908bda33db2afffafe4a6a67d
command: ["/bin/sh", "/poweroff.sh", "3"]

View File

@ -6,7 +6,7 @@ init:
- linuxkit/runc:52ecfdef1ae051e7fd5ac5f1d0b7dd859adff015
onboot:
- name: check-kernel-config
image: linuxkit/test-kernel-config:80bb1cd57205e47b5976f7fa4fb036384d012a1d
image: linuxkit/test-kernel-config:f658811da20f069f71a863ba9469b4a2ae8910e1
- name: poweroff
image: linuxkit/poweroff:f9a0a5e52fd2a97908bda33db2afffafe4a6a67d
command: ["/bin/sh", "/poweroff.sh", "3"]

View File

@ -6,7 +6,7 @@ init:
- linuxkit/runc:52ecfdef1ae051e7fd5ac5f1d0b7dd859adff015
onboot:
- name: check-kernel-config
image: linuxkit/test-kernel-config:80bb1cd57205e47b5976f7fa4fb036384d012a1d
image: linuxkit/test-kernel-config:f658811da20f069f71a863ba9469b4a2ae8910e1
- name: poweroff
image: linuxkit/poweroff:f9a0a5e52fd2a97908bda33db2afffafe4a6a67d
command: ["/bin/sh", "/poweroff.sh", "3"]

View File

@ -6,7 +6,7 @@ init:
- linuxkit/runc:52ecfdef1ae051e7fd5ac5f1d0b7dd859adff015
onboot:
- name: check-kernel-config
image: linuxkit/test-kernel-config:80bb1cd57205e47b5976f7fa4fb036384d012a1d
image: linuxkit/test-kernel-config:f658811da20f069f71a863ba9469b4a2ae8910e1
- name: poweroff
image: linuxkit/poweroff:f9a0a5e52fd2a97908bda33db2afffafe4a6a67d
command: ["/bin/sh", "/poweroff.sh", "3"]

View File

@ -12,7 +12,7 @@ onboot:
image: linuxkit/dhcpcd:v0.2
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: check-kernel-config
image: linuxkit/test-kernel-config:80bb1cd57205e47b5976f7fa4fb036384d012a1d
image: linuxkit/test-kernel-config:f658811da20f069f71a863ba9469b4a2ae8910e1
- name: poweroff
image: linuxkit/poweroff:f9a0a5e52fd2a97908bda33db2afffafe4a6a67d
command: ["/bin/sh", "/poweroff.sh", "3"]

View File

@ -41,6 +41,11 @@ echo $UNZIPPED_CONFIG | grep -q CONFIG_PANIC_ON_OOPS=y || fail "CONFIG_PANIC_ON_
echo $UNZIPPED_CONFIG | grep -q CONFIG_SYN_COOKIES=y || fail "CONFIG_SYN_COOKIES=y"
echo $UNZIPPED_CONFIG | grep -q CONFIG_LEGACY_VSYSCALL_NONE=y || fail "CONFIG_LEGACY_VSYSCALL_NONE=y"
echo $UNZIPPED_CONFIG | grep -q CONFIG_RANDOMIZE_BASE=y || fail "CONFIG_RANDOMIZE_BASE=y"
echo $UNZIPPED_CONFIG | grep -q CONFIG_PAGE_TABLE_ISOLATION=y || fail "CONFIG_PAGE_TABLE_ISOLATION=y"
echo $UNZIPPED_CONFIG | grep -q CONFIG_RETPOLINE=y || fail "CONFIG_RETPOLINE=y"
echo $UNZIPPED_CONFIG | grep -q CONFIG_GENERIC_CPU_VULNERABILITIES=y || fail "CONFIG_GENERIC_CPU_VULNERABILITIES=y"
echo $UNZIPPED_CONFIG | grep -q CONFIG_BPF_JIT_ALWAYS_ON=y || fail "CONFIG_BPF_JIT_ALWAYS_ON=y"
# Conditional on kernel version
if [ "$kernelMajor" -ge 4 -a "$kernelMinor" -ge 5 ]; then
@ -86,6 +91,7 @@ echo $UNZIPPED_CONFIG | grep -q 'CONFIG_HIBERNATION is not set' || fail "CONFIG_
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_LEGACY_PTYS is not set' || fail "CONFIG_LEGACY_PTYS is not set"
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_X86_X32 is not set' || fail "CONFIG_X86_X32 is not set"
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_MODIFY_LDT_SYSCALL is not set' || fail "CONFIG_MODIFY_LDT_SYSCALL is not set"
echo $UNZIPPED_CONFIG | grep -q 'CONFIG_SCSI_PROC_FS is not set' || fail "CONFIG_SCSI_PROC_FS is not set"
# modprobe
for mod in \