diff options
Diffstat (limited to 'tests')
48 files changed, 335 insertions, 0 deletions
diff --git a/tests/apcupsd b/tests/apcupsd new file mode 100644 index 0000000..ef9bf02 --- /dev/null +++ b/tests/apcupsd @@ -0,0 +1,18 @@ +INITD=$@ +PROC=$INITD + apk_add $@ + /etc/init.d/$INITD start + sleep 1 + pidof $PROC + /etc/init.d/$INITD stop + count=0;\ + while pidof $PROC; do\ + echo -n "." >/dev/tty;\ + sleep 1;\ + count=$((count + 1));\ + if [ $$count -gt 5 ]; then\ + killall -9 apcupsd;\ + exit 1;\ + fi;\ + done + apk_del $@ diff --git a/tests/bridge-utils b/tests/bridge-utils new file mode 100644 index 0000000..b8c4215 --- /dev/null +++ b/tests/bridge-utils @@ -0,0 +1,7 @@ +NEED_MODULES=dummy + apk_add $@ + brctl addbr br0 + brctl addif br0 dummy0 + brctl show + brctl delbr br0 + apk_del $@ diff --git a/tests/bwm-ng b/tests/bwm-ng new file mode 100644 index 0000000..2d2f240 --- /dev/null +++ b/tests/bwm-ng @@ -0,0 +1,3 @@ + apk_add $@ + bwm-ng -c 2 -o plain + apk_del $@ diff --git a/tests/coreutils b/tests/coreutils new file mode 100644 index 0000000..0f49bcd --- /dev/null +++ b/tests/coreutils @@ -0,0 +1,5 @@ + apk_add $@ + /bin/uname -a + apk_del $@ + # verify uninstall fixes busybox links + [ `readlink /bin/cat` = /bin/busybox ] diff --git a/tests/cramfs b/tests/cramfs new file mode 100644 index 0000000..145216d --- /dev/null +++ b/tests/cramfs @@ -0,0 +1,4 @@ + apk_add $@ + mkcramfs .. tmp.img + apk_del $@ + rm -f tmp.img diff --git a/tests/cryptsetup b/tests/cryptsetup new file mode 100644 index 0000000..f197832 --- /dev/null +++ b/tests/cryptsetup @@ -0,0 +1,9 @@ + LOOP=/dev/loop1 + modprobe dm-crypt + apk_add $@ + dd if=/dev/zero of=luks.dsk bs=1024 count=2048 + losetup $LOOP luks.dsk + echo "testpassword" | cryptsetup luksFormat $LOOP -q + losetup -d $LOOP + rm luks.dsk + apk_del $@ diff --git a/tests/cups b/tests/cups new file mode 100644 index 0000000..2e39814 --- /dev/null +++ b/tests/cups @@ -0,0 +1,10 @@ +INITD=cupsd + apk_add $@ + /etc/init.d/$INITD start + pidof $INITD + /etc/init.d/$INITD stop + while pidof $INITD; do\ + echo -n "." >/dev/tty;\ + sleep 1;\ + done + apk_del $@ diff --git a/tests/debootstrap b/tests/debootstrap new file mode 100644 index 0000000..46c212b --- /dev/null +++ b/tests/debootstrap @@ -0,0 +1,3 @@ + apk_add $@ + debootstrap --help + apk_del $@ diff --git a/tests/dhclient b/tests/dhclient new file mode 100644 index 0000000..93b440e --- /dev/null +++ b/tests/dhclient @@ -0,0 +1,6 @@ + modprobe dummy + apk_add $@ + dhclient dummy0 + pidof dhclient + killall dhclient + apk_del $@ diff --git a/tests/dhcpcd b/tests/dhcpcd new file mode 100644 index 0000000..45ee8ef --- /dev/null +++ b/tests/dhcpcd @@ -0,0 +1,8 @@ + modprobe dummy + apk_add $@ + cp /etc/resolv.conf . + dhcpcd -t 1 dummy0 + pidof dhcpcd + killall dhcpcd + mv resolv.conf /etc + apk_del $@ diff --git a/tests/diffutils b/tests/diffutils new file mode 100644 index 0000000..b7e7b1f --- /dev/null +++ b/tests/diffutils @@ -0,0 +1,9 @@ + apk_add $@ + echo a > a + echo b > b + echo a > c + diff3 a b c + rm a b c + apk_del $@ + # check that bb link is restored + [ `readlink /usr/bin/diff` = /bin/busybox ] diff --git a/tests/dircproxy b/tests/dircproxy new file mode 100644 index 0000000..eadbf10 --- /dev/null +++ b/tests/dircproxy @@ -0,0 +1,3 @@ + apk_add $@ + dircproxy --version + apk_del $@ diff --git a/tests/distcc b/tests/distcc new file mode 100644 index 0000000..281aac1 --- /dev/null +++ b/tests/distcc @@ -0,0 +1,23 @@ +INITD=distccd +PKGS="$@ binutils uclibc-dev" + apk_add $PKGS + /etc/init.d/$INITD start + sleep 2 + pidof $INITD + echo -e '#include <stdio.h>\nint main() {\n\tputs("hello world"); return 0; }' > hello.c + cc -o hello hello.c + ./hello + rm hello + DISTCC_HOSTS="127.0.0.1:3632" distcc gcc -o hello hello.c + ./hello + readelf -d hello + sleep 3 + /etc/init.d/$INITD stop + count=0;\ + while pidof $INITD && [ $$count -lt 10 ]; do\ + echo -n "." >/dev/tty;\ + sleep 1;\ + count=$((count + 1));\ + done + apk_del $PKGS + diff --git a/tests/djbdns b/tests/djbdns new file mode 100644 index 0000000..06d9fd4 --- /dev/null +++ b/tests/djbdns @@ -0,0 +1,3 @@ + apk_add $@ + dnsname 127.0.0.1 + apk_del $@ diff --git a/tests/dnscache b/tests/dnscache new file mode 100644 index 0000000..e6e92ab --- /dev/null +++ b/tests/dnscache @@ -0,0 +1,10 @@ + apk_add $@ + /etc/init.d/$@ start + pidof $@ >/dev/null + /etc/init.d/$@ stop + i=10; while pidof $@; do \ + [ $i -eq 0 ] && exit 1; \ + i=$((i - 1)); \ + sleep 1; \ + done + apk_del $@ diff --git a/tests/dnsmasq b/tests/dnsmasq new file mode 100644 index 0000000..4c67048 --- /dev/null +++ b/tests/dnsmasq @@ -0,0 +1,11 @@ +INITD=$@ + apk_add $@ + /etc/init.d/$INITD start + sleep 2 + pidof $INITD + /etc/init.d/$INITD stop + while pidof $INITD; do\ + echo -n "." >/dev/tty;\ + sleep 1;\ + done + apk_del $@ diff --git a/tests/dspam b/tests/dspam new file mode 100644 index 0000000..f822549 --- /dev/null +++ b/tests/dspam @@ -0,0 +1,3 @@ + apk_add $@ + dspam --help + apk_del $@ diff --git a/tests/ebtables b/tests/ebtables new file mode 100644 index 0000000..7baa254 --- /dev/null +++ b/tests/ebtables @@ -0,0 +1,3 @@ + apk_add $@ + ebtables -L + apk_del $@ diff --git a/tests/ez-ipupdate b/tests/ez-ipupdate new file mode 100644 index 0000000..628c370 --- /dev/null +++ b/tests/ez-ipupdate @@ -0,0 +1,3 @@ + apk_add $@ + ez-ipupdate --version + apk_del $@ diff --git a/tests/fakeroot b/tests/fakeroot new file mode 100644 index 0000000..53d28cd --- /dev/null +++ b/tests/fakeroot @@ -0,0 +1,5 @@ + apk_add $@ + fakeroot ls + sleep 2 + ! pidof faked + apk_del $@ diff --git a/tests/ferm b/tests/ferm new file mode 100644 index 0000000..cb672b5 --- /dev/null +++ b/tests/ferm @@ -0,0 +1,3 @@ + apk_add $@ + echo "domain ip { chain INPUT { policy ACCEPT; } }" | ferm -n - + apk_del $@ diff --git a/tests/gnats b/tests/gnats new file mode 100644 index 0000000..eb6eb84 --- /dev/null +++ b/tests/gnats @@ -0,0 +1,3 @@ + apk_add $@ + query-pr -h + apk_del $@ diff --git a/tests/gnutls b/tests/gnutls new file mode 100644 index 0000000..06dbfe9 --- /dev/null +++ b/tests/gnutls @@ -0,0 +1,3 @@ + apk_add $@ + gnutls-cli --list + apk_del $@ diff --git a/tests/gross b/tests/gross new file mode 100644 index 0000000..52ba5fe --- /dev/null +++ b/tests/gross @@ -0,0 +1,12 @@ +INITD=grossd +PROC=$INITD + apk_add $@ + /etc/init.d/$INITD start + sleep 1 + pidof $PROC + /etc/init.d/$INITD stop + while pidof $PROC; do\ + echo -n "." >/dev/tty;\ + sleep 1;\ + done + apk_del $@ diff --git a/tests/hdparm b/tests/hdparm new file mode 100644 index 0000000..3cbe952 --- /dev/null +++ b/tests/hdparm @@ -0,0 +1,3 @@ + apk_add $@ + hdparm -i /dev/cdrom + apk_del $@ diff --git a/tests/imagemagick b/tests/imagemagick new file mode 100644 index 0000000..8324cf4 --- /dev/null +++ b/tests/imagemagick @@ -0,0 +1,3 @@ + apk_add $@ + convert -version + apk_del $@ diff --git a/tests/libtool b/tests/libtool new file mode 100644 index 0000000..3bc10d5 --- /dev/null +++ b/tests/libtool @@ -0,0 +1,3 @@ + apk_add $@ + libtool --version + apk_del $@ diff --git a/tests/linux-headers b/tests/linux-headers new file mode 100644 index 0000000..0291bff --- /dev/null +++ b/tests/linux-headers @@ -0,0 +1,5 @@ + apk_add $@ gcc binutils + echo -e "#include <linux/xfrm.h>\nint main(void){}" >test.c + PATH=${PATH}:/usr/i386-gentoo-linux-uclibc/binutils-bin/2.18 \ + gcc test.c + apk_del $@ gcc binutils diff --git a/tests/lsscsi b/tests/lsscsi new file mode 100644 index 0000000..9531096 --- /dev/null +++ b/tests/lsscsi @@ -0,0 +1,3 @@ + apk_add $@ + lsscsi + apk_del $@ diff --git a/tests/lvm2 b/tests/lvm2 new file mode 100644 index 0000000..72b2583 --- /dev/null +++ b/tests/lvm2 @@ -0,0 +1,18 @@ +LOOP=/dev/loop1 +LVDEV=/dev/testvg/testlv +NEED_MODULES=dm-mod + apk_add $@ + dd if=/dev/zero of=lvm2-test.dsk bs=1024 count=16384 + losetup $LOOP lvm2-test.dsk + pvcreate $LOOP + vgcreate testvg $LOOP + lvcreate -n testlv -L 3M testvg + /etc/init.d/lvm start + mkswap $LVDEV + swapon $LVDEV + free + swapoff $LVDEV + /etc/init.d/lvm stop + losetup -d $LOOP + rm lvm2-test.dsk + apk_del $@ diff --git a/tests/module-init-tools b/tests/module-init-tools new file mode 100644 index 0000000..24f15f5 --- /dev/null +++ b/tests/module-init-tools @@ -0,0 +1,10 @@ + apk_add $@ + lsmod + modinfo dummy + modprobe dummy + ip addr show dummy0 + modprobe -r dummy + apk_del $@ + # verify we have the busybox modprobe + [ "`readlink /sbin/insmod`" = /bin/busybox ] + modprobe dummy diff --git a/tests/mtx b/tests/mtx new file mode 100644 index 0000000..8d6c7ce --- /dev/null +++ b/tests/mtx @@ -0,0 +1,3 @@ + apk_add $@ + mtx --version 2>&1 | grep 'mtx version' + apk_del $@ diff --git a/tests/net-snmp b/tests/net-snmp new file mode 100644 index 0000000..fcb46b3 --- /dev/null +++ b/tests/net-snmp @@ -0,0 +1,12 @@ + apk_add $@ net-snmp-tools + sed 's:NETWORK/24:127.0.0.0/24:; s:COMMUNITY$$:public:' \ + < /etc/snmp/snmpd.conf.example >/etc/snmp/snmpd.conf + /etc/init.d/snmpd start + snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.2 + /etc/init.d/snmpd stop + i=10; while pidof snmpd; do \ + [ $i -eq 0 ] && exit 1; \ + $i=$((i - 1)); \ + sleep 1; \ + done + apk_del $@ net-snmp-tools diff --git a/tests/nmap b/tests/nmap new file mode 100644 index 0000000..6ffada9 --- /dev/null +++ b/tests/nmap @@ -0,0 +1,12 @@ + if [ -f /etc/inetd.conf ]; then\ + cp /etc/inetd.conf inetd.conf.backup;\ + fi + apk_add $@ + echo "telnet stream tcp nowait root /usr/sbin/in.telnetd telnetd" > /etc/inetd.conf + /etc/init.d/inetd start + nmap localhost | grep telnet + /etc/init.d/inetd stop + if [ -f inetd.conf.backup ]; then\ + mv inetd.conf.backup /etc/inetd.conf;\ + fi + apk_del $@ diff --git a/tests/openntpd b/tests/openntpd new file mode 100644 index 0000000..2a6b2c8 --- /dev/null +++ b/tests/openntpd @@ -0,0 +1,11 @@ + apk_add $@ + sed -i -e '/^NTPD_OPTS=.*/d' /etc/conf.d/ntpd + echo 'NTPD_OPTS="-s"' >> /etc/conf.d/ntpd + /etc/init.d/ntpd start + sleep 2 + pidof ntpd + /etc/init.d/ntpd stop + # verify that it really dies + sleep 2 + ! pidof ntpd + apk_del $@ diff --git a/tests/pax-utils b/tests/pax-utils new file mode 100644 index 0000000..9e01992 --- /dev/null +++ b/tests/pax-utils @@ -0,0 +1,3 @@ + apk_add $@ + scanelf /bin/busybox + apk_del $@ diff --git a/tests/postfix b/tests/postfix new file mode 100644 index 0000000..1cac087 --- /dev/null +++ b/tests/postfix @@ -0,0 +1,12 @@ + apk_add $@ mutt + /etc/init.d/$@ start + sleep 1 + pidof master + echo "hello" | mutt -s 'test' root + /etc/init.d/$@ stop + while pidof $@; do\ + echo -n "." >/dev/tty;\ + sleep 1;\ + done + test -f /etc/mime.types + apk_del $@ mutt diff --git a/tests/ppp b/tests/ppp new file mode 100644 index 0000000..c9b839c --- /dev/null +++ b/tests/ppp @@ -0,0 +1,3 @@ + apk_add $@ + pppd --version + apk_del $@ diff --git a/tests/rp-pppoe b/tests/rp-pppoe new file mode 100644 index 0000000..0dfd8c0 --- /dev/null +++ b/tests/rp-pppoe @@ -0,0 +1,3 @@ + apk_add $@ + pppoe -V + apk_del $@ diff --git a/tests/rrdcollect b/tests/rrdcollect new file mode 100644 index 0000000..6ef6e73 --- /dev/null +++ b/tests/rrdcollect @@ -0,0 +1,3 @@ + apk_add $@ + rrdcollect --version + apk_del $@ diff --git a/tests/sg3_utils b/tests/sg3_utils new file mode 100644 index 0000000..dfbc3e9 --- /dev/null +++ b/tests/sg3_utils @@ -0,0 +1,17 @@ +# some apps like sg_dd does not support -V option +BINS=sg_emc_trespass sg_format sg_get_config sg_ident sg_inq sg_logs sg_luns \ + sg_map sg_map26 sg_modes sg_opcodes sg_persist sg_prevent sg_raw \ + sg_rbuf sg_rdac sg_read_buffer sg_read_long sg_readcap sg_reassign \ + sg_requests sg_reset sg_rmsn sg_rtpg sg_safte sg_sat_identify \ + sg_sat_set_features sg_scan sg_senddiag sg_ses sg_start sg_stpg \ + sg_sync sg_test_rwbuf sg_turs sg_verify sg_vpd sg_wr_mode \ + sg_write_buffer sg_write_long + +NEED_MODULES=sg + +sg3_utils: + apk_add $@ + sg_scan + sginfo -l + for i in $(BINS); do $$i -V || break; done + apk_delete -R $@ diff --git a/tests/ssmtp b/tests/ssmtp new file mode 100644 index 0000000..4b05306 --- /dev/null +++ b/tests/ssmtp @@ -0,0 +1,3 @@ + apk_add $@ + sendmail -q + apk_del $@ diff --git a/tests/sysfsutils b/tests/sysfsutils new file mode 100644 index 0000000..e2b72b8 --- /dev/null +++ b/tests/sysfsutils @@ -0,0 +1,3 @@ + apk_add $@ + systool + apk_del $@ diff --git a/tests/tinyproxy b/tests/tinyproxy new file mode 100644 index 0000000..0249cb3 --- /dev/null +++ b/tests/tinyproxy @@ -0,0 +1,12 @@ + INITD=$@ + PROC=$INITD + apk_add $@ + /etc/init.d/$INITD start + sleep 1 + pidof $PROC + /etc/init.d/$INITD stop + while pidof $PROC; do\ + echo -n "." >/dev/tty;\ + sleep 1;\ + done + apk_del $@ diff --git a/tests/ulogd b/tests/ulogd new file mode 100644 index 0000000..f72604f --- /dev/null +++ b/tests/ulogd @@ -0,0 +1,12 @@ +INITD=$@ +PROC=$INITD + apk_add $@ + /etc/init.d/$INITD start + sleep 1 + pidof $PROC + /etc/init.d/$INITD stop + while pidof $PROC; do\ + echo -n "." >/dev/tty;\ + sleep 1;\ + done + apk_del $@ diff --git a/tests/usbutils b/tests/usbutils new file mode 100644 index 0000000..2bdb1f2 --- /dev/null +++ b/tests/usbutils @@ -0,0 +1,3 @@ + apk_add $@ + lsusb --version + apk_del $@ diff --git a/tests/valgrind b/tests/valgrind new file mode 100644 index 0000000..f3d2b0f --- /dev/null +++ b/tests/valgrind @@ -0,0 +1,6 @@ + apk_add $@ + soft=`cat /proc/sys/kernel/pax/softmode` + echo 1 > /proc/sys/kernel/pax/softmode + valgrind /bin/busybox && + echo $soft >/proc/sys/kernel/pax/softmode + apk_del $@ diff --git a/tests/zip b/tests/zip new file mode 100644 index 0000000..bf28358 --- /dev/null +++ b/tests/zip @@ -0,0 +1,5 @@ + apk_add zip + zip test.zip `ls` + unzip -p test.zip + apk_del zip + rm -f test.zip |