libelektra: is_not_rw_storage broken
As @kodebach reported in #2419:
Yes, but that is broken, because is_not_rw_storage doesn’t work. Not even dump is recognized as a storage plugin.
Fix
is_not_rw_storageininclude_common.sh.intests/shell/check_export.shso we detect problems like this in future.
- fix is_not_rw_storage
- fix testscr_check_import
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (19 by maintainers)
Commits related to this issue
- tests: fix is_not_rw_storage is_not_rw_storage now checks if the output of "kdb info {plugin} provides" contains the word "storage" instead of checking if it is equal to storage. #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: make check_export accept quotes around value check_export did not expect the quotes around the value in the output of "kdb set". It now does. #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: fix is_not_rw_storage is_not_rw_storage now checks if the output of "kdb info {plugin} provides" contains the word "storage" instead of checking if it is equal to storage. #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: make check_export accept quotes around value check_export did not expect the quotes around the value in the output of "kdb set". It now does. #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: check_import and check_export should run for at least one plugin closes #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: fix is_not_rw_storage is_not_rw_storage now checks if the output of "kdb info {plugin} provides" contains the word "storage" instead of checking if it is equal to storage. #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: make check_export accept quotes around value check_export did not expect the quotes around the value in the output of "kdb set". It now does. #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: check_import and check_export should run for at least one plugin closes #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: fix is_not_rw_storage is_not_rw_storage now checks if the output of "kdb info {plugin} provides" contains the word "storage" instead of checking if it is equal to storage. #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: make check_export accept quotes around value check_export did not expect the quotes around the value in the output of "kdb set". It now does. #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: check_import and check_export should run for at least one plugin closes #2423 — committed to llukask/libelektra by llukask 5 years ago
- tests: fix is_not_rw_storage is_not_rw_storage now checks if the output of "kdb info {plugin} provides" contains the word "storage" instead of checking if it is equal to storage. #2423 — committed to ElektraInitiative/libelektra by llukask 5 years ago
- tests: make check_export accept quotes around value check_export did not expect the quotes around the value in the output of "kdb set". It now does. #2423 — committed to ElektraInitiative/libelektra by llukask 5 years ago
Thank you both 🎆
@mpranj yes, it would be appreciated if you do fixes in the PR!
Having a fixed master has of course the highest priority 🚀
I’ll look at #2595 and see what needs to be done…
The problem with
is_not_rw_storageis that it checks if the output ofkdb info $PLUGIN providesis equal tostorage, but for a plugin to be a storage plugin the output only has to contain the wordstorage.When I fixed this in my fork all of the tests that use
is_not_rw_storage(that ischeck_export,check_import,check_get_setandcheck_kdb_internal_suite) started to fail.Most of the
check_exportandcheck_importtests fail because the necessary files intests/shell/shelldon’t exist, but some fail for other reasons: themmapstorageandmmapstorage_crcplugins fail because of permission stuff and the tcl plugincheck_exporttests fail because the output is incorrect. Those tests produce a lot of output so I might have missed something. I didn’t look atcheck_get_setandcheck_kdb_internal_suiteyet.This issue also applies to
testscr_check_import.I just looked at the output of
testscr_check_export(called withctest -R testscr_check_export --verboseinside the build directory):The test prints one line for each plugin that was compiled and then exits successfully. (Should probably fail if no read-write storage plugin was found, because at least one is required for Elektra to function properly)
Which has to correspond to these lines from
tests/shell/check_export.sh:So
is_not_rw_storagealways returnstrue.