Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加qemu_test功能,对os-basic样例脚本的更改 #10

Merged
merged 35 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d8d93e5
Add files via upload
KotorinMinami Sep 10, 2022
539afce
Merge branch 'brsf11:riscv' into riscv
KotorinMinami Sep 11, 2022
7314c71
Merge branch 'brsf11:riscv' into riscv
KotorinMinami Sep 16, 2022
2f67fcb
Merge branch 'brsf11:riscv' into riscv
KotorinMinami Sep 23, 2022
6bfb6c3
Merge branch 'brsf11:riscv' into riscv
KotorinMinami Oct 7, 2022
68c58b5
Add files via upload
KotorinMinami Oct 7, 2022
f6bcea1
Add files via upload
KotorinMinami Oct 11, 2022
7a5010f
Update mugen_riscv_dbg.py
KotorinMinami Oct 11, 2022
a26ff65
Add files via upload
KotorinMinami Oct 12, 2022
83bc306
Update mugen_riscv_dbg.py
KotorinMinami Oct 12, 2022
7dcb23d
Delete mugen_riscv_dbg.py
KotorinMinami Oct 12, 2022
464fed5
Delete picked.list
KotorinMinami Oct 12, 2022
548387b
Delete list_re
KotorinMinami Oct 12, 2022
e51760e
Add files via upload
KotorinMinami Oct 12, 2022
e2577cc
Add files via upload
KotorinMinami Oct 12, 2022
1373176
Merge branch 'brsf11:riscv' into riscv
KotorinMinami Oct 17, 2022
e7f72bf
Add files via upload
KotorinMinami Oct 20, 2022
0378d84
Delete oe_test_kernel_module_operation.sh
KotorinMinami Oct 20, 2022
3784fa3
Add files via upload
KotorinMinami Oct 20, 2022
a4600e2
Add files via upload
KotorinMinami Oct 20, 2022
c2892df
Add files via upload
KotorinMinami Oct 20, 2022
4cb031f
Update qemu_test.py
KotorinMinami Oct 21, 2022
a004121
Update os-basic-riscv.json
KotorinMinami Oct 21, 2022
8347a10
Update os-basic-riscv.json
KotorinMinami Oct 21, 2022
7fdf42a
Update os-basic-riscv.json
KotorinMinami Oct 21, 2022
343395a
Merge branch 'brsf11:riscv' into riscv
KotorinMinami Oct 29, 2022
c25a192
update the rsyslog testsuite
KotorinMinami Oct 29, 2022
77a9e9f
Merge branch 'riscv' of https://github.com/KotorinMinami/mugen-riscv …
KotorinMinami Oct 29, 2022
fb3efb3
Merge branch 'riscv' of https://github.com/KotorinMinami/mugen-riscv …
KotorinMinami Nov 4, 2022
765f91b
add some testcases and modified qemu_test.py
KotorinMinami Nov 9, 2022
d4ffad1
Merge branch 'riscv' of https://github.com/KotorinMinami/mugen-riscv …
KotorinMinami Dec 14, 2022
e357d28
add qemu_test multiMachine , multiNic and some fix
KotorinMinami Dec 29, 2022
5b5e821
Delete os-fake.json
KotorinMinami Dec 29, 2022
f8f6e8a
Update qemu_test.py
KotorinMinami Dec 29, 2022
102fce3
Merge branch 'brsf11:riscv' into riscv
KotorinMinami Jan 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dep_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ usage() {
}

common_dep(){
yum install expect psmisc make iputils python3-six python3-paramiko -y
yum install expect psmisc make iputils python3-six python3-paramiko lshw -y
}

anolis_dep(){
Expand Down
4 changes: 2 additions & 2 deletions libs/locallibs/write_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def write_conf(ip, password, port=22, user="root", run_remote=False, copy_all=Tr
else:
ENV_DATA = {"NODE": []}

if subprocess.getstatusoutput("ip a | grep " + ip)[0] == 0:
if subprocess.getstatusoutput("ip a | grep " + ip+'/')[0] == 0:
NODE_DATA["LOCALTION"] = "local"
elif run_remote:
NODE_DATA["LOCALTION"] = "local"
Expand Down Expand Up @@ -117,7 +117,7 @@ def write_conf(ip, password, port=22, user="root", run_remote=False, copy_all=Tr
NODE_DATA["FRAME"] = stdout.read().decode("utf-8").strip("\n")

stdin, stdout, stderr = ssh.exec_command(
" ip route | grep " + ip + " | awk '{print $3}' | sort -u"
" ip route | grep " + ip + " | awk '{print $3}' |grep -v "+ ip +"| sort -u"
)
NODE_DATA["NIC"] = stdout.read().decode("utf-8").strip("\n")

Expand Down
341 changes: 285 additions & 56 deletions qemu_test.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function run_test() {
LOG_INFO "Start to run test."
cat /etc/passwd |awk -F ':' '{print $1}' |grep root
CHECK_RESULT $? 0 0 "check root result fail"
cat /proc/cpuinfo |awk '{print$1}'|grep cpuid
cat /proc/cpuinfo |awk '{print$1}'|grep -E "cpuid|processor"
CHECK_RESULT $? 0 0 "check cpuid result fail"
awk --help | grep "Usage: awk"
CHECK_RESULT $? 0 0 "check Tail's help manual fail"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
source ${OET_PATH}/libs/locallibs/common_lib.sh
function pre_test() {
LOG_INFO "Start to pre the test env"
DNF_INSTALL dmidecode
DNF_INSTALL "dmidecode csh lshw"
LOG_INFO "End to pre the test env"
}
function run_test() {
Expand All @@ -36,7 +36,7 @@ function run_test() {
CHECK_RESULT $?
su testuser -c "echo $SHELL" | grep "/bin/csh"
CHECK_RESULT $? 0 1
sudo lshw -c network | grep "network"
sudo lshw -c network | grep -E "network|virtio"
CHECK_RESULT $?
LOG_INFO "End to run test."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ function config_params() {
LOG_INFO "Start to config params of the case."
check_free_disk
old_scheduler=$(awk -F '[' '{print$2}' /sys/block/"${local_disk}"/queue/scheduler | awk -F ']' '{print$1}')
echo bfq >/sys/block/"${local_disk}"/queue/scheduler
test_scheduler=$(awk '{print$2}' /sys/block/"${local_disk}"/queue/scheduler)
echo "$test_scheduler" >/sys/block/"${local_disk}"/queue/scheduler
LOG_INFO "End to config params of the case."
}

function run_test() {
LOG_INFO "Start to run test."
awk -F '[' '{print$2}' /sys/block/"${local_disk}"/queue/scheduler | awk -F ']' '{print$1}' | grep bfq
awk -F '[' '{print$2}' /sys/block/"${local_disk}"/queue/scheduler | awk -F ']' '{print$1}' | grep "$test_scheduler"
CHECK_RESULT $?
LOG_INFO "End to run test."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ done" >testcgroup.sh
sh testcgroup.sh &
pid=$(pgrep -f "sh testcgroup.sh")
mkdir /sys/fs/cgroup/memory/example
LOG_INFO "Start to pre test."
LOG_INFO "End to pre test."
}

function run_test() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
# ############################################

source ${OET_PATH}/libs/locallibs/common_lib.sh
function pre_test() {
LOG_INFO "Start to pre test."
DNF_INSTALL kexec-tools
LOG_INFO "End to pre test."
}

function run_test() {
LOG_INFO "Start executing testcase."
rpm -q kexec-tools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ function run_test() {
CHECK_RESULT $?
ps -eo 'pmem,pid,comm,args' | sort -rk1 | sed -n 1p | awk -F " " {'print$1'} | grep "%MEM"
CHECK_RESULT $?
grep '\[mq-deadline\] kyber bfq none' /sys/block/vda/queue/scheduler
grep '\[mq-deadline\]' /sys/block/vda/queue/scheduler
CHECK_RESULT $?
grep 'none' /sys/block/vda/queue/scheduler
CHECK_RESULT $?
grep -E 'kyber|bfq' /sys/block/vda/queue/scheduler
CHECK_RESULT $?
LOG_INFO "End to run test."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function run_test() {
who -b | grep "system boot"
CHECK_RESULT $?

who -s | grep pts
who -s | grep -E "pts|ttyS"
CHECK_RESULT $?

who --help | grep "Usage"
Expand Down