Hi I'm running Windows 10 with windows subsystem for linux and Ubuntu 18.04.3.
bash 4.4.20(1)-release (x86_64-pc-linux-gnu)
I'm trying to install bashdb 4.4-1.0.1 and have had a number of failures in the test-suite.
======================================================= bashdb 4.4-1.0.1: test/integration/test-suite.log ======================================================= # TOTAL: 44 # PASS: 34 # SKIP: 3 # XFAIL: 0 # FAIL: 7 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 SKIP: test-file-with-spaces =========================== Skipping test due to autoconf problems SKIP test-file-with-spaces (exit status: 77) FAIL: test-interrupt ==================== --- /home/MyUserName/bashdb-4.4-1.0.1/test/integration/interrupt.check 2019-10-07 23:30:25.731901700 +0100 +++ /home/MyUserName/bashdb-4.4-1.0.1/test/data/interrupt.right 2018-11-15 21:51:21.000000000 +0000 @@ -1,2 +1,5 @@ -stty: 'standard input': Inappropriate ioctl for device -stty: 'standard input': Inappropriate ioctl for device +Program received signal SIGTERM (15)... +->0 in file `interrupt.sh' at line 0 +##1 main() called from file `interrupt.sh' at line 0 + +bashdb: That's all, folks... FAIL test-interrupt (exit status: 1)
I've attempted to debug this, though frankly it is a bit beyond me:
I have found that in the script:
~/bashdb-4.4-1.0.1/test/integration/test-interrupt
line 28, if I increase the sleep timer to 5 seconds, then the test will pass.
I have also found some an issue in the script:
~/bashdb-4.4-1.0.1/example/interrupt.sh
which I have tried executing separatly.
I get this error: line 28: 08: value too great for base (error token is "08")
From the following, it is interpreting 08 as an octal number. Though this doesn't happen if I try in in a separte script or in the shell.
for i in {0,1,2,3,4,5,6,7,9,9}{0,1,2,3,4,5,6,7,8,9} ; do
For some reason the first sequence goes 7, 9, 9, but I don't think this matters. The sequence on the left starting from 0 seems to be an issue in certain curcumstances.
This can be simplified though to something like:
for i in {1..100}; do
as so far as I can tell you are just looking for a counter.
Kind regards
A
The interrupt test is unfortunatly OS specific and thus fragile especially given the integration test framework.
What seems to be going on is that the stty for your terminal and OS subsystem is not working:
stty: 'standard input': Inappropriate ioctl for device
Commit 632a916 has the loop simplification in the test, but that is just a nicety and really doesn't change anything important.
If you want to increase sleelp time and that doesn't adversely impact other OS's that's fine. Or maybe there's a way to identify that the terminal is a funky one and skip the interrup test altogether, that would be fine too.
FYI https://sourceforge.net/p/bashdb/code/ci/bash-4.4/tree/test/integration/README.md now describes how tests work.
Thanks for this Rocky
I will go through this now. I couldn't find the commit you mentioned earlier, I think it might be for version 5 of the package, but as you say it is a minor point.
I "think" I have found a bug:
In the files interrupt.tests and interrupt-3.tests in tests/integration/.
The hash bang referrs to ../../bash instead of /bin/bash
I guess this worked when called as standalone scripts on a specific system and also in the context of the integration tests, they are being sourced instead of being executed independently, so it doesn't really cause a problem in the normal context.
A
Commit is https://sourceforge.net/p/bashdb/code/ci/632a9167dd18fc0decbface0df235aafc7c34c6e/
Please make sure to use the bash-4.4 branch (not master). I should probably delete master altogether. Note there are bash-5.0 and bash-4.2 branches, among others.
Last edit: Rocky Bernstein 2019-10-08