hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/tools/testing/selftests/proc/proc-uptime-002.c
....@@ -17,6 +17,7 @@
1717 // while shifting across CPUs.
1818 #undef NDEBUG
1919 #include <assert.h>
20
+#include <errno.h>
2021 #include <unistd.h>
2122 #include <sys/syscall.h>
2223 #include <stdlib.h>
....@@ -54,7 +55,7 @@
5455 len += sizeof(unsigned long);
5556 free(m);
5657 m = malloc(len);
57
- } while (sys_sched_getaffinity(0, len, m) == -EINVAL);
58
+ } while (sys_sched_getaffinity(0, len, m) == -1 && errno == EINVAL);
5859
5960 fd = open("/proc/uptime", O_RDONLY);
6061 assert(fd >= 0);