gdb/testsuite: check mmap ret val against MAP_FAILED
Fixup a few spots in the testsuite that use mmap to consistently check
the return value against MAP_FAILED.
One spot in gdb.base/coredump-filter.c checked against NULL, that is
wrong. The other spots either didn't check, or checked against -1.
MAP_FAILED has the value -1, at least on Linux, but it's better to check
against the documented define.
gdb/testsuite/ChangeLog:
PR gdb/26016
* gdb.base/coredump-filter.c (do_mmap): Check mmap ret val
against MAP_FAILED.
* gdb.base/coremaker.c (mmapdata): Likewise.
* gdb.base/jit-reader-host.c (main): Likewise.
* gdb.base/sym-file-loader.c (load): Likewise.
(load_shlib): Likewise.