Skip to contentSkip to conversation

v4l2-compliance: Do not run test requiring pthread_cancel in Android

PATCH New Ricardo Ribalda 1 participant 1 message Nov 20, 2024 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 v4l2-compliance: Do not run test requiring pthread_cancel in Android

pthread_cancel() is not available in the Android NDK. Disable the test that depends on it.

---
 utils/v4l2-compliance/v4l2-test-buffers.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
utils/v4l2-compliance/v4l2-test-buffers.cpp +6 -0
index e9171648..71390ba6 100644
@@ -2950,6 +2950,8 @@ int testRequests(struct node *node, bool test_streaming)
 	return 0;
 }
 
+/* Android does not have support for pthread_cancel */
+#ifndef ANDROID
 
 /*
  * This class wraps a pthread in such a way that it simplifies passing
@@ -3110,6 +3112,8 @@ static int testBlockingDQBuf(struct node *node, cv4l_queue &q)
 	return 0;
 }
 
+#endif //ANDROID
+
 int testBlockingWait(struct node *node)
 {
 	bool can_stream = node->g_caps() & V4L2_CAP_STREAMING;
@@ -3131,9 +3135,11 @@ int testBlockingWait(struct node *node)
 		if (testSetupVbi(node, type))
 			continue;
 
+#ifndef ANDROID
 		fail_on_test(testBlockingDQBuf(node, q));
 		if (node->is_m2m)
 			fail_on_test(testBlockingDQBuf(node, m2m_q));
+#endif
 	}
 	return 0;
 }

---
base-commit: 625e604c48fa3c4e9737fa1ec8e1d473a378ca9c
change-id: 20241120-sigkill-af4b23ddccc8

Best regards,

Signature · 1 line
Ricardo Ribalda <[email protected]>