-
Notifications
You must be signed in to change notification settings - Fork 85
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
base: master
Are you sure you want to change the base?
Conversation
5ba846f
to
32b4cbb
Compare
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 <abdhalee@linux.vnet.ibm.com>
32b4cbb
to
75ab46b
Compare
@@ -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]) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 !") |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
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:
TODO:
Add boot json generation after bisection with bad commit
Email format for boot bug report