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: <20200204064129.4947-1-sj38.park@gmail.com>
Date:   Tue,  4 Feb 2020 07:41:29 +0100
From:   SeongJae Park <sj38.park@...il.com>
To:     sj38.park@...il.com
Cc:     brendanhiggins@...gle.com, linux-kselftest@...r.kernel.org,
        kunit-dev@...glegroups.com, linux-kernel@...r.kernel.org,
        SeongJae Park <sjpark@...zon.de>
Subject: Re: [PATCH] kunit/kunit_kernel: Rebuild .config if .kunitconfig is modified

Ping?


Thanks,
SeongJae Park

On Sun, 26 Jan 2020 01:59:24 +0000 sj38.park@...il.com wrote:

> From: SeongJae Park <sjpark@...zon.de>
> 
> Deletions of configs in the '.kunitconfig' is not applied because kunit
> rebuilds '.config' only if the '.config' is not a subset of the
> '.kunitconfig'.  To allow the deletions to applied, this commit modifies
> the '.config' rebuild condition to addtionally check the modified times
> of those files.
> 
> Signed-off-by: SeongJae Park <sjpark@...zon.de>
> ---
>  tools/testing/kunit/kunit_kernel.py | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
> index cc5d844ecca1..a3a5d6c7e66d 100644
> --- a/tools/testing/kunit/kunit_kernel.py
> +++ b/tools/testing/kunit/kunit_kernel.py
> @@ -111,17 +111,22 @@ class LinuxSourceTree(object):
>  		return True
>  
>  	def build_reconfig(self, build_dir):
> -		"""Creates a new .config if it is not a subset of the .kunitconfig."""
> +		"""Creates a new .config if it is not a subset of, or older than the .kunitconfig."""
>  		kconfig_path = get_kconfig_path(build_dir)
>  		if os.path.exists(kconfig_path):
>  			existing_kconfig = kunit_config.Kconfig()
>  			existing_kconfig.read_from_file(kconfig_path)
> -			if not self._kconfig.is_subset_of(existing_kconfig):
> -				print('Regenerating .config ...')
> -				os.remove(kconfig_path)
> -				return self.build_config(build_dir)
> -			else:
> +			subset = self._kconfig.is_subset_of(existing_kconfig)
> +
> +			kunitconfig_mtime = os.path.getmtime(kunitconfig_path)
> +			kconfig_mtime = os.path.getmtime(kconfig_path)
> +			older = kconfig_mtime < kunitconfig_mtime
> +
> +			if subset and not older:
>  				return True
> +			print('Regenerating .config ...')
> +			os.remove(kconfig_path)
> +			return self.build_config(build_dir)
>  		else:
>  			print('Generating .config ...')
>  			return self.build_config(build_dir)
> -- 
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ