New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multifile resolver test cases fail #1564

Closed
markus2330 opened this Issue Aug 3, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@markus2330
Contributor

markus2330 commented Aug 3, 2017

Seems like the testshell_markdown_multifile fails here.
Reason might be related to the change in resolver #1548, see coredump at the very end.

138/176 Test #138: testshell_markdown_multifile ............***Failed    1.43 sec
protocol file: /tmp/elektraenv.oHdgx8KHI
rm -rf ~/.config/multitest || $(exit 0)
mkdir -p ~/.config/multitest || $(exit 0)
cat > ~/.config/multitest/lo.ini << EOF \n[lo]\naddr = 127.0.0.1\nLink encap = Loopback\nEOF\n
Return value “1” doesn't match “0”
cat > ~/.config/multitest/lan.ini << EOF \n[eth0]\naddr = 192.168.1.216\nLink encap = Ethernet\nEOF\n
Return value “1” doesn't match “0”
cat > ~/.config/multitest/wlan.ini << EOF \n[wlan0]\naddr = 192.168.1.125\nLink encap = Ethernet\nEOF\n
Return value “1” doesn't match “0”
kdb mount -R multifile -c storage="ini",pattern="*.ini",resolver="resolver" multitest user/multi
kdb ls user/multi

ERROR - STDOUT:
“”
doesn't match “user/multi/lan\.ini/eth0⏎user/multi/lan\.ini/eth0/Link encap⏎user/multi/lan\.ini/eth0/addr⏎user/multi/lo\.ini/lo⏎user/multi/lo\.ini/lo/Link encap⏎user/multi/lo\.ini/lo/addr⏎user/multi/wlan\.ini/wlan0⏎user/multi/wlan\.ini/wlan0/Link encap⏎user/multi/wlan\.ini/wlan0/addr”

kdb set user/multi/lan.ini/eth0/addr 10.0.0.2
../shell_recorder.sh: line 47:  5741 Aborted                 (core dumped) sh -c -f "$command" 2> stderr > stdout
Return value “134” doesn't match “0”
kdb get user/multi/lan.ini/eth0/addr
Return value “1” doesn't match “0”

ERROR - STDOUT:
“”
doesn't match “10\.0\.0\.2”

cat > ~/.config/multitest/test.ini << EOF \n[testsection]\nkey = val\nEOF\n
Return value “1” doesn't match “0”
kdb ls user/multi

ERROR - STDOUT:
“”
doesn't match “user/multi/lan\.ini/eth0⏎user/multi/lan\.ini/eth0/Link encap⏎user/multi/lan\.ini/eth0/addr⏎user/multi/lo\.ini/lo⏎user/multi/lo\.ini/lo/Link encap⏎user/multi/lo\.ini/lo/addr⏎user/multi/test\.ini/testsection⏎user/multi/test\.ini/testsection/key⏎user/multi/wlan\.ini/wlan0⏎user/multi/wlan\.ini/wlan0/Link encap⏎user/multi/wlan\.ini/wlan0/addr”

kdb rm -r user/multi/test.ini
Return value “1” doesn't match “0”
stat ~/.config/multifile/test.ini
kdb umount user/multi
rm -rf ~/.config/multitest || $(exit 0)
mkdir -p ~/.config/multitest ~/.config/multitest/a/a1/a12 ~/.config/multitest/a/a2/a22 ~/.config/multitest/b/b1|| $(exit 0)
echo "a1key = a1val" > ~/.config/multitest/a/a1/a12/testa1.file
echo "a2key = a2val" > ~/.config/multitest/a/a2/a22/testa2.file
echo "b1key = b1val" > ~/.config/multitest/b/b1/testb1.file
kdb mount -R multifile -c storage="ini",pattern="*.file",recursive=,resolver="resolver" multitest user/multi
kdb ls user/multi
rm -rf ~/.config/multifile
kdb umount user/multi
shell_recorder /tmp/tmp.r78HViVRBt RESULTS: 27 test(s) done 10 error(s).

/tmp/elektraenv.oHdgx8KHI:

CMD: rm -rf ~/.config/multitest || $(exit 0)
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: mkdir -p ~/.config/multitest || $(exit 0)
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: cat > ~/.config/multitest/lo.ini << EOF \n[lo]\naddr = 127.0.0.1\nLink encap = Loopback\nEOF\n
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: sh: warning: here-document at line 0 delimited by end-of-file (wanted `EOF')
cat: n[lo]naddr: No such file or directory
cat: =: No such file or directory
cat: 127.0.0.1nLink: No such file or directory
cat: encap: No such file or directory
cat: =: No such file or directory
cat: LoopbacknEOFn: No such file or directory
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: cat > ~/.config/multitest/lan.ini << EOF \n[eth0]\naddr = 192.168.1.216\nLink encap = Ethernet\nEOF\n
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: sh: warning: here-document at line 0 delimited by end-of-file (wanted `EOF')
cat: n[eth0]naddr: No such file or directory
cat: =: No such file or directory
cat: 192.168.1.216nLink: No such file or directory
cat: encap: No such file or directory
cat: =: No such file or directory
cat: EthernetnEOFn: No such file or directory
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: cat > ~/.config/multitest/wlan.ini << EOF \n[wlan0]\naddr = 192.168.1.125\nLink encap = Ethernet\nEOF\n
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: sh: warning: here-document at line 0 delimited by end-of-file (wanted `EOF')
cat: n[wlan0]naddr: No such file or directory
cat: =: No such file or directory
cat: 192.168.1.125nLink: No such file or directory
cat: encap: No such file or directory
cat: =: No such file or directory
cat: EthernetnEOFn: No such file or directory
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb mount -R multifile -c storage="ini",pattern="*.ini",resolver="resolver" multitest user/multi
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb ls user/multi
RET: 0
STDERR: 
STDOUT: 
=== FAILED stdout doesn't match expected pattern user/multi/lan\.ini/eth0⏎user/multi/lan\.ini/eth0/Link encap⏎user/multi/lan\.ini/eth0/addr⏎user/multi/lo\.ini/lo⏎user/multi/lo\.ini/lo/Link encap⏎user/multi/lo\.ini/lo/addr⏎user/multi/wlan\.ini/wlan0⏎user/multi/wlan\.ini/wlan0/Link encap⏎user/multi/wlan\.ini/wlan0/addr
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb set user/multi/lan.ini/eth0/addr 10.0.0.2
RET: 134
=== FAILED return value doesn't match expected pattern 0
STDERR: 
Sorry, I crashed by the signal SIGSEGV
This should not have happened!

Please report the issue at https://issues.libelektra.org/
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb get user/multi/lan.ini/eth0/addr
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: Did not find key
STDOUT: 
=== FAILED stdout doesn't match expected pattern 10\.0\.0\.2
WARNINGS: 
ERRORS: 
DIFF: 

CMD: cat > ~/.config/multitest/test.ini << EOF \n[testsection]\nkey = val\nEOF\n
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: sh: warning: here-document at line 0 delimited by end-of-file (wanted `EOF')
cat: n[testsection]nkey: No such file or directory
cat: =: No such file or directory
cat: valnEOFn: No such file or directory
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb ls user/multi
RET: 0
STDERR: 
STDOUT: 
=== FAILED stdout doesn't match expected pattern user/multi/lan\.ini/eth0⏎user/multi/lan\.ini/eth0/Link encap⏎user/multi/lan\.ini/eth0/addr⏎user/multi/lo\.ini/lo⏎user/multi/lo\.ini/lo/Link encap⏎user/multi/lo\.ini/lo/addr⏎user/multi/test\.ini/testsection⏎user/multi/test\.ini/testsection/key⏎user/multi/wlan\.ini/wlan0⏎user/multi/wlan\.ini/wlan0/Link encap⏎user/multi/wlan\.ini/wlan0/addr
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb rm -r user/multi/test.ini
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: Did not find any key
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: stat ~/.config/multifile/test.ini
RET: 1
STDERR: stat: cannot stat ‘/home/markus/.config/multifile/test.ini’: No such file or directory
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb umount user/multi
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: rm -rf ~/.config/multitest || $(exit 0)
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: mkdir -p ~/.config/multitest ~/.config/multitest/a/a1/a12 ~/.config/multitest/a/a2/a22 ~/.config/multitest/b/b1|| $(exit 0)
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: echo "a1key = a1val" > ~/.config/multitest/a/a1/a12/testa1.file
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: echo "a2key = a2val" > ~/.config/multitest/a/a2/a22/testa2.file
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: echo "b1key = b1val" > ~/.config/multitest/b/b1/testb1.file
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb mount -R multifile -c storage="ini",pattern="*.file",recursive=,resolver="resolver" multitest user/multi
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb ls user/multi
RET: 0
STDERR: 
STDOUT: user/multi/a/a1/a12/testa1.file/a1key
user/multi/a/a2/a22/testa2.file/a2key
user/multi/b/b1/testb1.file/b1key
WARNINGS: 
ERRORS: 
DIFF: 

CMD: rm -rf ~/.config/multifile
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

CMD: kdb umount user/multi
RET: 0
STDERR: 
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

The core dump is generated from kdb set user/multi/lan.ini/eth0/addr 10.0.0.2:

#0  0x00007f346da40067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f346da41448 in __GI_abort () at abort.c:89
#2  0x000000000044ac20 in catchSignal (signum=11) at /home/jenkins/workspace/workspace/elektra-git-buildpackage-jessie/libelektra/src/tools/kdb/main.cpp:110
#3  <signal handler called>
#4  0x00007f346da55dcc in _IO_vfprintf_internal (s=s@entry=0x7ffc249ec0d0, format=<optimized out>, format@entry=0x1913be0 "src/plugins/resolver/resolver.c:1083:elektraUnlinkFile: Add Warning 36 : the file \"%s\" because of \"%s\"\n", ap=ap@entry=0x7ffc249ec2a8)
    at vfprintf.c:1642
#5  0x00007f346da7d409 in _IO_vsnprintf (string=0x19144f0 "src/plugins/resolver/resolver.c:1083:elektraUnlinkFile: Add Warning 36 : the file \"%s\" because of \"%s\"\n", maxlen=<optimized out>, maxlen@entry=512, 
    format=format@entry=0x1913be0 "src/plugins/resolver/resolver.c:1083:elektraUnlinkFile: Add Warning 36 : the file \"%s\" because of \"%s\"\n", args=args@entry=0x7ffc249ec2a8) at vsnprintf.c:119
#6  0x00007f346d5eb2ec in elektraVFormat (format=0x1913be0 "src/plugins/resolver/resolver.c:1083:elektraUnlinkFile: Add Warning 36 : the file \"%s\" because of \"%s\"\n", arg_list=arg_list@entry=0x7ffc249ec2a8)
    at /home/markus/Projekte/Elektra/current/src/libs/elektra/internal.c:396
#7  0x00007f346d5e7bcb in elektraVLog (level=2, function=<optimized out>, absFile=0x7f346bd13008 "/home/markus/Projekte/Elektra/current/src/plugins/resolver/resolver.c", line=<optimized out>, mmsg=<optimized out>, args=args@entry=0x7ffc249ec2a8)
    at /home/markus/Projekte/Elektra/current/src/libs/elektra/log.c:127
#8  0x00007f346d5e7d38 in elektraLog (level=level@entry=2, function=function@entry=0x7f346bd15ca0 <__func__.10270> "elektraUnlinkFile", absFile=absFile@entry=0x7f346bd13008 "/home/markus/Projekte/Elektra/current/src/plugins/resolver/resolver.c", line=line@entry=1083, 
    mmsg=mmsg@entry=0x7f346bd14e90 "Add Warning 36 : the file \"%s\" because of \"%s\"") at /home/markus/Projekte/Elektra/current/src/libs/elektra/log.c:165
#9  0x00007f346bd085fd in elektraUnlinkFile (filename=0x5f7265766c6f7365 <error: Cannot access memory at address 0x5f7265766c6f7365>, parentKey=parentKey@entry=0x192a060) at /home/markus/Projekte/Elektra/current/src/plugins/resolver/resolver.c:1083
#10 0x00007f346bd0a985 in libelektra_resolver_fm_hpu_b_LTX_elektraPluginerror (handle=<optimized out>, r=<optimized out>, parentKey=0x192a060) at /home/markus/Projekte/Elektra/current/src/plugins/resolver/resolver.c:1099
#11 0x00007f346b4d5a4d in elektraMultifileError (handle=0x18fe120, returned=0x1906a10, parentKey=0x192a060) at /home/markus/Projekte/Elektra/current/src/plugins/multifile/multifile.c:872
#12 0x00007f346d3d3590 in elektraSetRollback (parentKey=<optimized out>, split=<optimized out>) at /home/markus/Projekte/Elektra/current/src/libs/elektra/kdb.c:1072
#13 kdbSet (handle=0x5f7265766c6f7365, ks=0x1913c33, parentKey=0x192a060) at /home/markus/Projekte/Elektra/current/src/libs/elektra/kdb.c:1293
#14 0x00000000004360dc in set (parentKey=..., returned=<synthetic pointer>, this=0x18f6248) at /home/jenkins/workspace/workspace/elektra-git-buildpackage-jessie/libelektra/src/bindings/cpp/include/kdb.hpp:227
#15 SetCommand::execute (this=0x18f6240, cl=...) at /home/jenkins/workspace/workspace/elektra-git-buildpackage-jessie/libelektra/src/tools/kdb/set.cpp:101
#16 0x000000000041b476 in main (argc=4, argv=0x7ffc249ecb88) at /home/jenkins/workspace/workspace/elektra-git-buildpackage-jessie/libelektra/src/tools/kdb/main.cpp:198

Any idea?

@tom-wa

This comment has been minimized.

Show comment
Hide comment
@tom-wa

tom-wa Aug 16, 2017

Contributor

it's not a problem with the resolvers, but the testcases from the README
the heredoc directive isn't working properly anymore on the buildserver, can't reproduce though

CMD: cat > ~/.config/multitest/lo.ini << EOF \n[lo]\naddr = 127.0.0.1\nLink encap = Loopback\nEOF\n
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: sh: warning: here-document at line 0 delimited by end-of-file (wanted `EOF')
cat: n[lo]naddr: No such file or directory
cat: =: No such file or directory
cat: 127.0.0.1nLink: No such file or directory
cat: encap: No such file or directory
cat: =: No such file or directory
cat: LoopbacknEOFn: No such file or directory
Contributor

tom-wa commented Aug 16, 2017

it's not a problem with the resolvers, but the testcases from the README
the heredoc directive isn't working properly anymore on the buildserver, can't reproduce though

CMD: cat > ~/.config/multitest/lo.ini << EOF \n[lo]\naddr = 127.0.0.1\nLink encap = Loopback\nEOF\n
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: sh: warning: here-document at line 0 delimited by end-of-file (wanted `EOF')
cat: n[lo]naddr: No such file or directory
cat: =: No such file or directory
cat: 127.0.0.1nLink: No such file or directory
cat: encap: No such file or directory
cat: =: No such file or directory
cat: LoopbacknEOFn: No such file or directory
@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Aug 16, 2017

Contributor

If I understood @sanssecours PRs correctly it would be better if we completely get rid of HERE documents anyway. We can discuss this today.

Contributor

markus2330 commented Aug 16, 2017

If I understood @sanssecours PRs correctly it would be better if we completely get rid of HERE documents anyway. We can discuss this today.

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Feb 14, 2018

Contributor

Issue seems to be fixed/irrelevant now.

Contributor

markus2330 commented Feb 14, 2018

Issue seems to be fixed/irrelevant now.

@markus2330 markus2330 closed this Feb 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment