From patchwork Sat Jul 20 11:08:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1134373 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fMzr6geH"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45rQ8p0tCtz9sPX for ; Sat, 20 Jul 2019 21:08:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7C94F87BB1; Sat, 20 Jul 2019 11:08:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4xfbOALBiSRz; Sat, 20 Jul 2019 11:08:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DC6E2879FC; Sat, 20 Jul 2019 11:08:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 347751BF5E9 for ; Sat, 20 Jul 2019 11:08:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 306F3865D3 for ; Sat, 20 Jul 2019 11:08:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6hlf-frs3f9Z for ; Sat, 20 Jul 2019 11:08:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1FC55862BC for ; Sat, 20 Jul 2019 11:08:16 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id v15so30951077wml.0 for ; Sat, 20 Jul 2019 04:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IU6JBN6HKEsgZ1Rh3BDtadh5oaQ1fVZWiDuLIAtZSBU=; b=fMzr6geHOnfLHo7/gB1VcHDO8zGvjIIuSXk93q4MPQbIwHXwojYT7wtvzYNVOIa3ri 9fxUv4DQmR4nwc3/kMS3KA00Ig64Usibd9B0lFuQtZ6XJzSWw9qRHmF9SFAkC2wrIhp/ ZXWpScphr+r5oxTnCHt1+/2/Fi6kpENUP90n+z0Z+bb+htenYpGS4+7fLNMXaCmASEfd PHjFWMgfFQwI54JHcB/i5tGZz+N4bR5ELT7fx05p/bMuuk6gVCVFEquOynxuSsqWT8Ly wAdTaiAZ0fJ9GPRXlmznEvaHRgDKLL3Sbyypa5WiwKXZmLjq+5/TTAHYwOucaTK7otCs w9vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IU6JBN6HKEsgZ1Rh3BDtadh5oaQ1fVZWiDuLIAtZSBU=; b=KPgx2InwXoM7sBsOZL8ctYXXyQu9MaqFbfBFGTS/EdN3k1nVOkVLXovrv6FMMoHxT4 PZzciBQAktRX0Q+3P7L0IvnXVHoVq+K459cLxVpy6xGaK2oA6TZ0IwvVhQLvMtkd6WuZ TTCvDF1ChkHBCKaqSL0XzX+Yt5UeGdB+L5t0JPrPFemMoEPGX+AOcTdkH3Z+K8bSVgwU d/hNRS/HaxDvqWAuye0f5JK4uYv+tgJkl6E3svIUE4Y1J6+/HvvPdPdAMIeLknRdt1IC r7AsSmsW6ZhIeUy1mUKi3wuOW9g40d5cTc/ewhd30TSoUm0dcBB8WNUMNHWdpxoYqsjP DFbg== X-Gm-Message-State: APjAAAVVdmV/4uS39w6SxYi+cMXhxGEYOGL2EHuJ07UBPwJhEC8UQmER 9TjRXjkXG1xwuFxlBJHJeXQ1IBrb X-Google-Smtp-Source: APXvYqyG77Nqxq40pj6qTOojyOEnBabHu3ugPMGMv55tgTxIv4NF6fXu4fMa868MVcfPDTjc1YMTBQ== X-Received: by 2002:a1c:c145:: with SMTP id r66mr53194921wmf.139.1563620894065; Sat, 20 Jul 2019 04:08:14 -0700 (PDT) Received: from localhost.localdomain (2a01cb0589880c00405dfcd6cc31e8fe.ipv6.abo.wanadoo.fr. [2a01:cb05:8988:c00:405d:fcd6:cc31:e8fe]) by smtp.gmail.com with ESMTPSA id b19sm24471804wmj.13.2019.07.20.04.08.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 04:08:13 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Sat, 20 Jul 2019 13:08:10 +0200 Message-Id: <20190720110810.20085-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Buildroot] [WIP: python3 bug] support/testing: add python3 multiprocessing pool test X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" While running some python script on aarch64 board, it get stuck while imporing multiprocessing Pool: from multiprocessing import Pool This issue seems specific to aarch64. Signed-off-by: Romain Naour --- .../sample_python_multiprocessing_pool.py | 3 ++ .../test_python_multiprocessing_pool.py | 45 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 support/testing/tests/package/sample_python_multiprocessing_pool.py create mode 100644 support/testing/tests/package/test_python_multiprocessing_pool.py diff --git a/support/testing/tests/package/sample_python_multiprocessing_pool.py b/support/testing/tests/package/sample_python_multiprocessing_pool.py new file mode 100644 index 0000000000..df450e4b71 --- /dev/null +++ b/support/testing/tests/package/sample_python_multiprocessing_pool.py @@ -0,0 +1,3 @@ +# This import can be stuck on aarch64 with python3 (3.7.4) +# The test should fail when the timout occurred. +from multiprocessing import Pool diff --git a/support/testing/tests/package/test_python_multiprocessing_pool.py b/support/testing/tests/package/test_python_multiprocessing_pool.py new file mode 100644 index 0000000000..349a91368c --- /dev/null +++ b/support/testing/tests/package/test_python_multiprocessing_pool.py @@ -0,0 +1,45 @@ +import os + +from tests.package.test_python import TestPythonPackageBase + +class TestPythonMultiprocessingPool(TestPythonPackageBase): + sample_scripts = ["tests/package/sample_python_multiprocessing_pool.py"] + timeout = 60 + + # Remove "-serial", "stdio", from testing/infra/emulator.py before running the test. + # Otherwise you will get the following error: + # qemu-system-aarch64: -serial stdio: cannot use stdio by multiple character devices + # qemu-system-aarch64: -serial stdio: could not connect serial device to character backend 'stdio' + + def login(self): + kern = os.path.join(self.builddir, "images", "Image") + ext4_file = os.path.join(self.builddir, "images", "rootfs.ext4") + + self.emulator.boot(arch="aarch64", + kernel=kern, + options=["-append","root=/dev/vda console=ttyAMA0", "-M", "virt", "-cpu", "cortex-a53", "-nographic", "-smp", "1", "-netdev", "user,id=eth0", "-device", "virtio-net-device,netdev=eth0", "-drive", "file=" + ext4_file + ",if=none,format=raw,id=hd0", "-device", "virtio-blk-device,drive=hd0"]) + self.emulator.login() + +# Test with Glibc and MultiprocessingPool +class TestPythonPy3GlibcMultiprocessingPool(TestPythonMultiprocessingPool): + __test__ = True + config = \ + """ + BR2_aarch64=y + BR2_cortex_a53=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_SYSTEM_DHCP="eth0" + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_4=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" + BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + BR2_PACKAGE_PYTHON3=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """