[PATCH v2 lkp-tests 2/3] iso2rootfs: add step: config something of rootfs

[Why] The initial rootfs have the follow two problems: - no dns resolver; - selinux is opened; Signed-off-by: Yu Chuan <13186087857@163.com> --- tests/iso2rootfs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/iso2rootfs b/tests/iso2rootfs index 2e7bcd47ef4f..87a51acaca5f 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -338,6 +338,27 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" } + +############ config rootfs ############ +config_dns_resolver() +{ + cat <<-EOF > "${ROOTFS_DES_DIR}/etc/resolv.conf" + nameserver 114.114.114.114 + nameserver 8.8.8.8 + EOF +} + +disable_selinux() +{ + sed -i 's/^SELINUX=.*/SELINUX=disabled/g' "${ROOTFS_DES_DIR}/etc/selinux/config" +} + +config_rootfs() +{ + config_dns_resolver + disable_selinux +} + ############ test rootfs ############ get_qemu_efi_fd() { @@ -497,6 +518,8 @@ main() config_qcow2rootfs run_qcow2rootfs + config_rootfs + test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml -- 2.23.0

About subject: iso2rootfs: add some configurtion of rootfs Thanks, Shenwei On Fri, Nov 13, 2020 at 02:57:15PM +0800, Yu Chuan wrote:
[Why] The initial rootfs have the follow two problems: - no dns resolver; - selinux is opened;
Signed-off-by: Yu Chuan <13186087857@163.com> --- tests/iso2rootfs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index 2e7bcd47ef4f..87a51acaca5f 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -338,6 +338,27 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" }
+ +############ config rootfs ############ +config_dns_resolver() +{ + cat <<-EOF > "${ROOTFS_DES_DIR}/etc/resolv.conf" + nameserver 114.114.114.114 + nameserver 8.8.8.8 + EOF +} + +disable_selinux() +{ + sed -i 's/^SELINUX=.*/SELINUX=disabled/g' "${ROOTFS_DES_DIR}/etc/selinux/config" +} + +config_rootfs() +{ + config_dns_resolver + disable_selinux +} + ############ test rootfs ############ get_qemu_efi_fd() { @@ -497,6 +518,8 @@ main() config_qcow2rootfs run_qcow2rootfs
+ config_rootfs + test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
-- 2.23.0

On Fri, Nov 13, 2020 at 03:11:17PM +0800, Xiao Shenwei wrote:
About subject: iso2rootfs: add some configurtion of rootfs
nice. -------- Thanks Yu Chuan
Thanks, Shenwei
On Fri, Nov 13, 2020 at 02:57:15PM +0800, Yu Chuan wrote:
[Why] The initial rootfs have the follow two problems: - no dns resolver; - selinux is opened;
Signed-off-by: Yu Chuan <13186087857@163.com> --- tests/iso2rootfs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index 2e7bcd47ef4f..87a51acaca5f 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -338,6 +338,27 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" }
+ +############ config rootfs ############ +config_dns_resolver() +{ + cat <<-EOF > "${ROOTFS_DES_DIR}/etc/resolv.conf" + nameserver 114.114.114.114 + nameserver 8.8.8.8 + EOF +} + +disable_selinux() +{ + sed -i 's/^SELINUX=.*/SELINUX=disabled/g' "${ROOTFS_DES_DIR}/etc/selinux/config" +} + +config_rootfs() +{ + config_dns_resolver + disable_selinux +} + ############ test rootfs ############ get_qemu_efi_fd() { @@ -497,6 +518,8 @@ main() config_qcow2rootfs run_qcow2rootfs
+ config_rootfs + test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
-- 2.23.0

On Fri, Nov 13, 2020 at 02:57:15PM +0800, Yu Chuan wrote:
[Why] The initial rootfs have the follow two problems: - no dns resolver; - selinux is opened;
maybe can split 2 patchs, one patch fix one problems. Thanks, Yinsi
Signed-off-by: Yu Chuan <13186087857@163.com> --- tests/iso2rootfs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index 2e7bcd47ef4f..87a51acaca5f 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -338,6 +338,27 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" }
+ +############ config rootfs ############ +config_dns_resolver() +{ + cat <<-EOF > "${ROOTFS_DES_DIR}/etc/resolv.conf" + nameserver 114.114.114.114 + nameserver 8.8.8.8 + EOF +} + +disable_selinux() +{ + sed -i 's/^SELINUX=.*/SELINUX=disabled/g' "${ROOTFS_DES_DIR}/etc/selinux/config" +} + +config_rootfs() +{ + config_dns_resolver + disable_selinux +} + ############ test rootfs ############ get_qemu_efi_fd() { @@ -497,6 +518,8 @@ main() config_qcow2rootfs run_qcow2rootfs
+ config_rootfs + test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
-- 2.23.0

On Tue, Nov 17, 2020 at 09:55:45AM +0800, Liu Yinsi wrote:
On Fri, Nov 13, 2020 at 02:57:15PM +0800, Yu Chuan wrote:
[Why] The initial rootfs have the follow two problems: - no dns resolver; - selinux is opened;
maybe can split 2 patchs, one patch fix one problems.
then title can be 'iso2rootfs: fix...'
Thanks, Yinsi
Signed-off-by: Yu Chuan <13186087857@163.com> --- tests/iso2rootfs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index 2e7bcd47ef4f..87a51acaca5f 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -338,6 +338,27 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" }
+ +############ config rootfs ############ +config_dns_resolver() +{ + cat <<-EOF > "${ROOTFS_DES_DIR}/etc/resolv.conf" + nameserver 114.114.114.114 + nameserver 8.8.8.8 + EOF +} + +disable_selinux() +{ + sed -i 's/^SELINUX=.*/SELINUX=disabled/g' "${ROOTFS_DES_DIR}/etc/selinux/config" +} + +config_rootfs() +{ + config_dns_resolver + disable_selinux +} + ############ test rootfs ############ get_qemu_efi_fd() { @@ -497,6 +518,8 @@ main() config_qcow2rootfs run_qcow2rootfs
+ config_rootfs + test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
-- 2.23.0

On Tue, Nov 17, 2020 at 09:58:27AM +0800, Liu Yinsi wrote:
On Tue, Nov 17, 2020 at 09:55:45AM +0800, Liu Yinsi wrote:
On Fri, Nov 13, 2020 at 02:57:15PM +0800, Yu Chuan wrote:
[Why] The initial rootfs have the follow two problems: - no dns resolver; - selinux is opened;
maybe can split 2 patchs, one patch fix one problems.
then title can be 'iso2rootfs: fix...'
ok. -------- Thanks Yu Chuan
Thanks, Yinsi
Signed-off-by: Yu Chuan <13186087857@163.com> --- tests/iso2rootfs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index 2e7bcd47ef4f..87a51acaca5f 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -338,6 +338,27 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" }
+ +############ config rootfs ############ +config_dns_resolver() +{ + cat <<-EOF > "${ROOTFS_DES_DIR}/etc/resolv.conf" + nameserver 114.114.114.114 + nameserver 8.8.8.8 + EOF +} + +disable_selinux() +{ + sed -i 's/^SELINUX=.*/SELINUX=disabled/g' "${ROOTFS_DES_DIR}/etc/selinux/config" +} + +config_rootfs() +{ + config_dns_resolver + disable_selinux +} + ############ test rootfs ############ get_qemu_efi_fd() { @@ -497,6 +518,8 @@ main() config_qcow2rootfs run_qcow2rootfs
+ config_rootfs + test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
-- 2.23.0
participants (3)
-
Liu Yinsi
-
Xiao Shenwei
-
Yu Chuan