Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

T11616 bisection report with logs#99

Merged
gctucker merged 4 commits intokernelci:masterfrom
gctucker:T11616-bisection-report-with-logs
Dec 14, 2018
Merged

T11616 bisection report with logs#99
gctucker merged 4 commits intokernelci:masterfrom
gctucker:T11616-bisection-report-with-logs

Conversation

@gctucker
Copy link
Copy Markdown
Collaborator

Improve bisection email reports with direct links to the test logs and adjusted information to make it clearer what triggered the bisection and what the result was.

Pass the full email options dictionary to get the subject string and
use it as-is in the bisection email body.  This shows aligns it with
the build and boot reports, and also the subject has all the needed
information (kernel revision, test plan, platform...).

Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Add the CPU architecture to the bisection report.  This is especially
useful for platforms which have multiple possible architectures such
as QEMU.

Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Get the actual test suite name from the bisection meta-data rather
than hard-coding it as "boot".

Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
With the recently added support for bisection on linux-next and based
on feedback with reports sent so far, tweak the information shown to
make it easier to find the details about the failure that triggered
the bisection and what the result was.

The "good" information is not that helpful and sometimes misleading as
when bisecting trees like linux-next, a different "good" merge-base is
found to start the bisection.  So the details about the "good" known
commit are removed, the biseciton log at the bottom of the report will
still show which commit was used to start the actual bisection.

* add direct links to the test (boot) logs on storage.kernelci.org

* replace good/bad details links with direct link to the "bad" boot on
  the frontend

* replace good/bad revision numbers with just "start" which is the bad
  commit that triggered the bisection

Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
@gctucker
Copy link
Copy Markdown
Collaborator Author

Here's a sample report from a locally run bisection:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This automated bisection report was sent to you on the basis  *
* that you may be involved with the breaking commit it has      *
* found.  No manual investigation has been done to verify it,   *
* and the root cause of the problem may be somewhere else.      *
* Hope this helps!                                              *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

gtucker/kernelci-bisect boot bisection: kernelci-bisect-snapshot-022 on qemu #1113-staging

Summary:
  Start:      3faf0b7905f6 NOISE Special cases aren't special enough...
  Details:    http://192.168.122.1:5000/boot/id/5c10e893a9bdfab90478be15
  Plain log:  http://192.168.122.1:5002/gtucker/kernelci-bisect/kernelci-bisect-snapshot-022/arm64/defconfig/gtucker-lava-testing/boot-qemu.txt
  HTML log:   http://192.168.122.1:5002/gtucker/kernelci-bisect/kernelci-bisect-snapshot-022/arm64/defconfig/gtucker-lava-testing/boot-qemu.html
  Result:     060fb197f7f7 BREAK panic on QEMU

Checks:
  revert:     PASS
  verify:     PASS

Parameters:
  Tree:       gtucker
  URL:        https://gitlab.collabora.com/gtucker/linux.git
  Branch:     kernelci-bisect
  Target:     qemu
  CPU arch:   arm64
  Lab:        gtucker-lava-testing
  Config:     defconfig
  Test suite: boot

Breaking commit found:

-------------------------------------------------------------------------------
commit 060fb197f7f7dccfe79dd412ac12388cb90c6fd9
Author: Guillaume Tucker <guillaume.tucker@collabora.com>
Date:   Tue Nov 20 13:02:32 2018 +0000

    BREAK panic on QEMU
    
    Cause a panic on purpose on QEMU when trying to boot with an
    initramfs.
    
    Tested-by: Bob Tester <guillaume.tucker@gmail.com>
    Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.co.uk>
    Reviewed-by: Some Reviewer <gtucker@collabora.com>
    Link: https://gtucker.io/
    Fixes: 1234567abcdef ("this isn't a real commit")

diff --git a/init/initramfs.c b/init/initramfs.c
index 8b68d44ef087..ace5d614b01b 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -10,6 +10,9 @@
 #include <linux/syscalls.h>
 #include <linux/utime.h>
 #include <linux/file.h>
+#if 1
+#include <linux/of_fdt.h>
+#endif
 
 static ssize_t __init xwrite(int fd, const char *p, size_t count)
 {
@@ -612,6 +615,16 @@ static int __init populate_rootfs(void)
 	printk(KERN_EMERG "Flat is better than nested.\n");
 	printk(KERN_EMERG "What a TERRIBLE message.\n");
 #endif
+
+#if 1
+	{
+		const char *name = of_flat_dt_get_machine_name();
+		if (!strcmp(name, "linux,dummy-virt"))
+			panic("THIS MUST FAIL ON QEMU");
+	}
+
+#endif
+
 	/* If available load the bootloader supplied initrd */
 	if (initrd_start && !IS_ENABLED(CONFIG_INITRAMFS_FORCE)) {
 #ifdef CONFIG_BLK_DEV_RAM
-------------------------------------------------------------------------------


Git bisection log:

-------------------------------------------------------------------------------
git bisect start
# good: [2e6e902d185027f8e3cb8b7305238f7e35d6a436] Linux 4.20-rc4
git bisect good 2e6e902d185027f8e3cb8b7305238f7e35d6a436
# bad: [3faf0b7905f6a1e4b12b89c8e5bac65f715ec69d] NOISE Special cases aren't special enough...
git bisect bad 3faf0b7905f6a1e4b12b89c8e5bac65f715ec69d
# good: [e62588871121d6ca3c4b1384fe0bd6dfeae13ab6] NOISE Complex is better than complicated
git bisect good e62588871121d6ca3c4b1384fe0bd6dfeae13ab6
# bad: [060fb197f7f7dccfe79dd412ac12388cb90c6fd9] BREAK panic on QEMU
git bisect bad 060fb197f7f7dccfe79dd412ac12388cb90c6fd9
# good: [69d4718fd51a1362cc44b1c99b9b20d876c17614] BREAK What a TERRIBLE message
git bisect good 69d4718fd51a1362cc44b1c99b9b20d876c17614
# good: [935217c4fda1217d025377a88154316f0b13a29a] BREAK vivid: make VIDIOC_ENUMAUDIO fail on purpose
git bisect good 935217c4fda1217d025377a88154316f0b13a29a
# first bad commit: [060fb197f7f7dccfe79dd412ac12388cb90c6fd9] BREAK panic on QEMU
-------------------------------------------------------------------------------

I'm not 100% happy with the "start" and "detail" names, but I think the information they're pointing at is what is needed in the report. The issue with bisections is that there are 2 bad commits: the one that started the bisection and the one that was found by the bisection. Maybe I should just put something like "Bad revision that started the bisection: " and "Breaking change found by the bisection: ".

@broonie
Copy link
Copy Markdown
Member

broonie commented Dec 12, 2018

It does now say it's a boot bisection which helps a lot. For start how about "Good commit" or something, mirroring the terminology used in the bisect command line UI?

@gctucker
Copy link
Copy Markdown
Collaborator Author

The "start" is actually the bad commit that caused a regression, I'm not showing the good commit any more. It removes a source of confusion especially with bisections on linux-next which take another good commit as a base (from mainline/master).

@gctucker
Copy link
Copy Markdown
Collaborator Author

Tested OK on staging. Merging now as it's already some improvement, will do another round next week to clarify further the distinction between the initial bad commit that triggered the bisection and the bad commit found by the bisection.

@gctucker gctucker merged commit dfaf0aa into kernelci:master Dec 14, 2018
@gctucker gctucker deleted the T11616-bisection-report-with-logs branch December 14, 2018 12:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants