public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: kernel/selinux-testsuite: use HTTPS git URL
Date: Fri, 11 Sep 2026 13:19:31 GMT [thread overview]
Message-ID: <178913277164.1.13930119427109714105.tests-selinux-dca9d3c17ee3@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : dca9d3c17ee3b5948a04e2bae14c42b9a7014ac6
Author : Ondrej Mosnacek <omosnace@redhat.com>
Date : 2022-01-11T11:37:54+01:00
Stats : +16/-40 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/dca9d3c17ee3b5948a04e2bae14c42b9a7014ac6?branch=pr775-checkpolicy-revdeps
Log:
kernel/selinux-testsuite: use HTTPS git URL
Recently GitHub has deprecated the git:// protocol and cloning now fails
with this message:
```
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
```
The only reason that git:// was being used instead of https:// was
allowing the test to run on RHEL-5, which has problems with accessing
GitHub via HTTPS due to protocol disparity. By now it should be okay to
throw RHEL-5 under the bus and use the https:// URL.
Since we are definitely making this test unable to run on RHEL-5, also
remove all RHEL-5-specific hacks from the code.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
diff --git a/kernel/selinux-testsuite/main.fmf b/kernel/selinux-testsuite/main.fmf
index f22925c..2e1376c 100644
--- a/kernel/selinux-testsuite/main.fmf
+++ b/kernel/selinux-testsuite/main.fmf
@@ -11,6 +11,6 @@ tier: 1
enabled: true
adjust:
- enabled: false
- when: distro < rhel-5
+ when: distro < rhel-6
- enabled: false
when: arch = i386
diff --git a/kernel/selinux-testsuite/runtest.sh b/kernel/selinux-testsuite/runtest.sh
index 4bf8617..184cc68 100755
--- a/kernel/selinux-testsuite/runtest.sh
+++ b/kernel/selinux-testsuite/runtest.sh
@@ -44,7 +44,7 @@ DEFAULT_PULLS=""
DEFAULT_PATCHES=""
# Optional test parameter - location of testuite git.
-GIT_URL=${GIT_URL:-"git://github.com/SELinuxProject/selinux-testsuite"}
+GIT_URL=${GIT_URL:-"https://github.com/SELinuxProject/selinux-testsuite"}
# Optional test parameter - timeout for detecting lost packets
NETWORK_TIMEOUT=${NETWORK_TIMEOUT:-4}
@@ -70,22 +70,14 @@ else
PIPEFAIL_DISABLE=""
fi
-if rlIsRHEL 5 ; then
- # On RHEL-5 sort -V doesn't work, so just pretend we have the oldest kernel
- function kver_ge() { false; }
- function kver_lt() { true; }
- function kver_le() { true; }
- function kver_gt() { false; }
-else
- function version_le() {
- { echo "$1"; echo "$2"; } | sort -V | tail -n 1 | grep -qx "$2"
- }
-
- function kver_ge() { version_le "$1" "$(uname -r)"; }
- function kver_lt() { ! kver_ge "$1"; }
- function kver_le() { version_le "$(uname -r)" "$1"; }
- function kver_gt() { ! kver_le "$1"; }
-fi
+function version_le() {
+ { echo "$1"; echo "$2"; } | sort -V | tail -n 1 | grep -qx "$2"
+}
+
+function kver_ge() { version_le "$1" "$(uname -r)"; }
+function kver_lt() { ! kver_ge "$1"; }
+function kver_le() { version_le "$(uname -r)" "$1"; }
+function kver_gt() { ! kver_le "$1"; }
function installDepsYum() {
local yum="$1"; shift
@@ -201,14 +193,12 @@ rlJournalStart
# rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
# rlRun "pushd $TmpDir"
- if ! rlIsRHEL 5 ; then
- # version_le() sanity check:
- rlRun "version_le 4.10 4.10"
- rlRun "version_le 4.10 4.10.0"
- rlRun "version_le 4.10 4.10.1"
- rlRun "! version_le 4.10 4.9"
- rlRun "! version_le 4.10.0 4.10"
- fi
+ # version_le() sanity check:
+ rlRun "version_le 4.10 4.10"
+ rlRun "version_le 4.10 4.10.0"
+ rlRun "version_le 4.10 4.10.1"
+ rlRun "! version_le 4.10 4.9"
+ rlRun "! version_le 4.10.0 4.10"
if [ -d /sys/fs/selinux ]; then
selinuxfs=/sys/fs/selinux
@@ -317,20 +307,6 @@ rlJournalStart
rlRun "sed -i 's/3.18/3.9/' $file" 0 \
"Fix up kernel version in nnp test"
done
- if rlIsRHEL 5 ; then
- rlRun "sed -i '/unconfined_devpts_t/d' policy/test_policy.if" 0
-
- rlRun "sed -i 's/read_file_perms/r_file_perms/' policy/*.te" 0
- rlRun "sed -i 's/mmap_file_perms/rx_file_perms/' policy/*.te" 0
- rlRun "sed -i 's/list_dir_perms/r_dir_perms/' policy/*.te" 0
- rlRun "sed -i 's/ open / /' policy/*.te" 0
-
- rlRun "sed -i 's/^sysadm_bin_spec_domtrans_to/userdom_sysadm_bin_spec_domtrans_to/' policy/*.te" 0
-
- rlRun "sed -i 's/^corecmd_exec_bin(\(.*\))$/corecmd_exec_bin(\1)\ncorecmd_exec_sbin(\1)/' policy/*.te" 0
- rlRun "sed -i 's/^corecmd_bin_entry_type(\(.*\))$/corecmd_bin_entry_type(\1)\ncorecmd_sbin_entry_type(\1)/' policy/*.te" 0
- rlRun "sed -i 's/^userdom_search_user_home_dirs(\(.*\))$/userdom_search_user_home_dirs(user, \1)/' policy/*.te" 0
- fi
if rlIsRHEL "<8.2"; then
rlRun "sed -i '/SUBDIRS += bpf/d;/export CFLAGS += -DHAVE_BPF/d' tests/Makefile" 0 \
"RHEL < 8.2 doesn't ship libbpf => disable BPF subtests"
reply other threads:[~2026-09-11 13:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178913277164.1.13930119427109714105.tests-selinux-dca9d3c17ee3@fedoraproject.org \
--to=omosnace@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox