ElektraInitiative / libelektra

Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
https://www.libelektra.org
BSD 3-Clause "New" or "Revised" License
208 stars 123 forks source link

some tests fail when a global plugin is mounted #2177

Closed markus2330 closed 3 years ago

markus2330 commented 6 years ago

Steps to Reproduce the Problem

kdb gmount python script=/path/to/elektra/src/plugins/python/python/python_filter.py
make run_all

Expected Result

All tests should succeed.

Actual Result

See #2176 for reproducible output.

        Start  66: testshell_markdown_ccode
 66/215 Test  #66: testshell_markdown_ccode .................***Failed    6.10 sec
Input: /home/markus/Projekte/Elektra/current/src/plugins/ccode/README.md
kdb mount config.tcl user/tests/ccode tcl ccode base64
kdb set user/tests/ccode/multiline "`printf 'one\ntwo\nthree'`"

ERROR - RET:
Return value “5” does not match “0”

grep 'multiline' `kdb file user/tests/ccode` | sed 's/[[:space:]]*//'

ERROR - STDOUT:
“”
does not match
“multiline = one\ntwo\nthree”

kdb get user/tests/ccode/multiline

ERROR - RET:
Return value “5” does not match “0”

ERROR - STDOUT:
“”
does not match
“one⏎two⏎three”

kdb set user/tests/ccode/tab 'Tab       Fabulous'

ERROR - RET:
Return value “5” does not match “0”

kdb get user/tests/ccode/tab

ERROR - RET:
Return value “5” does not match “0”

ERROR - STDOUT:
“”
does not match
“Tab    Fabulous”

kdb set 'user/tests/ccode/tab/t\ta      b' 'Escaped Tabs'

ERROR - RET:
Return value “5” does not match “0”

grep 'tab/' `kdb file user/tests/ccode` | sed 's/[[:space:]]*//'

ERROR - STDOUT:
“”
does not match
“tab/t\\ta\tb = Escaped Tabs”

kdb rm -r user/tests/ccode

ERROR - RET:
Return value “5” does not match “0”

kdb umount user/tests/ccode
kdb mount config.tcl user/tests/ccode tcl base64 ccode escape=`bash -c 'printf %x \"%'` chars/20=`bash -c 'printf %x \"_'`
kdb set user/tests/ccode/spaces 'one two three'

ERROR - RET:
Return value “5” does not match “0”

grep 'space' `kdb file user/tests/ccode/spaces` | sed 's/[[:space:]]*//'

ERROR - STDOUT:
“”
does not match
“spaces = one%_two%_three”

kdb get user/tests/ccode/spaces

ERROR - RET:
Return value “5” does not match “0”

ERROR - STDOUT:
“”
does not match
“one two three”

kdb rm -r user/tests/ccode

ERROR - RET:
Return value “5” does not match “0”

kdb umount user/tests/ccode
shell_recorder /tmp/tmp.WjcStGN8uB RESULTS: 22 test(s) done 15 error(s).

—— Protocol ————————————————————————————————————————————————————
CMD: kdb mount config.tcl user/tests/ccode tcl ccode base64
RET: 0

CMD: kdb set user/tests/ccode/multiline "`printf 'one\ntwo\nthree'`"
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb set failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: grep 'multiline' `kdb file user/tests/ccode` | sed 's/[[:space:]]*//'
RET: 0
STDERR: src/tools/kdb/file.cpp:47:execute: Get returned with an exception: Sorry, the error (#61) occurred ;(@Description: parse error@Reason: file: /home/markus/.config/config.tcl could not be parsed because: {@             = /home/markus/.config/config.tcl@   }@}@@Ingroup: plugin@Module: tcl@At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71@Mountpoint: user/tests/ccode@Configfile: /home/markus/.config/config.tcl@
=== FAILED stdout does not match expected pattern multiline = one\ntwo\nthree
ERROR: 61

CMD: kdb get user/tests/ccode/multiline
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb get failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
=== FAILED stdout does not match expected pattern one⏎two⏎three
ERROR: 61

CMD: kdb set user/tests/ccode/tab 'Tab  Fabulous'
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb set failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb get user/tests/ccode/tab
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb get failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
=== FAILED stdout does not match expected pattern Tab   Fabulous
ERROR: 61

CMD: kdb set 'user/tests/ccode/tab/t\ta b' 'Escaped Tabs'
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb set failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: grep 'tab/' `kdb file user/tests/ccode` | sed 's/[[:space:]]*//'
RET: 0
STDERR: src/tools/kdb/file.cpp:47:execute: Get returned with an exception: Sorry, the error (#61) occurred ;(@Description: parse error@Reason: file: /home/markus/.config/config.tcl could not be parsed because: {@             = /home/markus/.config/config.tcl@   }@}@@Ingroup: plugin@Module: tcl@At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71@Mountpoint: user/tests/ccode@Configfile: /home/markus/.config/config.tcl@
=== FAILED stdout does not match expected pattern tab/t\\ta\tb = Escaped Tabs
ERROR: 61

CMD: kdb rm -r user/tests/ccode
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb rm failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb umount user/tests/ccode
RET: 0

CMD: kdb mount config.tcl user/tests/ccode tcl base64 ccode escape=`bash -c 'printf %x \"%'` chars/20=`bash -c 'printf %x \"_'`
RET: 0

CMD: kdb set user/tests/ccode/spaces 'one two three'
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb set failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: grep 'space' `kdb file user/tests/ccode/spaces` | sed 's/[[:space:]]*//'
RET: 0
STDERR: src/tools/kdb/file.cpp:47:execute: Get returned with an exception: Sorry, the error (#61) occurred ;(@Description: parse error@Reason: file: /home/markus/.config/config.tcl could not be parsed because: {@             = /home/markus/.config/config.tcl@   }@}@@Ingroup: plugin@Module: tcl@At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71@Mountpoint: user/tests/ccode@Configfile: /home/markus/.config/config.tcl@
=== FAILED stdout does not match expected pattern spaces = one%_two%_three
ERROR: 61

CMD: kdb get user/tests/ccode/spaces
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb get failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
=== FAILED stdout does not match expected pattern one two three
ERROR: 61

CMD: kdb rm -r user/tests/ccode
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb rm failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/ccode
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb umount user/tests/ccode
RET: 0
————————————————————————————————————————————————————————————————

        Start  67: testmod_conditionals
 67/215 Test  #67: testmod_conditionals .....................   Passed    0.00 sec

128/215 Test #128: testshell_markdown_tcl ...................***Failed    6.00 sec
Input: /home/markus/Projekte/Elektra/current/src/plugins/tcl/README.md
kdb mount config.tcl user/tests/tcl tcl ccode null base64
kdb set user/tests/tcl/key value

ERROR - RET:
Return value “5” does not match “0”

kdb setmeta user/tests/tcl/key comment "This key contains example data."

ERROR - RET:
Return value “5” does not match “0”

kdb getmeta user/tests/tcl/key comment

ERROR - RET:
Return value “5” does not match “0”

ERROR - STDOUT:
“”
does not match
“Thiskeycontainsexampledata.”

kdb export user/tests/tcl tcl

ERROR - RET:
Return value “5” does not match “0”

ERROR - STDOUT:
“”
does not match
“{⏎     {⏎              key = value⏎            {⏎                      comment = Thiskeycontainsexampledata.⏎      }⏎       }⏎}”

kdb rm -r user/tests/tcl

ERROR - RET:
Return value “5” does not match “0”

kdb umount user/tests/tcl
kdb mount config.tcl user/tests tcl ccode null base64
kdb import user/tests/dump xmltool < src/plugins/xmltool/xmltool/dump.xml

ERROR - RET:
Return value “5” does not match “0”

kdb ls user/tests/dump

ERROR - RET:
Return value “5” does not match “0”

ERROR - STDOUT:
“”
does not match
“user/tests/dump/.HiddenBinaryKey⏎user/tests/dump/.HiddenDirectoryKey⏎user/tests/dump/.HiddenStringKey⏎user/tests/dump/PerfectBinaryKey⏎user/tests/dump/PerfectDirectoryKey⏎user/tests/dump/PerfectStringKey⏎user/tests/dump/Ug.ly:Bin@a€ryKey⏎user/tests/dump/Ug.ly:Dir@ect€oryKey⏎user/tests/dump/Ug.ly:St@ri€n.gKey”

kdb get user/tests/dump/PerfectBinaryKey

ERROR - RET:
Return value “5” does not match “0”

ERROR - STDOUT:
“”
does not match
“\x42\x69\x6e\x61\x72\x79\x56\x61\x6c\x75\x65\x0”

kdb get user/tests/dump/Ug.ly:Bin@a€ryKey

ERROR - RET:
Return value “5” does not match “0”

kdb rm -r user/tests

ERROR - RET:
Return value “5” does not match “0”

kdb umount user/tests
shell_recorder /tmp/tmp.3ln80zP0Hp RESULTS: 18 test(s) done 14 error(s).

—— Protocol ————————————————————————————————————————————————————
CMD: kdb mount config.tcl user/tests/tcl tcl ccode null base64
RET: 0

CMD: kdb set user/tests/tcl/key value
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb set failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/tcl
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb setmeta user/tests/tcl/key comment "This key contains example data."
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb setmeta failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/tcl
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb getmeta user/tests/tcl/key comment
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb getmeta failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/tcl
Configfile: /home/markus/.config/config.tcl
=== FAILED stdout does not match expected pattern Thiskeycontainsexampledata.
ERROR: 61

CMD: kdb export user/tests/tcl tcl
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb export failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/tcl
Configfile: /home/markus/.config/config.tcl
=== FAILED stdout does not match expected pattern {⏎    {⏎              key = value⏎            {⏎                  comment = Thiskeycontainsexampledata.⏎           }⏎      }⏎}
ERROR: 61

CMD: kdb rm -r user/tests/tcl
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb rm failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests/tcl
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb umount user/tests/tcl
RET: 0

CMD: kdb mount config.tcl user/tests tcl ccode null base64
RET: 0

CMD: kdb import user/tests/dump xmltool < src/plugins/xmltool/xmltool/dump.xml
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb import failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb ls user/tests/dump
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb ls failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests
Configfile: /home/markus/.config/config.tcl
=== FAILED stdout does not match expected pattern user/tests/dump/.HiddenBinaryKey⏎user/tests/dump/.HiddenDirectoryKey⏎user/tests/dump/.HiddenStringKey⏎user/tests/dump/PerfectBinaryKey⏎user/tests/dump/PerfectDirectoryKey⏎user/tests/dump/PerfectStringKey⏎user/tests/dump/Ug.ly:Bin@a€ryKey⏎user/tests/dump/Ug.ly:Dir@ect€oryKey⏎user/tests/dump/Ug.ly:St@ri€n.gKey
ERROR: 61

CMD: kdb get user/tests/dump/PerfectBinaryKey
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb get failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests
Configfile: /home/markus/.config/config.tcl
=== FAILED stdout does not match expected pattern \x42\x69\x6e\x61\x72\x79\x56\x61\x6c\x75\x65\x0
ERROR: 61

CMD: kdb get user/tests/dump/Ug.ly:Bin@a€ryKey
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb get failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb rm -r user/tests
RET: 5
=== FAILED return value does not match expected pattern 0
STDERR: The command kdb rm failed while accessing the key database with the info:
Sorry, the error (#61) occurred ;(
Description: parse error
Reason: file: /home/markus/.config/config.tcl could not be parsed because: {
                 = /home/markus/.config/config.tcl
        }
}

Ingroup: plugin
Module: tcl
At: /home/markus/Projekte/Elektra/current/src/plugins/tcl/tcl.cpp:71
Mountpoint: user/tests
Configfile: /home/markus/.config/config.tcl
ERROR: 61

CMD: kdb umount user/tests
RET: 0
————————————————————————————————————————————————————————————————

177/215 Test #177: testshell_markdown_kdb_find ..............***Failed    9.06 sec
Input: /home/markus/Projekte/Elektra/current/doc/help/kdb-find.md
kdb mount find.ecf /tests/find dump
kdb set /tests/find/tests val1
kdb set /tests/find/tests/foo/bar val2
kdb set /tests/find/tests/fizz/buzz fizzbuzz
kdb set /tests/find/tostfizz val3
kdb set /tests/find/tust/level lvl
kdb find '/tests/find/t[eo]'
kdb find 'fizz'

ERROR - STDOUT:
“user/sw/elektra/examples/kdb-ls/test/fizz/buzz
user/tests/find/tests/fizz/buzz
user/tests/find/tostfizz”
does not match
“user/tests/find/tests/fizz/buzz⏎user/tests/find/tostfizz”

kdb rm -r /tests/find
kdb umount /tests/find
shell_recorder /tmp/tmp.pENFSqEyPQ RESULTS: 12 test(s) done 1 error(s).

—— Protocol ————————————————————————————————————————————————————
CMD: kdb mount find.ecf /tests/find dump
RET: 0

CMD: kdb set /tests/find/tests val1
RET: 0
STDOUT: Using name user/tests/find/tests
Create a new key user/tests/find/tests with string "val1"

CMD: kdb set /tests/find/tests/foo/bar val2
RET: 0
STDOUT: Using name user/tests/find/tests/foo/bar
Create a new key user/tests/find/tests/foo/bar with string "val2"

CMD: kdb set /tests/find/tests/fizz/buzz fizzbuzz
RET: 0
STDOUT: Using name user/tests/find/tests/fizz/buzz
Create a new key user/tests/find/tests/fizz/buzz with string "fizzbuzz"

CMD: kdb set /tests/find/tostfizz val3
RET: 0
STDOUT: Using name user/tests/find/tostfizz
Create a new key user/tests/find/tostfizz with string "val3"

CMD: kdb set /tests/find/tust/level lvl
RET: 0
STDOUT: Using name user/tests/find/tust/level
Create a new key user/tests/find/tust/level with string "lvl"

CMD: kdb find '/tests/find/t[eo]'
RET: 0
STDOUT: user/tests/find/tests
user/tests/find/tests/fizz/buzz
user/tests/find/tests/foo/bar
user/tests/find/tostfizz

CMD: kdb find 'fizz'
RET: 0
STDOUT: user/sw/elektra/examples/kdb-ls/test/fizz/buzz
user/tests/find/tests/fizz/buzz
user/tests/find/tostfizz
=== FAILED stdout does not match expected pattern user/tests/find/tests/fizz/buzz⏎user/tests/find/tostfizz

CMD: kdb rm -r /tests/find
RET: 0

CMD: kdb umount /tests/find
RET: 0
————————————————————————————————————————————————————————————————

180/215 Test #180: testshell_markdown_tutorial_validation ...***Failed    9.73 sec
Input: /home/markus/Projekte/Elektra/current/doc/tutorials/validation.md
kdb mount validation.dump user/tests/together dump validation
kdb vset user/tests/together/test 123 "[1-9][0-9]*" "Not a number"
kdb set user/tests/together/test abc
kdb lsmeta user/tests/together/test
kdb setmeta user/tests/together/test check/validation "[1-9][0-9]*"
kdb setmeta user/tests/together/test check/validation/match LINE
kdb setmeta user/tests/together/test check/validation/message "Not a number"
kdb set user/tests/together/test 123
kdb rm -r user/tests/together
kdb umount user/tests/together
kdb set system/tests/spec $(mktemp)
kdb set system/tests/user $(mktemp)
kdb export spec dump > $(kdb get system/tests/spec)
kdb export user dump > $(kdb get system/tests/user)
kdb setmeta spec/tests/spec/test hello world
kdb set /tests/spec/test value
kdb lsmeta spec/tests/spec/test | grep -v '^internal/ini'
kdb lsmeta /tests/spec/test | grep -v '^internal/ini'
kdb getmeta /tests/spec/test hello
kdb getmeta user/tests/spec/test hello
kdb setmeta "spec/tests/spec/_" new metaval
kdb set /tests/spec/test value
kdb lsmeta /tests/spec/test | grep -v '^internal/ini'
kdb rm -r spec/tests/spec
kdb rm -r user/tests/spec
kdb setmeta spec/tests/spec/test check/validation "[1-9][0-9]*"
kdb setmeta spec/tests/spec/test check/validation/match LINE
kdb setmeta spec/tests/spec/test check/validation/message "Not a number"
kdb set /tests/spec/test "not a number"
kdb lsmeta /tests/spec/test | grep -v '^internal/ini'
kdb rm -r spec/tests/spec/test
kdb rm -r user/tests/spec/test
kdb mount tutorial.dump spec/tests/tutorial dump
cat << HERE | kdb import spec/tests/tutorial ni  
[]                                         
 mountpoint = tutorial.dump                
 infos/plugins = dump validation           
[/links/_]                                 
check/validation = https?://.*\..*         
check/validation/match = LINE              
check/validation/message = not a valid URL 
description = A link to some website       
HERE
kdb lsmeta spec/tests/tutorial
kdb spec-mount /tests/tutorial
kdb set /tests/tutorial/links/url "invalid url"
kdb file user/tests/tutorial
kdb file system/tests/tutorial
kdb file dir/tests/tutorial
kdb set -N system /tests/tutorial/links/elektra https://www.libelektra.org
kdb setmeta /tests/tutorial/spec/should_not_be_here trigger/error 10
kdb spec-mount /tests/tutorial
kdb set /tests/tutorial/spec/should_not_be_here abc
kdb get /tests/tutorial/spec/should_not_be_here

ERROR - RET:
Return value “0” does not match “11”

ERROR - STDERR:
“”
does not match
“Did not find key '/tests/tutorial/spec/should_not_be_here'”

kdb rm -r spec/tests/tutorial
kdb rm -r system/tests/tutorial
kdb umount spec/tests/tutorial
kdb umount /tests/tutorial
kdb rm -rf spec
kdb rm -rf user
kdb import spec dump < $(kdb get system/tests/spec)

ERROR - RET:
Return value “7” does not match “0”

kdb import user dump < $(kdb get system/tests/user)
rm $(kdb get system/tests/spec)
rm $(kdb get system/tests/user)
kdb rm system/tests/spec
kdb rm system/tests/user
Binärdateien /tmp/tmp.0uUTepLONE/spec.export.dump und /tmp/tmp.0uUTepLONE/spec.check.dump sind verschieden.
Test did not leave spec config in the same state at is was before!
This means the test itself is flawed or the KDB was externally modified while the tests were running!
You can inspect the original spec config in /tmp/tmp.0uUTepLONE/spec.export.dump
compared to situation now in /tmp/tmp.0uUTepLONE/spec.check.dump

Other important recovery files are also in the directory /tmp/tmp.0uUTepLONE
Please remove the /tmp/tmp.0uUTepLONE directory yourself after you fixed the situation, I cannot do it for you

        Start 181: testshell_markdown_msr_syntax

98% tests passed, 4 tests failed out of 215

Label Time Summary:
bindings    =   4.29 sec (18 tests)
kdbtests    = 473.84 sec (87 tests)
memleak     = 460.31 sec (100 tests)

Total Test time (real) = 477.23 sec

The following tests FAILED:
         66 - testshell_markdown_ccode (Failed)
        128 - testshell_markdown_tcl (Failed)
        177 - testshell_markdown_kdb_find (Failed)
        180 - testshell_markdown_tutorial_validation (Failed)

System Information

stale[bot] commented 3 years ago

I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:

stale[bot] commented 3 years ago

I closed this issue now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:

mpranj commented 3 years ago

Thank you for reporting. Sounds like we should look into this at some point.

Would you expect a backup-and-restore of the global config before/after the tests, or should we work more towards better test isolation from the "real system" configs?

markus2330 commented 3 years ago

The problem here is that global plugins seem to have unintended side effects (even if they "do nothing"). As we want to reduce the 1.0 scope to only support a few global plugins, I think we can move this problem post-1.0. For the few global plugins we support, however, we ideally add such tests.

markus2330 commented 3 years ago

Would you expect a backup-and-restore of the global config before/after the tests, or should we work more towards better test isolation from the "real system" configs?

I think writing only to /tests/<name> and a similar approach for avoiding collisions with the config files should be enough. This could be both enforced by shell recorder. But this is not the problem reported in this issue.