It is useful to see WARN_ON/bt_dev_err messages when running the tests.
Enable non-quiet printk levels after boot, so that it is on by default
and doesn't need to be handled in local test scripts.
---
Notes:
It could be useful to also check for BUG/WARNING in the bluez test bot.
tools/test-runner.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/test-runner.c b/tools/test-runner.c
index d74bb1087..288901a61 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -136,6 +136,20 @@ static const char *config_table[] = {
NULL
};
+static void enable_printk(void)
+{
+ FILE *f;
+
+ /* Set non-quiet printk level */
+ f = fopen("/proc/sys/kernel/printk", "w");
+ if (!f) {
+ perror("Failed to set printk");
+ return;
+ }
+ fprintf(f, "7 4 1 7");
+ fclose(f);
+}
+
static void prepare_sandbox(void)
{
int i;
@@ -181,6 +195,8 @@ static void prepare_sandbox(void)
"mode=0755") < 0)
perror("Failed to create filesystem");
}
+
+ enable_printk();
}
static char *const qemu_argv[] = {
--
2.41.0
Hi Pauli,
On Wed, Jul 12, 2023 at 10:00 AM Pauli Virtanen <[email protected]> wrote:
>
> It is useful to see WARN_ON/bt_dev_err messages when running the tests.
> Enable non-quiet printk levels after boot, so that it is on by default
> and doesn't need to be handled in local test scripts.
> ---
>
> Notes:
> It could be useful to also check for BUG/WARNING in the bluez test bot.
>
> tools/test-runner.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/tools/test-runner.c b/tools/test-runner.c
> index d74bb1087..288901a61 100644
> --- a/tools/test-runner.c
> +++ b/tools/test-runner.c
> @@ -136,6 +136,20 @@ static const char *config_table[] = {
> NULL
> };
>
> +static void enable_printk(void)
> +{
> + FILE *f;
> +
> + /* Set non-quiet printk level */
> + f = fopen("/proc/sys/kernel/printk", "w");
> + if (!f) {
> + perror("Failed to set printk");
> + return;
> + }
> + fprintf(f, "7 4 1 7");
Can you have a comment on what this 7 4 1 7 is for?
> + fclose(f);
> +}
> +
> static void prepare_sandbox(void)
> {
> int i;
> @@ -181,6 +195,8 @@ static void prepare_sandbox(void)
> "mode=0755") < 0)
> perror("Failed to create filesystem");
> }
> +
> + enable_printk();
> }
>
> static char *const qemu_argv[] = {
> --
> 2.41.0
>
--
Luiz Augusto von Dentz
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=764973
---Test result---
Test Summary:
CheckPatch PASS 0.97 seconds
GitLint PASS 0.65 seconds
BuildEll PASS 26.62 seconds
BluezMake PASS 771.59 seconds
MakeCheck PASS 11.94 seconds
MakeDistcheck PASS 155.03 seconds
CheckValgrind PASS 250.24 seconds
CheckSmatch PASS 335.90 seconds
bluezmakeextell PASS 101.43 seconds
IncrementalBuild PASS 1295.86 seconds
ScanBuild WARNING 1024.62 seconds
Details
##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:
tools/test-runner.c:941:2: warning: 2nd function call argument is an uninitialized value
printf("Running command %s\n", cmdname ? cmdname : argv[0]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
---
Regards,
Linux Bluetooth