Skip to content

build-gnu.sh: Don't symlink missing bins to false and force enable tests#9314

Closed
oech3 wants to merge 4 commits intouutils:mainfrom
oech3:patch-4
Closed

build-gnu.sh: Don't symlink missing bins to false and force enable tests#9314
oech3 wants to merge 4 commits intouutils:mainfrom
oech3:patch-4

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Nov 17, 2025

GNU test suite auto-disables tests for misssing binaries. Symlinking them to false cause unwanted failures (e.g. runcon error with SELINUX_ENABLED=0).

@oech3 oech3 changed the title build-gnu.sh: Do not symlink missing bins to false build-gnu.sh: Do not symlink missing bins to false (avoid false-negative) Nov 17, 2025
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/runcon/runcon-no-reorder is no longer failing!
Note: The gnu test tests/runcon/runcon-compute is now being skipped but was previously passing.

@oech3
Copy link
Contributor Author

oech3 commented Nov 17, 2025 via email

@oech3
Copy link
Contributor Author

oech3 commented Nov 17, 2025

@pixelb Would you add _selinux_required to tests relying on runcon and chcon at GNU?
This is uutils's fault, but I have no idea better than it...

@pixelb
Copy link

pixelb commented Nov 17, 2025

@pixelb Would you add _selinux_required to tests relying on runcon and chcon at GNU? This is uutils's fault, but I have no idea better than it...

This would be confusing, as then folks may think selinux is required for basic runcon and chcon operation.
uutils has patches for gnu tests, so perhaps this would be an appropriate adjustment for there?

symlinking the binaries to false seems unusual BTW. Can you not just not have them present if they're no supported?

@oech3
Copy link
Contributor Author

oech3 commented Nov 17, 2025

Can you not just not have them present if they're no supported?

It causes another side effect at #9314 (comment)
I want to count runcon-no-reorder and runcon-compute as failed tests with SELINUX_ENABLED=0 since uutils does not have *con buildable without libselinux headers. @sylvestre Thoughts?

@oech3
Copy link
Contributor Author

oech3 commented Nov 18, 2025

Is this is breaking LD_PRELOAD test too?:
'libstdbuf.so' was not built with uutils, using the 'false' program.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/runcon/runcon-no-reorder is no longer failing!
Note: The gnu test tests/runcon/runcon-compute is now being skipped but was previously passing.

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/runcon/runcon-no-reorder is no longer failing!
Note: The gnu test tests/runcon/runcon-compute is now being skipped but was previously passing.

@oech3
Copy link
Contributor Author

oech3 commented Nov 23, 2025

coreutils/util/build-gnu.sh

Lines 238 to 239 in b37da0a

# Remove the check whether a util was built. Otherwise tests against utils like "arch" are not run.
sed -i "s|require_built_ |# require_built_ |g" init.cfg

?!

@sylvestre
Copy link
Contributor

GNU testsuite comparison:

Congrats! The gnu test tests/runcon/runcon-no-reorder is no longer failing!
Note: The gnu test tests/runcon/runcon-compute is now being skipped but was previously passing.

What is going on here?

@oech3
Copy link
Contributor Author

oech3 commented Nov 23, 2025 via email

@oech3
Copy link
Contributor Author

oech3 commented Nov 23, 2025

I guess runcon-no-reorder is no longer failing! means it was passing only with SELINUX_ENABLED=1 previously and failed with =0 with runcon=false and I just removed the wrong test.

I guess runcon-compute is now being skipped but was previously passing means it was passing on =0 with runcon=false (we should not consider it as passing).

@oech3 oech3 changed the title build-gnu.sh: Do not symlink missing bins to false (avoid false-negative) build-gnu.sh: Don't symlink missing bins to false and force enable disable tests Nov 24, 2025
@oech3 oech3 changed the title build-gnu.sh: Don't symlink missing bins to false and force enable disable tests build-gnu.sh: Don't symlink missing bins to false and force enable tests Nov 24, 2025
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Note: The gnu test tests/chcon/chcon-fail is now being skipped but was previously passing.
Note: The gnu test tests/runcon/runcon-compute is now being skipped but was previously passing.

@oech3
Copy link
Contributor Author

oech3 commented Nov 24, 2025

I merged #9455 to this PR. #9314 (comment) is natural result (for SELINUX_ENABLED=0) since GNU coreutils does not build *con in such situation.

Would you merge this?

@oech3
Copy link
Contributor Author

oech3 commented Nov 26, 2025

@pixelb You said

upstream
removed: arch,coreutils,hostname

So is test suite incomplete (invalid-opt) if uutils does not manually enable hostname too?

@pixelb
Copy link

pixelb commented Nov 26, 2025

@pixelb You said

upstream
removed: arch,coreutils,hostname

So is test suite incomplete (invalid-opt) if uutils does not manually enable hostname too?

Right. One needs to now manually enable arch,hostname,kill,uptime

@oech3
Copy link
Contributor Author

oech3 commented Nov 26, 2025

#9314 (comment) is useless for some case?

@pixelb
Copy link

pixelb commented Nov 26, 2025

#9314 (comment) is useless for some case?

Oh right, that's commented out. With that you wouldn't need to explicitly enable arch,kill,... in the build

@oech3
Copy link
Contributor Author

oech3 commented Nov 26, 2025

Thankyou. On the other hand, disabling every binaries with the sed broke test suite. It is unclear behaviro for me...

@oech3
Copy link
Contributor Author

oech3 commented Nov 28, 2025

I'll remake this after fixed getlimits things. While symlink missing bins to false is hacky, it should not be serious problem...

@oech3 oech3 closed this Nov 28, 2025
@oech3 oech3 deleted the patch-4 branch November 28, 2025 04:22
@oech3
Copy link
Contributor Author

oech3 commented Dec 9, 2025

@pixelb Would you add _selinux_required to tests relying on runcon and chcon at GNU? This is uutils's fault, but I have no idea better than it...

This would be confusing, as then folks may think selinux is required for basic runcon and chcon operation.

How about making(detatching) a basic operation or stub specific GNU test and marking _selinux_required other tests?
(I'm temporally opening a PR to force-add _selinux_required by sed )

@oech3
Copy link
Contributor Author

oech3 commented Dec 20, 2025

@pixelb Is it able to redesign runcon-compute.sh to block 'false' -> 'runcon' accidentary passing the test? It seems we cannot stop

coreutils/util/build-gnu.sh

Lines 108 to 116 in ef496b6

# Any binaries that aren't built become `false` to make tests failure
# Note that some test (e.g. runcon/runcon-compute.sh) incorrectly passes by this
for binary in $(./build-aux/gen-lists-of-programs.sh --list-progs); do
bin_path="${UU_BUILD_DIR}/${binary}"
test -f "${bin_path}" || {
echo "'${binary}' was not built with uutils, using the 'false' program"
cp "${UU_BUILD_DIR}/false" "${bin_path}"
}
done

since we inject uutils/coreutils to test suite's framework itself...

@pixelb
Copy link

pixelb commented Dec 20, 2025

@pixelb Is it able to redesign runcon-compute.sh to block 'false' -> 'runcon' accidentary passing the test?

Done in coreutils/coreutils@8f4a0095a

@oech3
Copy link
Contributor Author

oech3 commented Dec 20, 2025 via email

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.

3 participants