Fibers 1.0.0 has a bug in run-fibers in which peer schedulers aren't destroyed - so if you had 4 cores, 1 would be destroyed when run-fibers returned, but the other 3 would stay around. Each scheduler uses 3 file descriptors, so for machines with many cores, this resource leak adds up quickly - quickly enough that the test suite can even fail because of it. See https://github.com/wingo/fibers/issues/36. This fixes that. It should be safe to destroy the peer schedulers at the given point because the threads that could be running them are all either dead or the current thread. As of May 21, 2020, this bug still existed in the 1.0.0 (latest) release and in git master. --- a/fibers.scm 2020-05-21 18:38:06.890690154 -0500 +++ b/fibers.scm 2020-05-21 18:38:56.395686693 -0500 @@ -137,5 +137,6 @@ (%run-fibers scheduler hz finished? affinity)) (lambda () (stop-auxiliary-threads scheduler))))) + (for-each destroy-scheduler (scheduler-remote-peers scheduler)) (destroy-scheduler scheduler) (apply values (atomic-box-ref ret)))))) a6b1a55869c488c0da15b4a7a8176d616ec92f8'>refslogtreecommitdiff
path: root/tests/guix-git-authenticate.sh
AgeCommit message (Expand)Author
2023-04-21tests: Fix checks for expected failures....Addresses <https://issues.guix.gnu.org/62406>. With 'set -e', a return status inverted with '!' does not cause the shell to exit immediately. Instead use '&& false' to indicate an expected failure. * tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment-container.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-home.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh, tests/guix-refresh.sh, tests/guix-shell.sh, tests/guix-style.sh, tests/guix-system.sh: Replace uses of '! ...' with '... && false' or `test ! ...` as appropriate. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Eric Bavier
2022-02-14git-authenticate: Ensure the target is a descendant of the introductory commit....Fixes a bug whereby authentication of a commit *not* descending from the introductory commit could succeed, provided the commit verifies the authorization invariant. In the example below, A is a common ancestor of the introductory commit I and of commit X. Authentication of X would succeed, even though it is not a descendant of I, as long as X is authorized according to the '.guix-authorizations' in A: X I \ / A This is because, 'authenticate-repository' would not check whether X descends from I, and the call (commit-difference X I) would return X. In practice that only affects forks because it means that ancestors of the introductory commit already contain a '.guix-authorizations' file. * guix/git-authenticate.scm (authenticate-repository): Add call to 'commit-descendant?'. * tests/channels.scm ("authenticate-channel, not a descendant of introductory commit"): New test. * tests/git-authenticate.scm ("authenticate-repository, target not a descendant of intro"): New test. * tests/guix-git-authenticate.sh: Expect earlier test to fail since 9549f0283a78fe36f2d4ff2a04ef8ad6b0c02604 is not a descendant of $intro_commit. Add new test targeting an ancestor of the introductory commit, and another test targeting the v1.2.0 commit. * doc/guix.texi (Specifying Channel Authorizations): Add a sentence. Ludovic Courtès