Skip to content
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

Fix some bugs in the regression tests and add more regression tests #295

Merged
merged 5 commits into from
May 3, 2021

Conversation

JohnoKing
Copy link

src/cmd/ksh93/tests/{basic.sh,builtins.sh,shtests}:

  • Redirect error output from the ulimit builtin to silence irrelevant errors in the regression tests (these errors may occur when a command such as ulimit -t 4 is run before the regression tests).
  • Shellquote the error messages from the getconf regression tests.

src/cmd/ksh93/tests/{arrays,io,variables}.sh:

src/cmd/ksh93/tests/{basic,pty}.sh:

$ ( [ -t 1 ]; echo $? )
1  # Always fails

JohnoKing added 3 commits May 2, 2021 11:31
src/cmd/ksh93/tests/{basic.sh,builtins.sh,shtests}:
- Redirect error output from the ulimit builtin to silence irrelevant
  errors in the regression tests (these errors may occur when a
  command such as 'ulimit -t 4' is run before the regression tests).
- Shellquote the error messages from the getconf regression tests.

src/cmd/ksh93/tests/{arrays,io,variables}.sh:
- Backport the ksh2020 regression tests for the following bugs:
  <att#23>
  <att#203>
  <att#472>
  <att#492>

src/cmd/ksh93/tests/{basic,pty}.sh:
- Add regression tests for the following bugs:
  <att#1160>
  <att#1461>
- The ksh2020 fix for [ -t 1 ] in non-forking command substitutions
  caused the following bug in interactive shells:
    $ ( [ -t 1 ]; echo $? )
    1  # Always fails
  To avoid introducing this bug, this commit adds a regression
  test for it.
JohnoKing added 2 commits May 2, 2021 21:23
- Move the test to the start of functions.sh (if it's at the end
  of the script, it refuses to fail under ksh2020). Output from
  this regression test when run against ksh2020:
    $ bin/shtests -p functions
    #### Regression-testing /home/johno/GitRepos/KornShell/ksh/arch/linux.i386-64/bin/ksh ####
    test functions begins at 2021-05-02+21:22:19
            functions.sh[46]: eval'ing function dumps function body to stdout (got $' { eval "bar() { FAILURE; }"; }\n { FAILURE; }')
- Use arithmetic for loop instead of seq.
In ksh93v- [[ -o ?posix ]] doesn't return an error (because it's
implemented in the bash mode). However, 'set -o posix' will fail in
ksh93v- if it's not in bash compatibility mode, which causes this
test script to exit prematurely.
@JohnoKing JohnoKing force-pushed the extra-regress-tests branch from e6dd0dd to 36d515a Compare May 3, 2021 05:14
@McDutchie
Copy link

LGTM now.

@McDutchie McDutchie merged commit d5b94a3 into ksh93:master May 3, 2021
@JohnoKing JohnoKing deleted the extra-regress-tests branch May 3, 2021 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants