7 #include <sys/resource.h>
10 #include "darwintest_defaults.h"
12 static void *sleep_thread(void __unused
*arg
){
17 /* Regression test for <rdar://problem/29209770> */
18 T_DECL(test_pthread_get_qos_class_np
, "Test for pthread_get_qos_class_np()", T_META_CHECK_LEAKS(NO
)) {
21 pthread_attr_init(&attr
);
22 pthread_attr_set_qos_class_np(&attr
, QOS_CLASS_BACKGROUND
, 0);
23 pthread_create(&thread
, &attr
, sleep_thread
, NULL
);
26 pthread_get_qos_class_np(thread
, &qos
, NULL
);
28 T_EXPECT_EQ(qos
, (qos_class_t
)QOS_CLASS_BACKGROUND
, NULL
);