You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
1.4 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. msgtest 'Test run as' 'non-root'
  6. if [ "$(id -u)" = '0' ]; then
  7. msgskip 'root has by definition no problems accessing files'
  8. exit 0
  9. else
  10. msgpass
  11. fi
  12. setupenvironment
  13. configarchitecture "i386"
  14. setupaptarchive
  15. addtrap 'prefix' 'chmod a+x rootdir/var/lib/dpkg;'
  16. chmod a-x rootdir/var/lib/dpkg
  17. testsegfault() {
  18. msgtest "No segfault in" "$*"
  19. local TEST="$("$@" 2>&1 | grep -v 'E:')"
  20. if [ -z "$TEST" ]; then
  21. msgpass
  22. else
  23. echo
  24. echo "$TEST"
  25. msgfail
  26. fi
  27. }
  28. echo 'quiet 2;' > rootdir/etc/apt/apt.conf.d/00be-quiet
  29. testsegfault aptcache gencaches
  30. testsegfault aptcache showpkg
  31. testsegfault aptcache showsrc
  32. testsegfault aptcache stats
  33. testsegfault aptcache dump
  34. testsegfault aptcache dumpavail
  35. testsegfault aptcache unmet
  36. testsegfault aptcache search
  37. testsegfault aptcache show apt
  38. testsegfault aptcache depends apt
  39. testsegfault aptcache rdepends apt
  40. testsegfault aptcache pkgnames apt
  41. testsegfault aptcache dotty apt
  42. testsegfault aptcache xvcg apt
  43. testsegfault aptcache policy apt
  44. testsegfault aptget update
  45. testsegfault aptget upgrade
  46. testsegfault aptget dselect-upgrade
  47. testsegfault aptget dist-upgrade
  48. testsegfault aptget install apt
  49. testsegfault aptget remove apt
  50. testsegfault aptget purge apt
  51. testsegfault aptget source apt
  52. testsegfault aptget build-dep apt
  53. testsegfault aptget check
  54. testsegfault aptget clean
  55. testsegfault aptget autoclean
  56. testsegfault aptget autoremove