mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
userland: make libs really work
This commit is contained in:
15
common.py
15
common.py
@@ -486,10 +486,13 @@ CLI arguments to pass to the userland executable.
|
|||||||
default=False,
|
default=False,
|
||||||
help='''\
|
help='''\
|
||||||
Place build output inside source tree to conveniently run it, especially when
|
Place build output inside source tree to conveniently run it, especially when
|
||||||
building with the host native toolchain. Currently only supported by ./build-userland.
|
building with the host native toolchain.
|
||||||
|
|
||||||
When running, prefer in-tree executables instead of out-of-tree ones, e.g.:
|
When running, use in-tree executables instead of out-of-tree ones,
|
||||||
userland/c/hello resolves userland/c/hello.out instead of the out-of-tree one.
|
userland/c/hello resolves userland/c/hello.out instead of the out-of-tree one.
|
||||||
|
|
||||||
|
Currently only supported by userland scripts such as ./build-userland and
|
||||||
|
./run --userland.
|
||||||
''',
|
''',
|
||||||
)
|
)
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
@@ -982,7 +985,13 @@ lunch aosp_{}-eng
|
|||||||
of the script.
|
of the script.
|
||||||
'''
|
'''
|
||||||
return {
|
return {
|
||||||
key:self.env[key] for key in self._common_args if self.env['_args_given'][key]
|
key:self.env[key] for key in self._common_args if
|
||||||
|
(
|
||||||
|
# Args given on command line.
|
||||||
|
self.env['_args_given'][key] or
|
||||||
|
# Ineritance changed defaults.
|
||||||
|
key in self._defaults
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_stats(self, stat_re=None, stats_file=None):
|
def get_stats(self, stat_re=None, stats_file=None):
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ class PathProperties:
|
|||||||
# of how Python + QEMU + gem5 determine the exit status of signals.
|
# of how Python + QEMU + gem5 determine the exit status of signals.
|
||||||
'receives_signal',
|
'receives_signal',
|
||||||
'requires_kernel_modules',
|
'requires_kernel_modules',
|
||||||
|
# The example requires sudo, which usually implies that it can do something
|
||||||
|
# deeply to the system it runs on, which would preventing further interactive
|
||||||
|
# or test usage of the system, for example poweroff or messing up the GUI.
|
||||||
|
'sudo',
|
||||||
'uses_dynamic_library',
|
'uses_dynamic_library',
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +80,7 @@ class PathProperties:
|
|||||||
not self['receives_signal'] and \
|
not self['receives_signal'] and \
|
||||||
not self['requires_kernel_modules'] and \
|
not self['requires_kernel_modules'] and \
|
||||||
not self['skip_run_unclassified'] and \
|
not self['skip_run_unclassified'] and \
|
||||||
|
not self['sudo'] and \
|
||||||
not (self['uses_dynamic_library'] and env['emulator'] == 'gem5')
|
not (self['uses_dynamic_library'] and env['emulator'] == 'gem5')
|
||||||
|
|
||||||
def update(self, other):
|
def update(self, other):
|
||||||
@@ -166,6 +171,7 @@ path_properties_tuples = (
|
|||||||
'receives_signal': False,
|
'receives_signal': False,
|
||||||
'requires_kernel_modules': False,
|
'requires_kernel_modules': False,
|
||||||
'skip_run_unclassified': False,
|
'skip_run_unclassified': False,
|
||||||
|
'sudo': False,
|
||||||
'uses_dynamic_library': False,
|
'uses_dynamic_library': False,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -264,7 +270,12 @@ path_properties_tuples = (
|
|||||||
'assert_fail.c': {'exit_status': 1},
|
'assert_fail.c': {'exit_status': 1},
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
'libs': {'uses_dynamic_library': True},
|
'libs': (
|
||||||
|
{'uses_dynamic_library': True},
|
||||||
|
{
|
||||||
|
'libdrm': {'sudo': True},
|
||||||
|
}
|
||||||
|
),
|
||||||
'linux': {**gnu_extension_properties, **{'skip_run_unclassified': True}},
|
'linux': {**gnu_extension_properties, **{'skip_run_unclassified': True}},
|
||||||
'posix': (
|
'posix': (
|
||||||
{},
|
{},
|
||||||
|
|||||||
Reference in New Issue
Block a user