Skip to content
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

Add a specific test to exercise buffer resize #139

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/test_nsncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 13 additions & 3 deletions ci/test_nspawn.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

sudo debootstrap stable /stable-chroot http://deb.debian.org/debian/
sudo debootstrap stable /stable-chroot http://deb.debian.org/debian/ &> /dev/null
sudo dpkg -i nsncd*.deb

sdns="sudo systemd-nspawn --quiet --no-pager --bind-ro /var/run/nscd/socket:/var/run/nscd/socket -D /stable-chroot"
Expand All @@ -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
Expand Down
Loading