Ondřej Vašík wrote: > I'm trying to package coreutils-8.1 for Fedora Rawhide, but few tests > are failing > ( http://koji.fedoraproject.org/koji/getfile?taskID=1819634&name=build.log ). > I removed all Fedora-only patches to prevent patch-related issues. Koji > build system uses mock build hosted on machine with old RHEL-5 xen > kernel, so this may be the culprit of the issues. Generally there are > two issues - > 1) test 126 = 127 ... koji kernel seems to return EXIT_CANNOT_INVOKE > (126) exit code in cases where EXIT_ENOENT (127) is expected by > testsuite.
Hi Ondřej, Thanks for the report. For the 126 vs 127 problems, it looks like execvp is failing with errno != ENOENT. I.e., when you run "env no_such", we expect execvp to fail with errno == ENOENT, and hence env should exit with EXIT_ENOENT (127). Since it's actually exiting with status of 126, execvp must be failing with some other errno value. ... execvp (argv[optind], &argv[optind]); { int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); error (0, errno, "%s", argv[optind]); exit (exit_status); } Can you strace it? That would show the unexpected errno value. Here are the definitions from src/system.h: /* Exit statuses for programs like 'env' that exec other programs. */ enum { ... EXIT_CANNOT_INVOKE = 126, /* Program located, but not usable. */ EXIT_ENOENT = 127 /* Could not find program to exec. */ };