mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
baremetal: all examples working, all failures accounted for!
SIMD&FP is now enabled in arm from bootloader.
This commit is contained in:
@@ -11,6 +11,10 @@ class PathProperties:
|
||||
# All new properties must be listed here or else you get an error.
|
||||
default_properties = {
|
||||
'allowed_archs': None,
|
||||
# The example uses aarch32 instructions which are not present in ARMv7.
|
||||
# Therefore, it cannot be run in baremetal ARMv7 CPUs.
|
||||
# User mode simulation however seems to enable aarch32 so these run fine.
|
||||
'arm_aarch32': False,
|
||||
# Examples that can be built in baremetal.
|
||||
'baremetal': False,
|
||||
'c_std': default_c_std,
|
||||
@@ -52,7 +56,6 @@ class PathProperties:
|
||||
# it only generates intermediate object files. Therefore it
|
||||
# should not be run while testing.
|
||||
'no_executable': False,
|
||||
'receives_signal': None,
|
||||
# The script requires a non-trivial argument to be passed to run properly.
|
||||
'requires_argument': False,
|
||||
'requires_dynamic_library': False,
|
||||
@@ -66,6 +69,13 @@ class PathProperties:
|
||||
# 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.
|
||||
'requires_sudo': False,
|
||||
# The signal received is generated by the OS implicitly rather than explicitly
|
||||
# done sith signal(), e.g. Illegal instruction or sigsegv.
|
||||
# Therefore, it won't behave in the same way in baremetal. aarch64 already
|
||||
# has an exception handler which we could use but arm doesn't and the IP
|
||||
# goes astray, so let's just skip this for now.
|
||||
'signal_generated_by_os': False,
|
||||
'signal_received': None,
|
||||
# We were lazy to properly classify why we are skipping these tests.
|
||||
# TODO get it done.
|
||||
'skip_run_unclassified': False,
|
||||
@@ -133,6 +143,12 @@ class PathProperties:
|
||||
is_baremetal=is_baremetal,
|
||||
is_userland=is_userland
|
||||
) and
|
||||
not (
|
||||
is_baremetal and (
|
||||
self['arm_aarch32'] or
|
||||
self['signal_generated_by_os']
|
||||
)
|
||||
) and
|
||||
not self['interactive'] and
|
||||
not self['more_than_1s'] and
|
||||
not self['no_executable'] and
|
||||
@@ -246,7 +262,6 @@ path_properties_tuples = (
|
||||
'arm': (
|
||||
{'allowed_archs': {'arm'}},
|
||||
{
|
||||
'gem5_assert.S': {'requires_m5ops': True},
|
||||
'multicore.S': {'test_run_args': {'cpus': 2}},
|
||||
'no_bootloader': (
|
||||
{'extra_objs_disable_baremetal_bootloader': True},
|
||||
@@ -326,11 +341,13 @@ path_properties_tuples = (
|
||||
},
|
||||
),
|
||||
'freestanding': freestanding_properties,
|
||||
'lkmc_assert_eq_fail.S': {'receives_signal': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_memcmp_fail.S': {'receives_signal': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_eq_fail.S': {'signal_received': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_memcmp_fail.S': {'signal_received': signal.Signals.SIGABRT},
|
||||
'udf.S': {
|
||||
'receives_signal': signal.Signals.SIGILL
|
||||
'signal_generated_by_os': True,
|
||||
'signal_received': signal.Signals.SIGILL,
|
||||
},
|
||||
'vcvta.S': {'arm_aarch32': True},
|
||||
}
|
||||
),
|
||||
'aarch64': (
|
||||
@@ -344,15 +361,16 @@ path_properties_tuples = (
|
||||
},
|
||||
),
|
||||
'freestanding': freestanding_properties,
|
||||
'lkmc_assert_eq_fail.S': {'receives_signal': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_memcmp_fail.S': {'receives_signal': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_eq_fail.S': {'signal_received': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_memcmp_fail.S': {'signal_received': signal.Signals.SIGABRT},
|
||||
'udf.S': {
|
||||
'receives_signal': signal.Signals.SIGILL
|
||||
'signal_generated_by_os': True,
|
||||
'signal_received': signal.Signals.SIGILL,
|
||||
},
|
||||
}
|
||||
),
|
||||
'lkmc_assert_fail.S': {
|
||||
'receives_signal': signal.Signals.SIGABRT,
|
||||
'signal_received': signal.Signals.SIGABRT,
|
||||
},
|
||||
'x86_64': (
|
||||
{'allowed_archs': {'x86_64'}},
|
||||
@@ -363,13 +381,13 @@ path_properties_tuples = (
|
||||
{
|
||||
'freestanding': freestanding_properties,
|
||||
'ring0.c': {
|
||||
'receives_signal': signal.Signals.SIGSEGV
|
||||
'signal_received': signal.Signals.SIGSEGV
|
||||
}
|
||||
}
|
||||
),
|
||||
'freestanding': freestanding_properties,
|
||||
'lkmc_assert_eq_fail.S': {'receives_signal': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_memcmp_fail.S': {'receives_signal': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_eq_fail.S': {'signal_received': signal.Signals.SIGABRT},
|
||||
'lkmc_assert_memcmp_fail.S': {'signal_received': signal.Signals.SIGABRT},
|
||||
}
|
||||
),
|
||||
}
|
||||
@@ -380,10 +398,10 @@ path_properties_tuples = (
|
||||
},
|
||||
{
|
||||
'abort.c': {
|
||||
'receives_signal': signal.Signals.SIGABRT,
|
||||
'signal_received': signal.Signals.SIGABRT,
|
||||
},
|
||||
'assert_fail.c': {
|
||||
'receives_signal': signal.Signals.SIGABRT,
|
||||
'signal_received': signal.Signals.SIGABRT,
|
||||
},
|
||||
'exit1.c': {'exit_status': 1},
|
||||
'exit2.c': {'exit_status': 2},
|
||||
|
||||
Reference in New Issue
Block a user