From: Heiko Schlittermann (HS12-RIPE) Date: Wed, 23 Nov 2016 16:36:26 +0000 (+0100) Subject: Testsuite: show output from failed exim -d -bP exim_user X-Git-Tag: exim-4_88_RC6~22 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/109ad60f4d0f4cf43d9dec72fc6eeb3c20d0f062 Testsuite: show output from failed exim -d -bP exim_user --- diff --git a/test/runtest b/test/runtest index 088c742be..d9500cb5f 100755 --- a/test/runtest +++ b/test/runtest @@ -2612,10 +2612,10 @@ close(IN); close(OUT); print("Probing with config file: $parm_cwd/test-config\n"); -open(EXIMINFO, "$parm_exim -d -C $parm_cwd/test-config -DDIR=$parm_cwd " . - "-bP exim_user exim_group 2>&1|") || - die "** Cannot run $parm_exim: $!\n"; -while() +my $eximinfo = "$parm_exim -d -C $parm_cwd/test-config -DDIR=$parm_cwd -bP exim_user exim_group"; +chomp(my @eximinfo = `$eximinfo 2>&1`); +die "$0: got $? from $eximinfo\n" if $?; +foreach (@eximinfo) { if (my ($version) = /^Exim version (\S+)/) { my $git = `git describe --dirty=-XX --match 'exim-4*'`; @@ -2641,21 +2641,21 @@ ___ if /^Configure owner:\s*(\d+):(\d+)/; print if /wrong owner/; } -close(EXIMINFO); -if (defined $parm_eximuser) - { - if ($parm_eximuser =~ /^\d+$/) { $parm_exim_uid = $parm_eximuser; } - else { $parm_exim_uid = getpwnam($parm_eximuser); } - } -else - { - print "Unable to extract exim_user from binary.\n"; - print "Check if Exim refused to run; if so, consider:\n"; - print " TRUSTED_CONFIG_LIST ALT_CONFIG_PREFIX WHITELIST_D_MACROS\n"; - print "If debug permission denied, are you in the exim group?\n"; - die "Failing to get information from binary.\n"; - } +if (not defined $parm_eximuser) { + die <