test_true (pkgcore.test.restrictions.test_restriction.AlwaysBoolTest) ... ok test_basic (pkgcore.test.restrictions.test_restriction.AnyMatchTest) ... ok test_base (pkgcore.test.restrictions.test_restriction.BaseTest) ... ok test_it (pkgcore.test.restrictions.test_restriction.BaseTest) ... ok ====================================================================== ERROR: test_sandbox (pkgcore.test.test_spawn.SpawnTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 171, in run self.forced_extra_frame(testMethod) File "/usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 140, in forced_extra_frame test() File "/var/tmp/portage/sys-apps/pkgcore-0.4.4/work/pkgcore-0.4.4/pkgcore/test/test_spawn.py", line 76, in test_sandbox fp, spawn_type=spawn.spawn_sandbox)[1][0].split(":")]) IndexError: list index out of range ====================================================================== ERROR: test_sandbox_empty_dir (pkgcore.test.test_spawn.SpawnTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 171, in run self.forced_extra_frame(testMethod) File "/usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 140, in forced_extra_frame test() File "/var/tmp/portage/sys-apps/pkgcore-0.4.4/work/pkgcore-0.4.4/pkgcore/test/test_spawn.py", line 100, in test_sandbox_empty_dir fp, spawn_type=spawn.spawn_sandbox, chdir='/')[1][0].split(":")]) IndexError: list index out of range ---------------------------------------------------------------------- Ran 848 tests in 16.369s FAILED (errors=2) * * ERROR: sys-apps/pkgcore-0.4.4 failed. * Call stack: * ebuild.sh, line 49: Called src_test * environment, line 2417: Called die * The specific snippet of code: * "${python}" setup.py test || die "testing returned non zero" * The die message: * testing returned non zero emerge --info Portage 2.1.5_rc2 (default-linux/amd64/2007.0, gcc-4.2.3, glibc-2.7-r2, 2.6.25-rc8-00205-gff09e2a x86_64) ================================================================= System uname: 2.6.25-rc8-00205-gff09e2a x86_64 AMD Athlon(tm) 64 Processor 3200+ Timestamp of tree: Unknown distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.5 dev-lang/python: 2.5.1-r5 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.12 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.24 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe -g -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=athlon64 -O2 -pipe -g -ggdb" DISTDIR="/share/gentoo/distfiles" FEATURES="buildsyspkg ccache collision-protect cvs distcc distlocks fixpackages installsources metadata-transfer multilib-strict parallel-fetch sandbox sfperms sign splitdebug strict test unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/" LANG="en_US.utf8" LDFLAGS="-Wl,--as-needed" LINGUAS="en fr en_US" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage_cvs/gentoo-x86" PORTDIR_OVERLAY="/usr/local/portage /share/overlay" SYNC="cvs://aballier@cvs.gentoo.org:/var/cvsroot" USE="3dnow 3dnowext X a52 aac aalib acl alsa amd64 apache2 asf audiofile authdaemond bash-completion berkdb bluetooth bogofilter browserplugin bzip2 cairo caps cddb cdio cdr cjk cli cracklib crypt css cups curl custom-cflags cvs dba dbus dirac djvu dri dssi dts dv dvb dvd dvdnav dvdr dvdread dvi emerald enca encode escreen evo exif expat fam fame fat fbdev ffmpeg fftw firefox flac fltk fluidsynth fontconfig foomaticdb fortran fping freesound ftp gd gdbm gif gimp glib glitz gnokii gnome gnutls gpac gpgme gpm graphviz gs gstreamer gtk gtkhtml hal hfs icecast iconv id3tag ide ieee1394 imagemagick imap imlib ipv6 irmc isdnlog ithreads jack jadetex javascript jfs jpeg jpeg2k kdeenablefinal kdehiddenvisibility kerberos kpathsea ladcca ladspa lame lash latex lcms ldap libcaca libgcrypt libnotify libsamplerate libssh2 live lzma lzo mad maildir matroska mbox md5sum midi mikmod mjpeg mmx mmxext mng modplug mono motif mozilla mp2 mp3 mp4 mpeg mplayer mudflap musepack musicbrainz nautilus ncurses network nfs nls nntp no-old-linux nodrm nowin nptl nptlonly nsplugin ntfs nvidia objc ocaml ocamlopt offensive ogg oggvorbis openal openexr opengl openmp osc pam pango pcre pda pdf perl png pnm portaudio postgres ppds pppd pulseaudio python qt3 qt4 quicktime radio rar readline reflection reiser4 reiserfs rle rtc rtsp ruby sasl sdl session shorten slang sms sndfile softmmu soundtouch sox spamassassin speex spell spl sqlite3 srt sse sse2 ssl stroke subtitles subversion svg sysfs t1lib tcl tcpd test tetex tex4ht tga theora threads tiff tk truetype twolame udev unicode urandom usb v4l v4l2 vcd vchroot vim-syntax visualization vorbis wavpack wmf wxwindows x264 xcb xfs xine xinerama xml xorg xpm xprint xulrunner xv xvid xvmc zlib zvbi" ALSA_CARDS="bt87x intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" DVB_CARDS="usb-umt" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr en_US" LIRC_DEVICES="pctv" USERLAND="GNU" VIDEO_CARDS="vesa nv v4l nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I have the test_sandbox_empty_dir failure still in 0.4.7.2
Please try with 0.4.7.4, and either respond here or http://www.pkgcore.org/trac/pkgcore/ticket/195 please. 0.4.7.4 has updated test code for it; the failure is pretty nonobvious, thus the release w/ a tweaked test for more info.
====================================================================== ERROR: test_sandbox_empty_dir (pkgcore.test.test_spawn.SpawnTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/snakeoil/test/__init__.py", line 171, in run self.forced_extra_frame(testMethod) File "/usr/lib/python2.5/site-packages/snakeoil/test/__init__.py", line 140, in forced_extra_frame test() File "/home/sda8/tmp/portage/sys-apps/pkgcore-0.4.7.4/work/pkgcore-0.4.7.4/pkgcore/test/test_spawn.py", line 102, in test_sandbox_empty_dir fp, spawn_type=spawn.spawn_sandbox, chdir='/')[1][0].split(":")]) IndexError: list index out of range ====================================================================== FAIL: test_sandbox (pkgcore.test.test_spawn.SpawnTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/snakeoil/test/__init__.py", line 171, in run self.forced_extra_frame(testMethod) File "/usr/lib/python2.5/site-packages/snakeoil/test/__init__.py", line 140, in forced_extra_frame test() File "/home/sda8/tmp/portage/sys-apps/pkgcore-0.4.7.4/work/pkgcore-0.4.7.4/pkgcore/test/test_spawn.py", line 76, in test_sandbox "location %s" % (ret[0], fp)) AssertionError: no output; exit code was 1; script location /home/sda8/tmp/portage/sys-apps/pkgcore-0.4.7.4/temp/tmpZA8cT7/pkgcore-spawn-sandbox.sh ---------------------------------------------------------------------- Ran 858 tests in 19.446s FAILED (failures=1, errors=1) * * ERROR: sys-apps/pkgcore-0.4.7.4 failed.
ought to be fixed via 0.4.7.5; there is an odd variation in sandbox willingness to execute one of the test files, forcing a shebang fixed it when testing for leio; said tweak was released in 0.4.7.5, so ought to be dead.
Close please, issue has been fixed for a while now (issue was lack of a shebang in the generated test script).
Fixed in all but the oldest version which won't be around long, closing.
back again in 0.4.7.14 test_it (pkgcore.test.restrictions.test_restriction.BaseTest) ... ok ====================================================================== FAIL: test_sandbox (pkgcore.test.test_spawn.SpawnTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "//usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 171, in run self.forced_extra_frame(testMethod) File "//usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 140, in forced_extra_frame test() File "/var/tmp/portage/sys-apps/pkgcore-0.4.7.14/work/pkgcore-0.4.7.14/pkgcore/test/test_spawn.py", line 81, in test_sandbox ret[1][0].split(":")]) File "//usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 115, in assertIn needle in haystack, reason or '%r not in %r' % (needle, haystack)) AssertionError: 'libsandbox.so' not in ['libsandbox.so libsandbox.so'] ====================================================================== FAIL: test_sandbox_empty_dir (pkgcore.test.test_spawn.SpawnTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "//usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 171, in run self.forced_extra_frame(testMethod) File "//usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 140, in forced_extra_frame test() File "/var/tmp/portage/sys-apps/pkgcore-0.4.7.14/work/pkgcore-0.4.7.14/pkgcore/test/test_spawn.py", line 105, in test_sandbox_empty_dir fp, spawn_type=spawn.spawn_sandbox, chdir='/')[1][0].split(":")]) File "//usr/lib64/python2.5/site-packages/snakeoil/test/__init__.py", line 115, in assertIn needle in haystack, reason or '%r not in %r' % (needle, haystack)) AssertionError: 'libsandbox.so' not in ['libsandbox.so libsandbox.so'] ---------------------------------------------------------------------- Ran 874 tests in 7.532s FAILED (failures=2) Portage 2.2_rc20 (default/linux/amd64/2008.0/developer, gcc-4.3.2, glibc-2.9_p20081201-r1, 2.6.28-gentoo x86_64) ================================================================= System uname: Linux-2.6.28-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-glibc2.2.5 Timestamp of tree: Thu, 08 Jan 2009 03:00:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p48 dev-java/java-config: 1.3.7-r1, 2.1.6-r1 dev-lang/python: 2.5.2-r8 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.2-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.1-r1 sys-apps/sandbox: 1.3.2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.28-r1 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -march=core2 -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O3 -march=core2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache collision-protect cvs digest distlocks fixpackages metadata-transfer multilib-strict parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict test unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.mirrors.tera-byte.com/ http://gentoo.osuosl.org http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,--as-needed,--hash-style=gnu" LINGUAS="en en_US" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/home/dirtyepic/overlay /home/dirtyepic/dev/svn/dirtyepic /home/dirtyepic/dev/svn/gcc-porting" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acpi akode alsa amd64 aspell audiofile avahi bash-completion berkdb bzip2 cairo cdaudio cdr chm cleartype cli consolekit cracklib crypt css cups curl cvs dbus divx dri dts dvd dvdr dvdread eds emboss encode evo exif expat fam ffmpeg fftw firefox3 flac fontconfig foomaticdb gdbm geos gif gimp glib glw gmedia gmp gpgme gphoto2 gstreamer gtk hal hdaps howl-compat hpn htmlhandbook iconv id3tag imap imlib inotify ipw4965 isdnlog javascript jpeg kde kdeenablefinal kdehiddenvisibility lame laptop libwww lzma mad mdnsresponder-compat midi mikmod mmap mmx mozilla mp3 mpeg multilib ncurses network-cron nntp nptl nptlonly nsplugin ogg opengl openmp pam pch pcre pdf pic png pop ppds pppd pth qt3 qt3support qt4 quicktime readline reflection rtc sasl session smapi smime smp smtp sndfile spell spl sql srt sse sse2 ssl ssse3 startup-notification subversion svg sysfs taglib tcpd theora threads threadsafe tiff truetype unicode urandom usb utempter vim-syntax vorbis wifi wmp wxwindows x264 xcb xcomposite xine xml xorg xpm xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Previously, triggering a sandbox w/in a sandbox (say doing sandbox specific tests during a sandboxes test phase) would properly collapse LD_PRELOAD down into a single libsandbox.so entry. CC'ing sandbox due to the issue from above. As for pkgcore failing, it was written assuming ':' was the seperator. Checking the docs, at least now space seperation is the norm- thus the test needs updating.
Created attachment 180362 [details] convert LD_PRELOAD splitting to whitespace Should fix all >0.4.7.4 versions, including the recent 0.4.7.15
(In reply to comment #8) > Previously, triggering a sandbox w/in a sandbox (say doing sandbox specific > tests during a sandboxes test phase) would properly collapse LD_PRELOAD down > into a single libsandbox.so entry. > > CC'ing sandbox due to the issue from above. Bleh, sorry, I wasn't clear- for >=1.3 versions of sandbox it now appends another libsandbox.so entry onto LD_PRELOAD despite the entry already existing. A quick check of the exec wrapper, this is likely a regression in sandbox since it looks like it's trying to ensure uniqueness (yet my tests are showing otherwise).
+ 31 Jan 2009; Patrick Lauer <patrick@gentoo.org> + +files/pkgcore-sandbox.patch, +pkgcore-0.4.7.15-r1.ebuild: + Fixing test failure, patch by Brian Harring. Fixes #216942 Fixed with .15-r1
documentation suggests LD_PRELOAD has always been whitespace separated. check out ld.so(8).
(In reply to comment #12) > documentation suggests LD_PRELOAD has always been whitespace separated. check > out ld.so(8). Yep. the patch attached makes it parse based on whitespace- the exec wrappers prefixing LD_PRELOAD w/ libsandbox when it's already there is why I cc'd y'all, that's a regression from 1.28 (and only spotted since I screwed up the delimiting in the pkgcore test that verifies this).
yeah, it probably is a regression, but i dont think it makes any real difference. glibc should only load libsandbox.so once. i'll look at it eventually though, thanks.
Brian: what exactly is your reduced test case ? i havent been able to make sandbox create multiple entries in LD_PRELOAD and ive looked through the exec code and it looks sane to me ... $ env env env env | grep LD_PRELOAD LD_PRELOAD=libsandbox.so $ env env env -uLD_PRELOAD env | grep LD_PRELOAD LD_PRELOAD=libsandbox.so $ env env LD_PRELOAD=/usr/lib/libsandbox.so env env | grep LD_PRELOAD LD_PRELOAD=/usr/lib/libsandbox.so
nm, found it ./src/sandbox.sh ./src/sandbox.sh env | grep LD_PRELOAD it isnt strictly a regression ... older sandboxes did not allow for recursion and so sandbox.c itself didnt check for LD_PRELOAD already being set. it would always append stuff. fixed in git, thanks
http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commitdiff;h=12e00f1199e029554ed250fea1f6c95ca62baf2b