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

test/system: add support for no ~/.bash_profile #1404

Closed
wants to merge 1 commit into from

Conversation

pennbauman
Copy link
Contributor

The test "run: Ensure that a login shell is used to invoke the command" assumes ~/.bash_profile is present the host system and fails without it.

Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/cd4ae47f9d3c4b5ab16b00fba1f2d6ec

unit-test FAILURE in 8m 27s
unit-test-migration-path-for-coreos-toolbox FAILURE in 8m 56s
unit-test-restricted FAILURE in 8m 10s
✔️ system-test-fedora-rawhide SUCCESS in 30m 26s
✔️ system-test-fedora-39 SUCCESS in 29m 15s
✔️ system-test-fedora-38 SUCCESS in 29m 58s
✔️ system-test-fedora-37 SUCCESS in 29m 33s

Copy link

Build succeeded.
https://softwarefactory-project.io/zuul/t/local/buildset/4819d56f926f4b9ab4283bf3d44bdd61

✔️ unit-test SUCCESS in 7m 07s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 17s
✔️ unit-test-restricted SUCCESS in 6m 35s
✔️ system-test-fedora-rawhide SUCCESS in 28m 22s
✔️ system-test-fedora-39 SUCCESS in 27m 20s
✔️ system-test-fedora-38 SUCCESS in 27m 42s
✔️ system-test-fedora-37 SUCCESS in 27m 37s

@HarryMichal HarryMichal added the 2. Testing Related to testing of Toolbox - unit, system,.. label Dec 3, 2023
Copy link
Member

@debarshiray debarshiray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

Purely in terms of code, the change looks alright. However, I am curious about the context. Why do you not have a ~/.bash_profile? Is it because you are running a Linux distribution which doesn't use ~/.bash_profile as the start-up file for login shells? Or is it because you reconfigured your own OS to be different?

I am asking because this test is a bit hacky. It's written with the assumption that the host operating system is Fedora or something that uses ~/.bash_profile. On top of that, as I learnt later, the test suite doesn't use a separate isolated $HOME different from the user's actual $HOME, which is dangerous. We should really fix that.

So, I am trying to understand your perspective.

@pennbauman
Copy link
Contributor Author

I don't have a ~/.bash_profile because I don't use bash (at least for my regular user) and the file don't really do anything by default (~/.bashrc will be loaded without it), so I just deleted it. If you think this patch is too situational to include, that perfectly reasonable.

Copy link

Build succeeded.
https://softwarefactory-project.io/zuul/t/local/buildset/8b166da4e6dd4503a099fc9285f154a5

✔️ unit-test SUCCESS in 6m 43s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 08s
✔️ unit-test-restricted SUCCESS in 5m 59s
✔️ system-test-fedora-rawhide SUCCESS in 30m 29s
✔️ system-test-fedora-39 SUCCESS in 28m 16s
✔️ system-test-fedora-38 SUCCESS in 32m 23s

@pennbauman pennbauman closed this Sep 5, 2024
@pennbauman pennbauman deleted the bash_profile branch September 5, 2024 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. Testing Related to testing of Toolbox - unit, system,..
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants