lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <TYAPR01MB6330E178F0D86ED8ACE075378B579@TYAPR01MB6330.jpnprd01.prod.outlook.com>
Date:   Thu, 29 Sep 2022 05:28:07 +0000
From:   "tan.shaopeng@...itsu.com" <tan.shaopeng@...itsu.com>
To:     'Reinette Chatre' <reinette.chatre@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Shuah Khan <shuah@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>
Subject: RE: [PATCH 3/5] selftests/resctrl: Remove duplicate codes that clear
 each test result file

Hi Reinette,

> On 9/27/2022 2:01 AM, tan.shaopeng@...itsu.com wrote:
> > Hi Reinette,
> >
> >> On 9/13/2022 6:51 PM, Shaopeng Tan wrote:
> >>> Before exiting each test function(run_cmt/cat/mbm/mba_test()),
> >>> test results are printed by ksft_print_msg() and then temporary
> >>> result files are cleaned by function cmt/cat/mbm/mba_test_cleanup().
> >>> However, before running ksft_print_msg(), function
> >>
> >> before -> after?
> >
> > I think it is "before".
> 
> hmmm ... if cmt/cat/mbm/mba_test_cleanup() was run before
> ksft_print_msg() then there would be no test results to print, no?
> The current implementation runs cmt/cat/mbm/mba_test_cleanup() after
> ksft_print_msg() ... albeit twice.


I am sorry I made a mistake in changelog.
It should be ksft_test_result() instead of ksft_print_msg().

Changelog:
Before exiting each test function(run_cmt/cat/mbm/mba_test()),
test results (“ok”/”not ok”) are printed by ksft_test_result() and then temporary result
files are cleaned by function cmt/cat/mbm/mba_test_cleanup().
However, before running ksft_test_result(), function cmt/cat/mbm/mba_test_cleanup()
has been run in each test function as follows:
  cmt_resctrl_val()
  cat_perf_miss_val()
  mba_schemata_change()
  mbm_bw_change()

Remove duplicate codes that clear each test result file.

An example of MBM test:
 resctrl_tests.c
  73 static void run_mbm_test(bool has_ben, char **benchmark_cmd, int span,
  74                          int cpu_no, char *bw_report)
  75 {
  87         res = mbm_bw_change(span, cpu_no, bw_report, benchmark_cmd);
  88         ksft_test_result(!res, "MBM: bw change\n");
  89         if ((get_vendor() == ARCH_INTEL) && res)
  90                 ksft_print_msg("Intel MBM may be inaccurate when Sub-NUMA Clustering is enabled. Check BIOS configuration.\n");
  91         mbm_test_cleanup();
  92 }
  
mbm_test.c
 117 int mbm_bw_change(int span, int cpu_no, char *bw_report, char **benchmark_cmd)
 118 {
 138         ret = check_results(span);
 142         mbm_test_cleanup();
 145 }
 
 50 static int check_results(int span)
 51 {
 82         ret = show_bw_info(bw_imc, bw_resc, span);
 87 }
* Test results saved in file RESULT_FILE_NAME are printed by ksft_print_msg() in function show_bw_info().

Best Regards,
Shaopeng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ