libelektra: gopts, quickdump, specload: tests fail

Steps to Reproduce the Problem

Compile and install Elektra, remove (or rename) the source/build directory. Then run kdb run_all

Expected Result

All test cases should run successfully.

Actual Result

Running testmod_gopts

GOPTS     TESTS
==================

test empty
GOPTS     TESTS
==================

test empty
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/plugins/gopts/testmod_gopts.c:78: error in run_test: child process test failed
test singleopt
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/tests/cframework/tests.c:523: error in clean_temp_home: Could not delete TMPHOME via nftw
GOPTS     TESTS
==================
Running testmod_quickdump
QUICKDUMP     TESTS
==================

test varint
test basics
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/plugins/quickdump/testmod_quickdump.c:111: error in test_basics: call to kdbSet was not successful

Program received signal SIGSEGV, Segmentation fault.
_IO_getc (fp=0x0) at getc.c:37
37      getc.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  _IO_getc (fp=0x0) at getc.c:37
#1  0x0000555555556bb7 in compare_binary_files (filename1=<optimized out>, filename2=<optimized out>) at ./src/plugins/quickdump/testmod_quickdump.c:31
#2  0x0000555555556f9a in test_basics () at ./src/plugins/quickdump/testmod_quickdump.c:113
#3  0x0000555555556807 in main (argc=1, argv=0x7fffffffe278) at ./src/plugins/quickdump/testmod_quickdump.c:332
Running testmod_specload

SPECLOAD     TESTS
==================

test basics
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/plugins/specload/testmod_specload.c:63: error in test_basics: call to checkConfig was not successful
There are 1 warnings
buffer is: warnings/#00
number: C01330
description: Plugin Misbehavior
module: kdb
file: /home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/libs/elektra/plugin.c
line: 302
reason: Open of plugin returned unsuccessfully: specload. Reason contains plugin, see other warnings for details
reason: 
reason: 
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/plugins/specload/testmod_specload.c:65: error in test_basics: warnings in kdbOpen for plugin specload
number: C01100
description: : Resource
module: : specload
at: /home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/plugins/specload/specload.c:372
reason: : App '/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/obj-x86_64-linux-gnu/bin/elektra-specload-testapp' doesn't exist or is not executable
mountpoint: : 
configfile: : 
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/plugins/specload/testmod_specload.c:65: error in test_basics: error in kdbOpen for plugin specload
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/libelektra/src/plugins/specload/testmod_specload.c:65: fatal in test_basics: could not open specload plugin
error: testmod_specload

System Information

  • Elektra Version: master

Further Information

Please also add a test to the build server which runs the tests after source/build directories are removed.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 30 (28 by maintainers)

Commits related to this issue

Most upvoted comments

nd the quickdump issue is purely a user rights issue not a bug,

It is a violation of FHS, applications are not supposed to write to /usr, it even might be read-only.

For writing we should only use tempfiles and we should also clean them up after the tests finished.

@markus2330 Does the quickdump problem still occur for you? AFAIK we never figured out what was wrong there. I also couldn’t reproduce it.

For gopts and specload see #3618

Shellrecorder tests already use kdb, and they work for both installed Elektra and from the build directory (even if Elektra is installed).

That works because shell tests always execute "$KDB" and never kdb. And also because make run_all and ctest use e.g. testscr_check_meta.sh scripts, while kdb uses e.g. check_meta.sh. In the first we set $KDB to ${CMAKE_BINARY_DIR}/bin/kdb in the second one, it is simply set to kdb (and therefore resolved via $PATH).

No, KDB_EXEC_PATH is not set for an installed kdb (unless the user sets it)

I just took the master version of Elektra and installed it. The file /usr/local/lib/elektra/tool_exec/check_meta contains the line:

export KDB_EXEC_PATH="/home/klemens/libelektra/build/bin:$KDB_EXEC_PATH"

Of course this doesn’t affect testmod_* tests, but it is wrong nonetheless. I will create a new issue.