From c9ac329379f6f75c50ea705fdfb576278cf5f389 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Mon, 10 Jul 2023 16:08:01 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- .gitignore | 2 +- attr-2.4.48.tar.gz.sig | Bin 0 -> 566 bytes .../Makefile | 63 ++++++++++++++++++ .../PURPOSE | 4 ++ .../runtest.sh | 45 +++++++++++++ .../runtest.yml | 38 +++++++++++ tests/tests.yml | 14 ++++ 7 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 attr-2.4.48.tar.gz.sig create mode 100644 tests/getfattr-ignores-NULs-in-output-when-using-text/Makefile create mode 100644 tests/getfattr-ignores-NULs-in-output-when-using-text/PURPOSE create mode 100755 tests/getfattr-ignores-NULs-in-output-when-using-text/runtest.sh create mode 100644 tests/getfattr-ignores-NULs-in-output-when-using-text/runtest.yml create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index dea9f80..a385c1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/attr-2.4.48.tar.gz +/attr-2.4.*.tar.gz diff --git a/attr-2.4.48.tar.gz.sig b/attr-2.4.48.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..2d9355d620dae270c185712ee3740d7f33319e9a GIT binary patch literal 566 zcmV-60?GY}0y6{v0SEvc79j+=0<|X-CHRu8B^uO0V>_SdH}!!90$V6(VE_sV5J6)* zpXfLBfv*G)|9dKr8tqNrj>dz;KRDqOzyGGYlIjQQZWH65L`EG8uL+CfI(-gNG9Qeu zs!9&DDTpH0&i(@CPuH-zy!Sc1WqM|^HR<-3)%9}>zLCfC^Sz_L1@nbk6VcF$0wMSj z-;p-$P6@fSZYGS6UL?XtDNsHT`0HjDr?3!=2xYO(en5`s;Qs)A@hmklef*J#-W$cv z6P{0$(}4NzB4&ze4c$|HhTw_D%hJ+2oig%X$tn7(_#X@J8NoFv95P&2N?7ZVT^hoO zE)J~M4X|>f1$VQe6Eo`}iX4;nr;!_{h^rBr}58Sei|aSvwGzqT#Snh4lo4d z#M(`ZUUVOiGG;9TfPRLi7jwm02qi~$ZWo+xrkwvC}Eo47CAa} z*48pVd9(2byu1oZ`sTEkLD2oVFBq4Kmeslm*IRF(ky&H~X76s4y8osC?xGKBK~NH3 zXN<ECAbCnjvdXuI@82^=--8PYDbcLpkXz_V|!v=Bi|P4Tay0{;<0!)fH~ zQOqa@eqmlyq}Z1LD9Wi>RmuiAeT8tXu#${CpU6}~Xk(i7FePD|PNqf!!8DZMXgLpp E)8fSsTL1t6 literal 0 HcmV?d00001 diff --git a/tests/getfattr-ignores-NULs-in-output-when-using-text/Makefile b/tests/getfattr-ignores-NULs-in-output-when-using-text/Makefile new file mode 100644 index 0000000..39095c5 --- /dev/null +++ b/tests/getfattr-ignores-NULs-in-output-when-using-text/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/attr/Sanity/getfattr-ignores-NULs-in-output-when-using-text +# Description: Test for getfattr ignores NULs in output when using "text" +# Author: Jan Scotka +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/attr/Sanity/getfattr-ignores-NULs-in-output-when-using-text +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Jan Scotka " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for getfattr ignores NULs in output when using \"text\" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: attr" >> $(METADATA) + @echo "Requires: attr" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/getfattr-ignores-NULs-in-output-when-using-text/PURPOSE b/tests/getfattr-ignores-NULs-in-output-when-using-text/PURPOSE new file mode 100644 index 0000000..b93214c --- /dev/null +++ b/tests/getfattr-ignores-NULs-in-output-when-using-text/PURPOSE @@ -0,0 +1,4 @@ +PURPOSE of /CoreOS/attr/Sanity/getfattr-ignores-NULs-in-output-when-using-text +Description: Test for getfattr ignores NULs in output when using "text" +Author: Jan Scotka +Bug summary: getfattr ignores NULs in output when using "text" encoding diff --git a/tests/getfattr-ignores-NULs-in-output-when-using-text/runtest.sh b/tests/getfattr-ignores-NULs-in-output-when-using-text/runtest.sh new file mode 100755 index 0000000..929b214 --- /dev/null +++ b/tests/getfattr-ignores-NULs-in-output-when-using-text/runtest.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/attr/Sanity/getfattr-ignores-NULs-in-output-when-using-text +# Description: Test for getfattr ignores NULs in output when using "text" +# Author: Jan Scotka +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh + +PACKAGE="attr" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlPhaseEnd + + rlPhaseStartTest + rlRun "getfattr -e text -d -m - /usr/bin/getfattr | grep 'security.selinux=\".*\"'" 0 "there must be ending quotes" + rlPhaseEnd + +rlJournalPrintText +rlJournalEnd diff --git a/tests/getfattr-ignores-NULs-in-output-when-using-text/runtest.yml b/tests/getfattr-ignores-NULs-in-output-when-using-text/runtest.yml new file mode 100644 index 0000000..4b69eae --- /dev/null +++ b/tests/getfattr-ignores-NULs-in-output-when-using-text/runtest.yml @@ -0,0 +1,38 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.yml of /CoreOS/attr/Sanity/getfattr-ignores-NULs-in-output-when-using-text +# Description: Test for getfattr ignores NULs in output when using "text" +# Author: Jan Scotka +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- hosts: '{{ hosts | default("localhost") }}' + vars: + package: attr + tasks: + - name: Check if package exists + command: "rpm -q {{ package }}" + args: + warn: no + - name: Runtest + shell: "getfattr -e text -d -m - /usr/bin/getfattr | grep 'security.selinux=\".*\"'" diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..553ce22 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,14 @@ +--- +# This first play always runs on the local staging system +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + - atomic + tests: + - getfattr-ignores-NULs-in-output-when-using-text + required_packages: + - attr # getfattr-ignores-NULs-in-output-when-using-text requires attr package + - rpm-build # Upstream test requires rpmbuild + - gettext # Upstream test requires gettext