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

OpTestKernelTest: Add support for automated boot bisection v2.0 #865

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abdhaleegit
Copy link
Collaborator

@abdhaleegit abdhaleegit commented Sep 24, 2024

This code is modifed and develped on top of the previous code (2f103 : OpTestKernelTest: Git bisect automation..)

With version 2.0 these are the new changes added:

  1. Added support to handle nested bisection loop, which was not working with previous code
  2. Modified code to work for end to end CI server
  3. Better handle all cases of good flow and bad flow
  4. Add json store of good boot commit for good run
  5. Fix the previous code blocker to properly manage the console thread

TODO:
Add boot json generation after bisection with bad commit
Email format for boot bug report

This code is modifed and develped on top of the previous
code (2f103 : OpTestKernelTest: Git bisect automation..)

With version 2.0 these are the new changes added:

1. Added support to handle nested bisection loop, which was not
working with previous code
2. Modified code to work for end to end CI server
3. Better handle all cases of good flow and bad flow
4. Add json store of good boot commit for good run
5. Fix the previous code blocker to properly manage the console
thread

TODO:
Add boot json generation after bisection with bad commit
Email format for boot bug report

Signed-off-by: Abdul Haleem <[email protected]>
@abdhaleegit
Copy link
Collaborator Author

bootbisectionlogs.txt

@abdhaleegit abdhaleegit self-assigned this Oct 1, 2024
@@ -109,8 +106,8 @@ def is_url(path):
log.info("Upstream kernel commit-time: %s", tcommit)
log.debug("Compile the upstream kernel")
try:
cpu= self.con.run_command("lscpu | grep '^CPU(s):' | awk '{print $2}'")
err=self.con.run_command("make -j {} -s vmlinux".format(cpu[-1]), timeout=self.host_cmd_timeout)
cpu = int(self.con.run_command("lscpu --online -e|wc -l")[-1])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please push this a utility function that can be reused in other places like example Gcov , kernel upstream build test

self.con.run_command("make modules_install")
self.con.run_command("make install")
cpu = int(self.con.run_command("lscpu --online -e|wc -l")[-1])
self.con.run_command("make -j {} -s".format(cpu), timeout=60000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us use optest command line variable as may in some system it require more time

kernel_version_output = self.con.run_command("uname -r")[-1]
log.info("Installed upstream kernel version: %s", kernel_version_output)
if kernel_version_output[-1] == base_version[-1]:
log.error("Kexec failed, booted back to base kernel !")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is failing a test, not an appropriate call here?

@@ -266,7 +271,7 @@ def runTest(self):
self.con.run_command("cd {}".format(self.home))
if not self.branch:
self.branch='master'
self.con.run_command("git clone --depth 1 -b {} {} linux".format( self.branch, self.repo),timeout=3000)
self.con.run_command("git clone -b {} {} linux".format( self.branch, self.repo),timeout=3000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets have these changes in other commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants