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 or skip some tests in OpenBSD #495

Closed
wants to merge 3 commits into from
Closed

Conversation

kernigh
Copy link
Contributor

@kernigh kernigh commented Apr 28, 2018

I reported in #483 that some tests fail in OpenBSD, because of differences between OpenBSD and other systems. These commits edit the tests sh_match.sh, signal.sh, and variables.sh to give "OK" on OpenBSD.

The remaining tests that "FAIL" are these:

  • pty.sh might be ksh's bug.
  • arith.sh, comvario.sh, treemove.sh fail because of OpenBSD's bug in strtold().
  • coprocess.sh, sigchld.sh are often "OK" but have a chance to "FAIL".

The value of ${.sh.sig.code} is SI_QUEUE if the system supports
sigqueue(), or SI_USER otherwise.

Partial fix for att#483
OpenBSD accepts "x" as an alias of "C", and I can't use `locale -a` to
detect this.  If $(uname) is OpenBSD, then use "x.x" as the unknown
locale.

Most other systems agree that "x" is unknown.  If `locale -a` shows
that someone added the "x" locale, then skip the test.

Partial fix for att#483
@krader1961
Copy link
Contributor

LGTM. Much thanks, @kernigh. I'll merge later tonight when I'm home.

@krader1961 krader1961 closed this Apr 28, 2018
JohnoKing added a commit to JohnoKing/ksh that referenced this pull request Mar 30, 2021
src/cmd/ksh93/tests/variables.sh
- On OpenBSD 'x' functions as an alias for the 'C' locale, which causes
  regression tests that assume 'x' is an invalid locale to fail.
  Additionally, the regression tests didn't account for if 'x' is
  manually added by the user as a valid locale. The fix for both of these
  issues was backported from ksh2020: att#495.
  To avoid regression test failures on OpenBSD, an invalid 'x.x' locale
  is now used. To fix the other problem, 'locale -a' is used to look for
  an 'x' locale that would cause the regression tests to fail.
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