test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jun Dong <junx.dong@intel.com>
To: dts@dpdk.org
Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com
Subject: [dts] [PATCH V1] framework/dts: Regist generate ASan report action to atexit
Date: Sat,  2 Apr 2022 16:54:54 +0800	[thread overview]
Message-ID: <20220402085454.743-1-junx.dong@intel.com> (raw)

Sometime, the framework does not generate ASan reports when exiting abnormally, 
because the operation of generating reports is at the end of the main flow of 
the framework, and there are no guarantee measures in case of abnormality. So
register the generate operation with the atexit module.

Signed-off-by: Jun Dong <junx.dong@intel.com>
---
 framework/dts.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/framework/dts.py b/framework/dts.py
index 1ffb1c23..dbb5a1ed 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -559,6 +559,8 @@ def run_all(
 
     # prepare ASan test
     ASanTestProcess.test_prepare(asan, output_dir)
+    # register generate ASan report action
+    atexit.register(ASanTestProcess.test_process)
 
     if not os.path.exists(output_dir):
         os.mkdir(output_dir)
@@ -676,9 +678,6 @@ def run_all(
 
     save_all_results()
 
-    # process ASan test report
-    ASanTestProcess.test_process()
-
 
 def show_speedup_options_messages(read_cache, skip_setup):
     if read_cache:
-- 
2.33.1.windows.1


             reply	other threads:[~2022-04-02  8:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02  8:54 Jun Dong [this message]
2022-04-06 12:01 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220402085454.743-1-junx.dong@intel.com \
    --to=junx.dong@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=qingx.sun@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).