diff --git a/ci/test_nsncd.sh b/ci/test_nsncd.sh index 5858d7b..4be4d6c 100755 --- a/ci/test_nsncd.sh +++ b/ci/test_nsncd.sh @@ -16,6 +16,7 @@ for i in $(seq 1 100); do getent services 65000/udp || rc=1 getent services foo1/tcp || rc=1 getent services foo1/udp || rc=1 + getent services bufresize/tcp > /dev/null|| rc=1 netgroup trusted-machines || rc=1 getent netgroup trusted-machines || rc=1 innetgr -h machine1 trusted-machines || rc=1 diff --git a/ci/test_nspawn.sh b/ci/test_nspawn.sh index 1121dca..6240301 100755 --- a/ci/test_nspawn.sh +++ b/ci/test_nspawn.sh @@ -19,8 +19,18 @@ sudo sed '$ a netgroup: files' -i /etc/nsswitch.conf rc=0 sudo useradd nsncdtest -echo -e "foo1\t65000/tcp" | sudo tee -a /etc/services -echo -e "foo1\t65000/udp" | sudo tee -a /etc/services +cp /etc/services ./services + +# simple service lookups +echo -e "foo1\t65000/tcp" >> services +echo -e "foo1\t65000/udp" >> services +# huge service lookup to exercise buffer resize +echo -en "bufresize\t65001/tcp " >> services +for i in $(seq 1000); do echo -n "alias${i} "; done >> services +echo "" >> services +sudo mv services /etc/services + +tail -5 /etc/services echo -e "trusted-machines (machine1,user1,domain1), (machine2,user2,domain2), (machine3,user3,domain3)\n" | sudo tee -a /etc/netgroup # copy in and execute tests inside the chroot