linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: kunit: drop obsolete note about uml_abort for coverage
@ 2021-06-23 20:17 Daniel Latypov
  2021-06-25  4:08 ` David Gow
  2021-06-28 20:10 ` Brendan Higgins
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Latypov @ 2021-06-23 20:17 UTC (permalink / raw)
  To: brendanhiggins, davidgow
  Cc: linux-kernel, kunit-dev, linux-kselftest, skhan, Daniel Latypov

Commit b6d5799b0b58 ("kunit: Add 'kunit_shutdown' option") changes KUnit
to call kernel_halt() by default when done testing.

This fixes the issue with not having .gcda files due to not calling
atexit() handlers, and therefore we can stop recommending people
manually tweak UML code.

The need to use older versions of GCC (<=6) remains however, due to
linktime issues, same as before. Note: There also might still be issues
with .gcda files as well in newer versions.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
---
 Documentation/dev-tools/kunit/running_tips.rst | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/Documentation/dev-tools/kunit/running_tips.rst b/Documentation/dev-tools/kunit/running_tips.rst
index 7d99386cf94a..d1626d548fa5 100644
--- a/Documentation/dev-tools/kunit/running_tips.rst
+++ b/Documentation/dev-tools/kunit/running_tips.rst
@@ -86,19 +86,7 @@ Generating code coverage reports under UML
 .. note::
 	TODO(brendanhiggins@google.com): There are various issues with UML and
 	versions of gcc 7 and up. You're likely to run into missing ``.gcda``
-	files or compile errors. We know one `faulty GCC commit
-	<https://github.com/gcc-mirror/gcc/commit/8c9434c2f9358b8b8bad2c1990edf10a21645f9d>`_
-	but not how we'd go about getting this fixed. The compile errors still
-	need some investigation.
-
-.. note::
-	TODO(brendanhiggins@google.com): for recent versions of Linux
-	(5.10-5.12, maybe earlier), there's a bug with gcov counters not being
-	flushed in UML. This translates to very low (<1%) reported coverage. This is
-	related to the above issue and can be worked around by replacing the
-	one call to ``uml_abort()`` (it's in ``os_dump_core()``) with a plain
-	``exit()``.
-
+	files or compile errors.
 
 This is different from the "normal" way of getting coverage information that is
 documented in Documentation/dev-tools/gcov.rst.

base-commit: 87c9c16317882dd6dbbc07e349bc3223e14f3244
-- 
2.32.0.93.g670b81a890-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation: kunit: drop obsolete note about uml_abort for coverage
  2021-06-23 20:17 [PATCH] Documentation: kunit: drop obsolete note about uml_abort for coverage Daniel Latypov
@ 2021-06-25  4:08 ` David Gow
  2021-06-28 20:10 ` Brendan Higgins
  1 sibling, 0 replies; 3+ messages in thread
From: David Gow @ 2021-06-25  4:08 UTC (permalink / raw)
  To: Daniel Latypov
  Cc: Brendan Higgins, Linux Kernel Mailing List, KUnit Development,
	open list:KERNEL SELFTEST FRAMEWORK, Shuah Khan

On Thu, Jun 24, 2021 at 4:17 AM Daniel Latypov <dlatypov@google.com> wrote:
>
> Commit b6d5799b0b58 ("kunit: Add 'kunit_shutdown' option") changes KUnit
> to call kernel_halt() by default when done testing.
>
> This fixes the issue with not having .gcda files due to not calling
> atexit() handlers, and therefore we can stop recommending people
> manually tweak UML code.
>
> The need to use older versions of GCC (<=6) remains however, due to
> linktime issues, same as before. Note: There also might still be issues
> with .gcda files as well in newer versions.
>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>
> ---

This looks good to me, thanks! Now if only we could fix the issues
with newer gcc versions...

Reviewed-by: David Gow <davidgow@google.com>


-- David

>  Documentation/dev-tools/kunit/running_tips.rst | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/Documentation/dev-tools/kunit/running_tips.rst b/Documentation/dev-tools/kunit/running_tips.rst
> index 7d99386cf94a..d1626d548fa5 100644
> --- a/Documentation/dev-tools/kunit/running_tips.rst
> +++ b/Documentation/dev-tools/kunit/running_tips.rst
> @@ -86,19 +86,7 @@ Generating code coverage reports under UML
>  .. note::
>         TODO(brendanhiggins@google.com): There are various issues with UML and
>         versions of gcc 7 and up. You're likely to run into missing ``.gcda``
> -       files or compile errors. We know one `faulty GCC commit
> -       <https://github.com/gcc-mirror/gcc/commit/8c9434c2f9358b8b8bad2c1990edf10a21645f9d>`_
> -       but not how we'd go about getting this fixed. The compile errors still
> -       need some investigation.
> -
> -.. note::
> -       TODO(brendanhiggins@google.com): for recent versions of Linux
> -       (5.10-5.12, maybe earlier), there's a bug with gcov counters not being
> -       flushed in UML. This translates to very low (<1%) reported coverage. This is
> -       related to the above issue and can be worked around by replacing the
> -       one call to ``uml_abort()`` (it's in ``os_dump_core()``) with a plain
> -       ``exit()``.
> -
> +       files or compile errors.
>
>  This is different from the "normal" way of getting coverage information that is
>  documented in Documentation/dev-tools/gcov.rst.
>
> base-commit: 87c9c16317882dd6dbbc07e349bc3223e14f3244
> --
> 2.32.0.93.g670b81a890-goog
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation: kunit: drop obsolete note about uml_abort for coverage
  2021-06-23 20:17 [PATCH] Documentation: kunit: drop obsolete note about uml_abort for coverage Daniel Latypov
  2021-06-25  4:08 ` David Gow
@ 2021-06-28 20:10 ` Brendan Higgins
  1 sibling, 0 replies; 3+ messages in thread
From: Brendan Higgins @ 2021-06-28 20:10 UTC (permalink / raw)
  To: Daniel Latypov; +Cc: davidgow, linux-kernel, kunit-dev, linux-kselftest, skhan

On Wed, Jun 23, 2021 at 1:17 PM Daniel Latypov <dlatypov@google.com> wrote:
>
> Commit b6d5799b0b58 ("kunit: Add 'kunit_shutdown' option") changes KUnit
> to call kernel_halt() by default when done testing.
>
> This fixes the issue with not having .gcda files due to not calling
> atexit() handlers, and therefore we can stop recommending people
> manually tweak UML code.
>
> The need to use older versions of GCC (<=6) remains however, due to
> linktime issues, same as before. Note: There also might still be issues
> with .gcda files as well in newer versions.
>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-28 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 20:17 [PATCH] Documentation: kunit: drop obsolete note about uml_abort for coverage Daniel Latypov
2021-06-25  4:08 ` David Gow
2021-06-28 20:10 ` Brendan Higgins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).