From f406c1c4b8e3d3df97510b2a85d062ebe4e4e1bc Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 8 Jun 2012 18:50:40 +0000 Subject: (test_exotic_medium_name) skip test when building as root in /root else File::Path::mkpath() in urpm::create_var_lib_rpm() tries to create directories in /root/rpmbuild/urpmi*/t/root (but as nobody), thus it stat every directory in $PWD, which fails (due to permissions!) then try to create them which fails (due to directory already existing) another solution would be to use a mkstemp()ed directory in TMPDIR... --- t/superuser--http.t | 5 +++++ 1 file changed, 5 insertions(+) (limited to 't/superuser--http.t') diff --git a/t/superuser--http.t b/t/superuser--http.t index cd934242..15f0694a 100644 --- a/t/superuser--http.t +++ b/t/superuser--http.t @@ -4,6 +4,7 @@ use strict; use lib '.', 't'; use helper; use Test::More 'no_plan'; +use Cwd 'getcwd'; need_root_and_prepare(); @@ -25,6 +26,10 @@ sub test { } sub test_exotic_medium_name { + if (getcwd() =~ m!^/root/!) { + warn "SKIPing test_exotic_medium_name() due to nobody having no access to /root/rpm*\n"; + return; + } my $medium_name = 'the medium (+name+)'; urpmi_addmedia("'$medium_name' $url/media/various"); -- cgit v1.2.1