]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-condition.c
test-condition: fix test_condition_test_group() (#6531)
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Sat, 5 Aug 2017 23:25:19 +0000 (00:25 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 5 Aug 2017 23:25:19 +0000 (19:25 -0400)
commitecaa5ad89f4c9832deb7d0cf7960f363a3c6f068
tree91ef729001b91b79c4d5562031528f83346a22ee
parentd7cefe8b2b236a8642aaffd0b782fa3323e6cefc
test-condition: fix test_condition_test_group() (#6531)

I hit a test failure with the `max_gid+1` test.  Problem is that we loop
over 0..r, but set `r` again within the loop (to 1).  So max_gid is only
set based on the first supplementary GID.

ConditionGroup=1000 → 1
ConditionGroup=4 → 1
ConditionGroup=adm → 1
ConditionGroup=1001 → 1
Assertion 'r == 0' failed at ../src/test/test-condition.c:462, function
test_condition_test_group(). Aborting.

$ id
uid=1000(alan-sysop) gid=1000(alan-sysop) groups=1000(alan-sysop),4(adm),
10(wheel),1001(sshlogin)
src/test/test-condition.c