Backport fix for armv7hl

This commit is contained in:
Davide Cavalca 2022-03-06 09:02:09 -08:00
parent e4da9ca905
commit c519f9edf7
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From b6e0ad2af132a9ddd859735408da381e20a31c72 Mon Sep 17 00:00:00 2001
From: Omar Sandoval <osandov@osandov.com>
Date: Thu, 3 Mar 2022 01:17:51 -0800
Subject: [PATCH] tests: check for missing or invalid /proc/kcore for Linux
kernel tests
If /proc/kcore is missing (e.g., because CONFIG_PROC_KCORE is not
enabled) or invalid (e.g., Docker mounts /dev/null over /proc/kcore),
then skip the tests.
Signed-off-by: Omar Sandoval <osandov@osandov.com>
---
tests/helpers/linux/__init__.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/helpers/linux/__init__.py b/tests/helpers/linux/__init__.py
index 5d71598d..2e48fb85 100644
--- a/tests/helpers/linux/__init__.py
+++ b/tests/helpers/linux/__init__.py
@@ -45,6 +45,13 @@ def setUpClass(cls):
"Linux helper tests must be run as root "
"(run with env DRGN_RUN_LINUX_HELPER_TESTS=1 to force)"
)
+ except (FileNotFoundError, ValueError):
+ if force_run:
+ raise
+ LinuxHelperTestCase.skip_reason = (
+ "Linux helper tests require /proc/kcore "
+ "(run with env DRGN_RUN_LINUX_HELPER_TESTS=1 to force)"
+ )
else:
# Some of the tests use the loop module. Open loop-control
# so that it is loaded.

View File

@ -21,6 +21,8 @@ Summary: Programmable debugger
License: GPLv3+
URL: https://github.com/osandov/drgn
Source0: %{pypi_source}
# tests: check for missing or invalid /proc/kcore for Linux kernel tests
Patch0: %{url}/commit/b6e0ad2af132a9ddd859735408da381e20a31c72.patch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)