-
Notifications
You must be signed in to change notification settings - Fork 2.2k
tests/int: nits and cleanups #3369
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
Conversation
5c6b57e to
9aec7f0
Compare
|
As per comments, #3367 (comment), it makes sense to change CGROUP_UNIFIED to CGROUP_V1 and CGROUP_V2. |
92d25b6 to
bd0c4c0
Compare
bd0c4c0 to
b822bc4
Compare
|
Waiting for #3367 to be merged. |
b822bc4 to
1f72a84
Compare
fbbd8be to
0996d10
Compare
|
@tianon PTAL 🙏🏻 |
0996d10 to
5de7cba
Compare
Strictly speaking, == is for [[ only, not for [ / test, and, unlike =, the right side is a pattern. To avoid confusion, use =. In cases where we compare with empty string, use -z instead. Keep using [[ in some cases since it does not require quoting the left and right side of comparison (I trust shellcheck on that one). This should have no effect (other than the code being a tad more strict). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This makes it work similar to all the other variables we use as binary flags. The new 'shellcheck disable' is due to a bug in shellcheck (basically, it does not track the scope of variables or execution order, assuming everything is executed as soon as it is seen). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This test requires both rootless and root, which does not make sense. Remove the rootless part. Fixes: d41a273 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The variable $ROOTLESS, as set by helpers.bash and used in many places, provides the same value as $EUID which is always set by bash. Since we are using bash, we can rely on $EUID being omnipresent. Modify all uses accordingly, and since the value is known to be a number, omit the quoting. Similarly, replace all uses of $(id -u) to $EUID. Do some trivial cleanups along the way, such as - simplify some if A; then B; to A && B; - do not use [[ instead of [ where not necessary. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
5de7cba to
d620a40
Compare
|
@thaJeztah @mrunalp PTAL (this is already blessed by @tianon). |
|
@thaJeztah @mrunalp @AkihiroSuda @cyphar PTAL (this is already blessed by @tianon). |
|
@thaJeztah @mrunalp @AkihiroSuda @cyphar Very PTAL. Background story: I am working to add some tests and just caught myself redoing these cleanups from scratch. Believe me, it does not feel good at all. |
thaJeztah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
sorry, for some reason missed the pings 🙀
Based on and currently includes #3367and #3371. Draft until those are merged.This is a set of bash code cleanups for integration tests, mostly done for correctness, uniformity, and readability.
Please review commit by commit, and see individual commit messages for details.