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

Building ksh on opensuse wipes out home directory #477

Closed
siteshwar opened this issue Apr 17, 2018 · 3 comments
Closed

Building ksh on opensuse wipes out home directory #477

siteshwar opened this issue Apr 17, 2018 · 3 comments
Assignees
Labels

Comments

@siteshwar
Copy link
Contributor

There are some serious issues with how test cases were run in the last stable release. I installed rpm sources for ksh on opensuse with zypper source install ksh and did rpmbuild -ba ksh.spec. Test cases were run during the build and I saw errors like :

/tmp/ksh-build.hZy52m/tmp_1d.huj
test alias begins at 2018-04-17+19:44:20
/tmp/ksh-build.hZy52m/tmp_3a.92s
alias.sh[90]: /foo: cannot create [Permission denied]
chmod: cannot access '/foo': No such file or directory
	alias.sh[93]: hash -r -- foo failed, expected foo=/foo, got 
alias.sh[90]: /-foo: cannot create [Permission denied]
chmod: cannot access '/-foo': No such file or directory
	alias.sh[93]: hash -r -- -foo failed, expected -foo=/-foo, got 
alias.sh[90]: /--: cannot create [Permission denied]

At the end, my home directory was wiped out and filled with files like:

a  a-b  abc  abd  abe  aXb  b  bb  bcd  bdir  Beware  c  ca  cb  d  dd  de  man

These files are created by ksh test script. @bitstreamout Are you aware about this issue ? I am running a vanilla openSUSE Leap 42.3 system.

@krader1961 I have seen .sh_history file being modified when I run test cases on my fedora system. We should run the test cases in a sandboxed environment.

@krader1961
Copy link
Contributor

I'm just about to open a PR that will fix this; or at least lay the groundwork for fixing this in a comprehensive manner. I've got a new test runner script that ensures every unit test is run in its own unique directory, with consistent env vars, and using a consistent preamble and postscript around each unit test. This is part of fixing #429 and #461.

@siteshwar
Copy link
Contributor Author

It would be a good idea to put a warning before running test cases in the legacy test script. Wiping out your home directory is the last thing you would want while running test cases.

@siteshwar
Copy link
Contributor Author

Thanks @krader1961 for taking on this. After #481 this should not happen with the current development version. @bitstreamout For now I can only suggest you to disable running test cases in rpm builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants