+2015-06-19 Joseph Myers <joseph@codesourcery.com>
+
+ * conform/conformtest.pl ($xerrors): New variable.
+ (note_error): New function.
+ (compiletest): New argument $xfail. Use not_error.
+ (runtest): Likewise.
+ (top level): Handle xfail- lines. Update calls to compiletest and
+ runtest. Handle xfail- and optional- in headers listed with
+ allow-header.
+ * conform/data/fcntl.h-data (O_TTY_INIT): Use xfail-.
+ (O_EXEC): Likewise.
+ (O_SEARCH): Likewise.
+ * conform/data/stropts.h-data (ioctl): Likewise.
+ * conform/data/sys/ipc.h-data (ipc_perm.mode): Likewise.
+ * conform/data/sys/sem.h-data (semid_ds.sem_nsems): Likewise.
+ * conform/data/sys/socket.h-data (msghdr.msg_iovlen): Likewise.
+ (msghdr.msg_controllen): Likewise.
+ (cmsghdr.cmsg_len): Likewise.
+ * conform/data/utmpx.h-data (utmpx.ut_tv): Likewise.
+ * conform/Makefile (test-xfail-XPG3/sys/ipc.h/conform): Remove
+ variable.
+ (test-xfail-XPG3/sys/sem.h/conform): Likewise.
+ (test-xfail-XPG4/stropts.h/conform): Likewise.
+ (test-xfail-XPG4/sys/ipc.h/conform): Likewise.
+ (test-xfail-XPG4/sys/sem.h/conform): Likewise.
+ (test-xfail-XPG4/sys/socket.h/conform): Likewise.
+ (test-xfail-UNIX98/stropts.h/conform): Likewise.
+ (test-xfail-UNIX98/sys/ipc.h/conform): Likewise.
+ (test-xfail-UNIX98/sys/sem.h/conform): Likewise.
+ (test-xfail-UNIX98/sys/socket.h/conform): Likewise.
+ (test-xfail-XOPEN2K/stropts.h/conform): Likewise.
+ (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise.
+ (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise.
+ (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise.
+ (test-xfail-XOPEN2K/utmpx.h/conform): Likewise.
+ (test-xfail-POSIX2008/fcntl.h/conform): Likewise.
+ (test-xfail-POSIX2008/stropts.h/conform): Likewise.
+ (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise.
+ (test-xfail-XOPEN2K8/stropts.h/conform): Likewise.
+ (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise.
+ (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise.
+ (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise.
+
2015-06-19 Andrew Senkevich <andrew.senkevich@intel.com>
* sysdeps/ieee754/ldbl-opt/s_sin.c (__DECL_SIMD_sincos_disable,
test-xfail-XPG3/stdio.h/conform = yes
test-xfail-XPG3/stdlib.h/conform = yes
test-xfail-XPG3/string.h/conform = yes
-test-xfail-XPG3/sys/ipc.h/conform = yes
-test-xfail-XPG3/sys/sem.h/conform = yes
test-xfail-XPG3/sys/stat.h/conform = yes
test-xfail-XPG3/sys/types.h/conform = yes
test-xfail-XPG3/sys/wait.h/conform = yes
test-xfail-XPG4/signal.h/conform = yes
test-xfail-XPG4/stdio.h/conform = yes
test-xfail-XPG4/stdlib.h/conform = yes
-test-xfail-XPG4/stropts.h/conform = yes
-test-xfail-XPG4/sys/ipc.h/conform = yes
-test-xfail-XPG4/sys/sem.h/conform = yes
-test-xfail-XPG4/sys/socket.h/conform = yes
test-xfail-XPG4/sys/stat.h/conform = yes
test-xfail-XPG4/sys/time.h/conform = yes
test-xfail-XPG4/sys/types.h/conform = yes
test-xfail-UNIX98/signal.h/conform = yes
test-xfail-UNIX98/stdio.h/conform = yes
test-xfail-UNIX98/stdlib.h/conform = yes
-test-xfail-UNIX98/stropts.h/conform = yes
-test-xfail-UNIX98/sys/ipc.h/conform = yes
-test-xfail-UNIX98/sys/sem.h/conform = yes
-test-xfail-UNIX98/sys/socket.h/conform = yes
test-xfail-UNIX98/sys/time.h/conform = yes
test-xfail-UNIX98/sys/wait.h/conform = yes
test-xfail-UNIX98/ucontext.h/conform = yes
test-xfail-XOPEN2K/signal.h/conform = yes
test-xfail-XOPEN2K/stdarg.h/conform = yes
test-xfail-XOPEN2K/stdio.h/conform = yes
-test-xfail-XOPEN2K/stropts.h/conform = yes
-test-xfail-XOPEN2K/sys/ipc.h/conform = yes
-test-xfail-XOPEN2K/sys/sem.h/conform = yes
-test-xfail-XOPEN2K/sys/socket.h/conform = yes
test-xfail-XOPEN2K/sys/wait.h/conform = yes
test-xfail-XOPEN2K/termios.h/conform = yes
test-xfail-XOPEN2K/tgmath.h/conform = yes
test-xfail-XOPEN2K/ucontext.h/conform = yes
-test-xfail-XOPEN2K/utmpx.h/conform = yes
test-xfail-POSIX2008/arpa/inet.h/conform = yes
-test-xfail-POSIX2008/fcntl.h/conform = yes
test-xfail-POSIX2008/netdb.h/conform = yes
test-xfail-POSIX2008/netinet/in.h/conform = yes
test-xfail-POSIX2008/signal.h/conform = yes
-test-xfail-POSIX2008/stropts.h/conform = yes
test-xfail-POSIX2008/sys/socket.h/conform = yes
test-xfail-POSIX2008/sys/wait.h/conform = yes
-test-xfail-XOPEN2K8/fcntl.h/conform = yes
test-xfail-XOPEN2K8/limits.h/conform = yes
test-xfail-XOPEN2K8/math.h/conform = yes
test-xfail-XOPEN2K8/signal.h/conform = yes
test-xfail-XOPEN2K8/stdio.h/conform = yes
-test-xfail-XOPEN2K8/stropts.h/conform = yes
-test-xfail-XOPEN2K8/sys/ipc.h/conform = yes
test-xfail-XOPEN2K8/sys/select.h/conform = yes
-test-xfail-XOPEN2K8/sys/sem.h/conform = yes
-test-xfail-XOPEN2K8/sys/socket.h/conform = yes
test-xfail-XOPEN2K8/sys/time.h/conform = yes
test-xfail-XOPEN2K8/sys/wait.h/conform = yes
test-xfail-XOPEN2K8/termios.h/conform = yes
$total = 0;
$skipped = 0;
$errors = 0;
+$xerrors = 0;
+
+sub note_error {
+ my($xfail) = @_;
+ if ($xfail) {
+ $xerrors++;
+ printf ("Ignoring this failure.\n");
+ } else {
+ $errors++;
+ }
+}
sub poorfnmatch {
sub compiletest
{
- my($fnamebase, $msg, $errmsg, $skip, $optional) = @_;
+ my($fnamebase, $msg, $errmsg, $skip, $optional, $xfail) = @_;
my($result) = $skip;
my($printlog) = 0;
printf (" $errmsg Compiler message:\n");
$printlog = 1;
}
- ++$errors;
+ note_error($xfail);
$result = 1;
}
} else {
sub runtest
{
- my($fnamebase, $msg, $errmsg, $skip) = @_;
+ my($fnamebase, $msg, $errmsg, $skip, $xfail) = @_;
my($result) = $skip;
my($printlog) = 0;
printf (" $errmsg Compiler message:\n");
$printlog = 1;
}
- ++$errors;
+ note_error($xfail);
$result = 1;
} else {
# Now run the program. If the exit code is not zero something is wrong.
}
} else {
printf (" FAIL\n");
- ++$errors;
+ note_error($xfail);
$printlog = 1;
unlink "$fnamebase.out";
rename "$fnamebase.out2", "$fnamebase.out";
close (TESTFILE);
$missing = compiletest ($fnamebase, "Checking whether <$h> is available",
- "Header <$h> not available", 0, 0);
+ "Header <$h> not available", 0, 0, 0);
printf ("\n");
last control if ($missing);
}
+ my($xfail) = 0;
+ if (/^xfail-/) {
+ s/^xfail-//;
+ $xfail = 1;
+ }
my($optional) = 0;
if (/^optional-/) {
s/^optional-//;
($optional
? "NOT AVAILABLE."
: "Member \"$member\" not available."), $res,
- $optional);
+ $optional, $xfail);
if ($res == 0 || $missing != 0 || !$optional) {
# Test the types of the members.
compiletest ($fnamebase, "Testing for type of member $member",
"Member \"$member\" does not have the correct type.",
- $res, 0);
+ $res, 0, $xfail);
}
} elsif (/^(macro|constant|macro-constant|macro-int-constant) +([a-zA-Z0-9_]*) *(?:{([^}]*)} *)?(?:([>=<!]+) ([A-Za-z0-9_\\'-]*))?/) {
my($symbol_type) = $1;
($optional
? "NOT PRESENT"
: "Macro \"$symbol\" is not available."), $res,
- $optional);
+ $optional, $xfail);
}
if ($symbol_type =~ /constant/) {
($optional
? "NOT PRESENT"
: "Constant \"$symbol\" not available."), $res,
- $optional);
+ $optional, $xfail);
}
$res = $res || $mres || $cres;
close (TESTFILE);
runtest ($fnamebase, "Testing for #if usability of symbol $symbol",
- "Symbol \"$symbol\" not usable in #if.", $res);
+ "Symbol \"$symbol\" not usable in #if.", $res, $xfail);
}
if (defined ($type) && ($res == 0 || !$optional)) {
compiletest ($fnamebase, "Testing for type of symbol $symbol",
"Symbol \"$symbol\" does not have the correct type.",
- $res, 0);
+ $res, 0, $xfail);
}
if (defined ($op) && ($res == 0 || !$optional)) {
close (TESTFILE);
$res = runtest ($fnamebase, "Testing for value of symbol $symbol",
- "Symbol \"$symbol\" has not the right value.", $res);
+ "Symbol \"$symbol\" has not the right value.", $res,
+ $xfail);
}
} elsif (/^symbol *([a-zA-Z0-9_]*) *([A-Za-z0-9_-]*)?/) {
my($symbol) = $1;
close (TESTFILE);
$res = compiletest ($fnamebase, "Testing for symbol $symbol",
- "Symbol \"$symbol\" not available.", $res, 0);
+ "Symbol \"$symbol\" not available.", $res, 0, $xfail);
if ($value ne "") {
# Generate a program to test for the value of this constant.
close (TESTFILE);
$res = runtest ($fnamebase, "Testing for value of symbol $symbol",
- "Symbol \"$symbol\" has not the right value.", $res);
+ "Symbol \"$symbol\" has not the right value.", $res,
+ $xfail);
}
} elsif (/^type *({([^}]*)|([a-zA-Z0-9_]*))/) {
my($type) = "$2$3";
compiletest ($fnamebase, "Testing for type $type",
($optional
? "NOT AVAILABLE"
- : "Type \"$type\" not available."), $missing, $optional);
+ : "Type \"$type\" not available."), $missing, $optional,
+ $xfail);
} elsif (/^tag *({([^}]*)|([a-zA-Z0-9_]*))/) {
my($type) = "$2$3";
close (TESTFILE);
compiletest ($fnamebase, "Testing for type $type",
- "Type \"$type\" not available.", $missing, 0);
+ "Type \"$type\" not available.", $missing, 0, $xfail);
} elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) {
my($rettype) = "$2$3";
my($fname) = "$4";
($optional
? "NOT AVAILABLE"
: "Function \"$fname\" is not available."), $res,
- $optional);
+ $optional, $xfail);
if ($res == 0 || $missing == 1 || !$optional) {
# Generate a program to test for the type of this function.
close (TESTFILE);
compiletest ($fnamebase, "Test for type of function $fname",
- "Function \"$fname\" has incorrect type.", $res, 0);
+ "Function \"$fname\" has incorrect type.", $res, 0,
+ $xfail);
}
} elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
my($rettype) = "$2$3";
($optional
? "NOT AVAILABLE"
: "Function \"$fname\" is not available."), $res,
- $optional);
+ $optional, $xfail);
if ($res == 0 || $missing != 0 || !$optional) {
# Generate a program to test for the type of this function.
close (TESTFILE);
compiletest ($fnamebase, "Test for type of function $fname",
- "Function \"$fname\" has incorrect type.", $res, 0);
+ "Function \"$fname\" has incorrect type.", $res, 0,
+ $xfail);
}
} elsif (/^variable *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) *(.*)/) {
my($type) = "$2$3";
close (TESTFILE);
$res = compiletest ($fnamebase, "Test availability of variable $vname",
- "Variable \"$vname\" is not available.", $res, 0);
+ "Variable \"$vname\" is not available.", $res, 0,
+ $xfail);
# Generate a program to test for the type of this function.
open (TESTFILE, ">$fnamebase.c");
close (TESTFILE);
compiletest ($fnamebase, "Test for type of variable $fname",
- "Variable \"$vname\" has incorrect type.", $res, 0);
+ "Variable \"$vname\" has incorrect type.", $res, 0, $xfail);
} elsif (/^macro-function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
my($rettype) = "$2$3";
my($fname) = "$4";
close (TESTFILE);
$res = compiletest ($fnamebase, "Test availability of macro $fname",
- "Function \"$fname\" is not available.", $res, 0);
+ "Function \"$fname\" is not available.", $res, 0,
+ $xfail);
# Generate a program to test for the type of this function.
open (TESTFILE, ">$fnamebase.c");
close (TESTFILE);
compiletest ($fnamebase, "Test for type of macro $fname",
- "Function \"$fname\" has incorrect type.", $res, 0);
+ "Function \"$fname\" has incorrect type.", $res, 0, $xfail);
} elsif (/^macro-str *([^ ]*) *(\".*\")/) {
# The above regex doesn't handle a \" in a string.
my($macro) = "$1";
close (TESTFILE);
compiletest ($fnamebase, "Test availability of macro $macro",
- "Macro \"$macro\" is not available.", $missing, 0);
+ "Macro \"$macro\" is not available.", $missing, 0, $xfail);
# Generate a program to test for the value of this macro.
open (TESTFILE, ">$fnamebase.c");
close (TESTFILE);
$res = runtest ($fnamebase, "Testing for value of macro $macro",
- "Macro \"$macro\" has not the right value.", $res);
+ "Macro \"$macro\" has not the right value.", $res,
+ $xfail);
} elsif (/^allow-header *(.*)/) {
my($pattern) = $1;
if ($seenheader{$pattern} != 1) {
next acontrol if (/^#/);
next acontrol if (/^[ ]*$/);
+ s/^xfail-//;
+ s/^optional-//;
if (/^element *({([^}]*)}|([^ ]*)) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*) *(.*)/) {
push @allow, $7;
} elsif (/^(macro|constant|macro-constant|macro-int-constant) +([a-zA-Z0-9_]*) *(?:{([^}]*)} *)?(?:([>=<!]+) ([A-Za-z0-9_-]*))?/) {
printf ("%3d%%)\n", $percent);
}
+printf (" Number of xfailed tests : %4d (", $xerrors);
+$percent = ($xerrors * 100) / $total;
+if ($xerrors > 0 && $percent < 1.0) {
+ printf (" <1%%)\n");
+} else {
+ printf ("%3d%%)\n", $percent);
+}
+
printf (" Number of skipped tests : %4d (", $skipped);
$percent = ($skipped * 100) / $total;
if ($skipped > 0 && $percent < 1.0) {