summaryrefslogtreecommitdiffstats
path: root/tools/testing/kunit/kunit_kernel.py
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-12-31 13:37:13 -0800
committerDavid S. Miller <davem@davemloft.net>2019-12-31 13:37:13 -0800
commit31d518f35e1a80268a24a855be9477eb458540ad (patch)
tree28494f630aede8f95d4ed2ebbfd14c222bd24fa6 /tools/testing/kunit/kunit_kernel.py
parent9e860947d8d7a1504476ac49abfce90a4ce600f3 (diff)
parent738d2902773e30939a982c8df7a7f94293659810 (diff)
downloadlinux-stable-31d518f35e1a80268a24a855be9477eb458540ad.tar.gz
linux-stable-31d518f35e1a80268a24a855be9477eb458540ad.tar.bz2
linux-stable-31d518f35e1a80268a24a855be9477eb458540ad.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Simple overlapping changes in bpf land wrt. bpf_helper_defs.h handling. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/kunit/kunit_kernel.py')
-rw-r--r--tools/testing/kunit/kunit_kernel.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
index bf3876835331..cc5d844ecca1 100644
--- a/tools/testing/kunit/kunit_kernel.py
+++ b/tools/testing/kunit/kunit_kernel.py
@@ -14,7 +14,7 @@ import os
import kunit_config
KCONFIG_PATH = '.config'
-KUNITCONFIG_PATH = 'kunitconfig'
+kunitconfig_path = '.kunitconfig'
class ConfigError(Exception):
"""Represents an error trying to configure the Linux kernel."""
@@ -82,7 +82,7 @@ class LinuxSourceTree(object):
def __init__(self):
self._kconfig = kunit_config.Kconfig()
- self._kconfig.read_from_file(KUNITCONFIG_PATH)
+ self._kconfig.read_from_file(kunitconfig_path)
self._ops = LinuxSourceTreeOperations()
def clean(self):
@@ -111,7 +111,7 @@ 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 the .kunitconfig."""
kconfig_path = get_kconfig_path(build_dir)
if os.path.exists(kconfig_path):
existing_kconfig = kunit_config.Kconfig()
@@ -140,10 +140,10 @@ class LinuxSourceTree(object):
return False
return True
- def run_kernel(self, args=[], timeout=None, build_dir=None):
+ def run_kernel(self, args=[], timeout=None, build_dir=''):
args.extend(['mem=256M'])
process = self._ops.linux_bin(args, timeout, build_dir)
- with open('test.log', 'w') as f:
+ with open(os.path.join(build_dir, 'test.log'), 'w') as f:
for line in process.stdout:
f.write(line.rstrip().decode('ascii') + '\n')
yield line.rstrip().decode('ascii')