fi
}
+function ts_check_enotty {
+ # https://lore.kernel.org/qemu-devel/20230426070659.80649-1-thomas@t-8ch.de/
+ if [ -e "$TS_HELPER_SYSINFO" ] &&
+ [ "$("$TS_HELPER_SYSINFO" enotty-ok)" = "0" ]; then
+
+ ts_skip "broken ENOTTY return"
+ fi
+}
+
function ts_report_skip {
ts_report " SKIPPED ($1)"
}
#include <stdint.h>
#include <inttypes.h>
#include <wchar.h>
+#include <errno.h>
+#include <sys/ioctl.h>
typedef struct {
const char *name;
return 0;
}
+static int hlp_enotty_ok(void)
+{
+ errno = 0;
+ ioctl(STDOUT_FILENO, 0);
+
+ printf("%d\n", errno != ENOSYS);
+ return 0;
+}
+
static mntHlpfnc hlps[] =
{
{ "WORDSIZE", hlp_wordsize },
{ "UINT64_MAX", hlp_u64_max },
{ "byte-order", hlp_endianness },
{ "wcsspn-ok", hlp_wcsspn_ok },
+ { "enotty-ok", hlp_enotty_ok },
{ NULL, NULL }
};