app/test: drop dependency on crypto scheduler driver
PATCH 1/1 app/test: drop dependency on crypto scheduler driver
The cryptodev autotests make use of the crypto scheduler driver when it is available, but build fine without. We can therefore remove the hard dependency on that driver when building the crypto test files.
--- app/test/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/meson.build +1 -1
@@ -11,7 +11,7 @@ packet_burst_generator_deps = ['net'] sample_packet_forward_deps = ['net_ring', 'ethdev', 'bus_vdev'] virtual_pmd_deps = ['ethdev', 'net', 'bus_pci'] # test_cryptodev has material that other crypto tests need -test_cryptodev_deps = ['bus_vdev', 'net', 'cryptodev', 'crypto_scheduler', 'security'] +test_cryptodev_deps = ['bus_vdev', 'net', 'cryptodev', 'security'] source_file_deps = { # The C files providing functionality to other test cases
Signature · 1 line
2.39.2
Quoted 8 lines
The cryptodev autotests make use of the crypto scheduler driver when it is available, but build fine without. We can therefore remove the hard dependency on that driver when building the crypto test files.
Fixes 50823f30f0c8 ("test: build using per-file dependencies")Reported-by Akhil Goyal <[email protected]>Signed-off-by Bruce Richardson <[email protected]>
Quoted 4 lines · Akhil Goyal
Quoted 4 lines
The cryptodev autotests make use of the crypto scheduler driver when it is available, but build fine without. We can therefore remove the hard dependency on that driver when building the crypto test files.
loongarch CI does not seem to agree, can you have a look?
Quoted 6 lines
Quoted 5 lines
Fixes 50823f30f0c8 ("test: build using per-file dependencies")Reported-by Akhil Goyal <[email protected]>Signed-off-by Bruce Richardson <[email protected]>Acked-by Akhil Goyal <[email protected]>
Signature · 1 line
David Marchand
Quoted 8 lines · David Marchand
Quoted 4 lines · Akhil Goyal
Quoted 4 lines
The cryptodev autotests make use of the crypto scheduler driver when it is available, but build fine without. We can therefore remove the hard dependency on that driver when building the crypto test files.
loongarch CI does not seem to agree, can you have a look?
Yes, although I find the error reported a little strange as it should not be including the header if the component is not available.
However, first I'm looking into some other issues I caught post-post of the patch. The dependency tracking is also not correct after this change, so I need to do a little more digging to fix this. I probably need a precursor patch to fix the dependency assignment for the binary, as having optional dependencies means we can no longer use the dependency list for determining what objects we need to link against (and what header paths to search). Instead for the unit tests, we should just link against everything we have built.
Please ignore this patch for now. V2 set coming soon...
/Bruce
PATCH 1/2 app/test: add support for optional dependencies
In reply to Bruce RichardsonSome tests make optionally use a component but don't require it for building. If we include the dependency in the per-file lists, then tests may be unnecessarily omitted, as the dependency is not required. On the other hand, removing the optional dependency from the list can cause build failures, as the test case may include the optional code, but then fail to build as the build system won't have added the necessary paths for header inclusion, or the necessary libraries for linking.
Resolve this by explicitly providing a list of optional dependencies. Any items in this list will be added to the dependency list if available, but otherwise won't be involved in enable/disable of specific tests.
--- app/test/meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+)
app/test/meson.build +10 -0
@@ -5,6 +5,10 @@ deps += ['cmdline', 'ring', 'mempool', 'mbuf'] sources += files('commands.c', 'test.c') +# optional dependencies: some files may use these - and so we should link them in - +# but do not explicitly require them so they are not listed in the per-file lists below +optional_deps = [] + # some other utility C files, providing functions used by various tests # so we need to include these deps in the dependency list for the files using those fns. packet_burst_generator_deps = ['net']
@@ -226,6 +230,12 @@ foreach f, f_deps : source_file_deps sources += files(f) endif endforeach +# add the optional dependencies +foreach d:optional_deps + if is_variable(def_lib + '_rte_' + d) and d not in deps + deps += d + endif +endforeach if cc.has_argument('-Wno-format-truncation') cflags += '-Wno-format-truncation'
Signature · 1 line
2.39.2
PATCH 2/2 app/test: make crypto scheduler an optional dependency
The cryptodev autotests make use of the crypto scheduler driver when it is available, but build fine without. We can therefore remove the hard dependency on that driver when building the crypto test files.
--- app/test/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test/meson.build +2 -2
@@ -7,7 +7,7 @@ sources += files('commands.c', 'test.c') # optional dependencies: some files may use these - and so we should link them in - # but do not explicitly require them so they are not listed in the per-file lists below -optional_deps = [] +optional_deps = ['crypto_scheduler'] # some other utility C files, providing functions used by various tests # so we need to include these deps in the dependency list for the files using those fns.
@@ -15,7 +15,7 @@ packet_burst_generator_deps = ['net'] sample_packet_forward_deps = ['net_ring', 'ethdev', 'bus_vdev'] virtual_pmd_deps = ['ethdev', 'net', 'bus_pci'] # test_cryptodev has material that other crypto tests need -test_cryptodev_deps = ['bus_vdev', 'net', 'cryptodev', 'crypto_scheduler', 'security'] +test_cryptodev_deps = ['bus_vdev', 'net', 'cryptodev', 'security'] source_file_deps = { # The C files providing functionality to other test cases
Signature · 1 line
2.39.2
Re: [PATCH 1/2] app/test: add support for optional dependencies
In reply to Bruce RichardsonQuoted 2 lines · Bruce Richardson
Some tests make optionally use a component but don't require it for
s/make //
Quoted 7 lines
building. If we include the dependency in the per-file lists, then tests may be unnecessarily omitted, as the dependency is not required. On the other hand, removing the optional dependency from the list can cause build failures, as the test case may include the optional code, but then fail to build as the build system won't have added the necessary paths for header inclusion, or the necessary libraries for linking.
Quoted 6 lines
Resolve this by explicitly providing a list of optional dependencies. Any items in this list will be added to the dependency list if available, but otherwise won't be involved in enable/disable of specific tests.
Signed-off-by Bruce Richardson <[email protected]>
For the series,
Akhil can you confirm this series works for you?
Thanks!
Signature · 1 line
David Marchand
Akhil Goyal
Tested-byRE: [EXT] Re: [PATCH 1/2] app/test: add support for optional dependencies
Quoted 19 lines
Quoted 2 lines · Bruce Richardson
Some tests make optionally use a component but don't require it for
s/make //
Quoted 12 lines
building. If we include the dependency in the per-file lists, then tests may be unnecessarily omitted, as the dependency is not required. On the other hand, removing the optional dependency from the list can cause build failures, as the test case may include the optional code, but then fail to build as the build system won't have added the necessary paths for header inclusion, or the necessary libraries for linking.
Resolve this by explicitly providing a list of optional dependencies. Any items in this list will be added to the dependency list if available, but otherwise won't be involved in enable/disable of specific tests.
Quoted 6 lines
Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>For the series,
Reviewed-by David Marchand <[email protected]>Akhil can you confirm this series works for you?
Re: [EXT] Re: [PATCH 1/2] app/test: add support for optional dependencies
Quoted 11 lines · Akhil Goyal
Quoted 11 lines
Quoted 1 line
Some tests make optionally use a component but don't require it for
s/make //
Quoted 7 lines
building. If we include the dependency in the per-file lists, then tests may be unnecessarily omitted, as the dependency is not required. On the other hand, removing the optional dependency from the list can cause build failures, as the test case may include the optional code, but then fail to build as the build system won't have added the necessary paths for header inclusion, or the necessary libraries for linking.
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Resolve this by explicitly providing a list of optional dependencies. Any items in this list will be added to the dependency list if available, but otherwise won't be involved in enable/disable of specific tests.
Signed-off-by Bruce Richardson <[email protected]>Reviewed-by David Marchand <[email protected]>Tested-by Akhil Goyal <[email protected]>
Series applied, thanks for the quick fix Bruce.
Signature · 1 line
David Marchand