Compare commits
No commits in common. "c8-beta" and "c8s" have entirely different histories.
@ -1 +0,0 @@
|
||||
f18e8aaee3f3d4173a1f598001003be8706d28b0 SOURCES/findutils-4.6.0.tar.gz
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/findutils-4.6.0.tar.gz
|
||||
/findutils-4.*.*.tar.gz
|
||||
|
9
STAGE1-findutils
Normal file
9
STAGE1-findutils
Normal file
@ -0,0 +1,9 @@
|
||||
srpm $1
|
||||
mcd $BUILDDIR/$1
|
||||
sed -i~ -e "s,locate/Makefile locate/testsuite/Makefile ,," $SRC/${1}-*/configure
|
||||
FINDLIBS="-lselinux -ldl" $SRC/${1}-*/configure $TCONFIGARGS
|
||||
sed -i~ -e "s/ locate / /" Makefile
|
||||
notparallel
|
||||
test -d tools/gnulib/lib && make $J V=1 -C tools/gnulib/lib
|
||||
make $J V=1
|
||||
make $J install DESTDIR=${ROOTFS}
|
@ -1,19 +1,19 @@
|
||||
From 17e470dc1acca4824b70328d733d5f99c12d0d65 Mon Sep 17 00:00:00 2001
|
||||
From cd653102f401f91748c3f038be4d38ddacc2d7db Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Wed, 11 May 2011 16:46:45 +0200
|
||||
Subject: [PATCH 3/4] findutils-4.4.2-xautofs.patch
|
||||
Date: Wed, 3 Jul 2024 10:22:49 +0200
|
||||
Subject: [PATCH] findutils-4.4.2-xautofs.patch
|
||||
|
||||
---
|
||||
doc/find.texi | 4 ++++
|
||||
find/defs.h | 3 +++
|
||||
find/find.1 | 3 +++
|
||||
find/ftsfind.c | 6 ++++++
|
||||
find/ftsfind.c | 11 +++++++++--
|
||||
find/parser.c | 11 ++++++++++-
|
||||
find/util.c | 1 +
|
||||
6 files changed, 27 insertions(+), 1 deletions(-)
|
||||
6 files changed, 30 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/doc/find.texi b/doc/find.texi
|
||||
index c584298..9731b71 100644
|
||||
index b32db8c..1691d2d 100644
|
||||
--- a/doc/find.texi
|
||||
+++ b/doc/find.texi
|
||||
@@ -1446,6 +1446,10 @@ them.
|
||||
@ -28,7 +28,7 @@ index c584298..9731b71 100644
|
||||
@deffnx Option -mount
|
||||
Don't descend directories on other filesystems. These options are
|
||||
diff --git a/find/defs.h b/find/defs.h
|
||||
index 11d1d00..f95ce72 100644
|
||||
index ba0b855..7e6d4bb 100644
|
||||
--- a/find/defs.h
|
||||
+++ b/find/defs.h
|
||||
@@ -557,6 +557,9 @@ struct options
|
||||
@ -42,7 +42,7 @@ index 11d1d00..f95ce72 100644
|
||||
* no longer exists by the time we get around to processing it.
|
||||
*/
|
||||
diff --git a/find/find.1 b/find/find.1
|
||||
index e851f82..a4799ff 100644
|
||||
index 7b141b8..a36a0bc 100644
|
||||
--- a/find/find.1
|
||||
+++ b/find/find.1
|
||||
@@ -520,6 +520,9 @@ to stat them; this gives a significant increase in search speed.
|
||||
@ -56,15 +56,27 @@ index e851f82..a4799ff 100644
|
||||
Don't descend directories on other filesystems.
|
||||
|
||||
diff --git a/find/ftsfind.c b/find/ftsfind.c
|
||||
index 9fdb8ef..bd7cc37 100644
|
||||
index 414327b..6620bdb 100644
|
||||
--- a/find/ftsfind.c
|
||||
+++ b/find/ftsfind.c
|
||||
@@ -485,6 +485,12 @@ consider_visiting (FTS *p, FTSENT *ent)
|
||||
@@ -331,8 +331,8 @@ show_outstanding_execdirs (FILE *fp)
|
||||
static void
|
||||
consider_visiting (FTS *p, FTSENT *ent)
|
||||
{
|
||||
- struct stat statbuf;
|
||||
- mode_t mode;
|
||||
+ struct stat statbuf = {0};
|
||||
+ mode_t mode = 0;
|
||||
int ignore, isdir;
|
||||
|
||||
if (options.debug_options & DebugSearch)
|
||||
@@ -485,6 +485,13 @@ consider_visiting (FTS *p, FTSENT *ent)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (options.bypass_autofs &&
|
||||
+ 0 == strcmp ("autofs", filesystem_type (&statbuf, ent->fts_name)))
|
||||
+ if (options.bypass_autofs
|
||||
+ && 0 == get_statinfo (ent->fts_path, ent->fts_name, &statbuf)
|
||||
+ && 0 == strcmp ("autofs", filesystem_type (&statbuf, ent->fts_name)))
|
||||
+ {
|
||||
+ fts_set(p, ent, FTS_SKIP); /* descend no further */
|
||||
+ }
|
||||
@ -73,7 +85,7 @@ index 9fdb8ef..bd7cc37 100644
|
||||
{
|
||||
/* this is the preorder visit, but user said -depth */
|
||||
diff --git a/find/parser.c b/find/parser.c
|
||||
index 52a1ef6..995aec3 100644
|
||||
index b57cdda..91e914a 100644
|
||||
--- a/find/parser.c
|
||||
+++ b/find/parser.c
|
||||
@@ -146,6 +146,7 @@ static bool parse_user (const struct parser_table*, char *argv[], int *
|
||||
@ -101,22 +113,22 @@ index 52a1ef6..995aec3 100644
|
||||
puts (_("\
|
||||
tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n\
|
||||
-cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n\
|
||||
@@ -2683,6 +2685,13 @@ parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||
@@ -2682,6 +2684,13 @@ parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||
return parse_noop (entry, argv, arg_ptr);
|
||||
}
|
||||
|
||||
static bool
|
||||
+static bool
|
||||
+parse_xautofs (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||
+{
|
||||
+ options.bypass_autofs = true;
|
||||
+ return parse_noop (entry, argv, arg_ptr);
|
||||
+}
|
||||
+
|
||||
+static bool
|
||||
static bool
|
||||
parse_ignore_race (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||
{
|
||||
options.ignore_readdir_race = true;
|
||||
diff --git a/find/util.c b/find/util.c
|
||||
index 8577396..4d45f84 100644
|
||||
index 5ffe140..3448a67 100644
|
||||
--- a/find/util.c
|
||||
+++ b/find/util.c
|
||||
@@ -1017,6 +1017,7 @@ set_option_defaults (struct options *p)
|
||||
@ -128,5 +140,5 @@ index 8577396..4d45f84 100644
|
||||
|
||||
if (p->posixly_correct)
|
||||
--
|
||||
1.7.4.4
|
||||
2.45.2
|
||||
|
BIN
findutils-4.6.0.tar.gz.sig
Normal file
BIN
findutils-4.6.0.tar.gz.sig
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
Summary: The GNU versions of find utilities (find and xargs)
|
||||
Name: findutils
|
||||
Version: 4.6.0
|
||||
Release: 22%{?dist}
|
||||
Release: 23%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv3+
|
||||
Group: Applications/File
|
||||
@ -156,6 +156,9 @@ fi
|
||||
%{_infodir}/find-maint.info.gz
|
||||
|
||||
%changelog
|
||||
* Thu Jul 04 2024 Lukáš Zaoral <lzaoral@redhat.com> - 1:4.6.0-23
|
||||
- fix autofs patch when stat was not performed (RHEL-45720)
|
||||
|
||||
* Mon Aug 21 2023 Lukáš Zaoral <lzaoral@redhat.com> - 1:4.6.0-22
|
||||
- improve description of printf options in find manpage (#1882695)
|
||||
|
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (findutils-4.6.0.tar.gz) = 41fcd4197c1efbd77f7420e5754e2cf9332dfef19f90c65a8fa1844bb4bc5d529c8393ee0ff979a054e9ac65ff71d7fe3921ea079f9960843412fc9a71f8afd4
|
63
tests/smoke/Makefile
Normal file
63
tests/smoke/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/findutils/Sanity/smoke
|
||||
# Description: Smoke test for find and xargs.
|
||||
# Author: Branislav Nater <bnater@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2014 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/findutils/Sanity/smoke
|
||||
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)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Branislav Nater <bnater@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Smoke test for find and xargs." >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: findutils" >> $(METADATA)
|
||||
@echo "Requires: findutils" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
3
tests/smoke/PURPOSE
Normal file
3
tests/smoke/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /CoreOS/findutils/Sanity/smoke
|
||||
Description: Smoke test for find and xargs.
|
||||
Author: Branislav Nater <bnater@redhat.com>
|
64
tests/smoke/runtest.sh
Executable file
64
tests/smoke/runtest.sh
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/findutils/Sanity/smoke
|
||||
# Description: Smoke test for find and xargs.
|
||||
# Author: Branislav Nater <bnater@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2014 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 rhts environment
|
||||
. /usr/bin/rhts-environment.sh || exit 1
|
||||
. /usr/lib/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="findutils"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "touch \"file with spaces\"" 0
|
||||
rlRun "mkdir dir" 0
|
||||
rlRun "touch dir/file1" 0
|
||||
rlPhaseEnd
|
||||
|
||||
rlGetTestState && {
|
||||
rlPhaseStartTest
|
||||
rlRun "find . -name \"file*\" -type f | tee output | wc -l > wcout" 0
|
||||
cat output
|
||||
rlAssertGrep 2 wcout
|
||||
rlRun "find $TmpDir -mindepth 1 -type d | tee output | wc -l > wcout" 0
|
||||
cat output
|
||||
rlAssertGrep 1 wcout
|
||||
rlRun "find $TmpDir -name \"file*\" -print0 | xargs -0 ls -l | tee output | wc -l > wcout" 0
|
||||
cat output
|
||||
rlAssertGrep 2 wcout
|
||||
rlPhaseEnd
|
||||
}
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
14
tests/tests.yml
Normal file
14
tests/tests.yml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
# Tests which will run in all contexts
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
- container
|
||||
- atomic
|
||||
tests:
|
||||
- smoke
|
||||
- xautofs
|
||||
required_packages:
|
||||
- autofs # autofs required for xautofs test
|
65
tests/xautofs/Makefile
Normal file
65
tests/xautofs/Makefile
Normal file
@ -0,0 +1,65 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/findutils/Sanity/options/xautofs
|
||||
# Description: Check xautofs option
|
||||
# Author: Petr Splichal <psplicha@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2009 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/findutils/Sanity/options/xautofs
|
||||
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: Branislav Nater <bnater@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Check xautofs option" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(METADATA)
|
||||
@echo "RunFor: findutils" >> $(METADATA)
|
||||
@echo "Requires: autofs findutils" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 485672 529391" >> $(METADATA)
|
||||
@echo "Releases: -RHEL3 -RHEL4" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
8
tests/xautofs/PURPOSE
Normal file
8
tests/xautofs/PURPOSE
Normal file
@ -0,0 +1,8 @@
|
||||
PURPOSE of /CoreOS/findutils/Sanity/options/xautofs
|
||||
Description: Check xautofs option
|
||||
Author: Petr Splichal <psplicha@redhat.com>
|
||||
Bug summary: [RFE] Modify find to be able to skip direct mapped autofs mounts
|
||||
Bugzilla link: None
|
||||
|
||||
Check that the new -xautofs option works as expected: make sure
|
||||
find does not descend into directories on autofs filesystems.
|
90
tests/xautofs/runtest.sh
Executable file
90
tests/xautofs/runtest.sh
Executable file
@ -0,0 +1,90 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/findutils/Sanity/options/xautofs
|
||||
# Description: Check xautofs option
|
||||
# Author: Petr Splichal <psplicha@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2009 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 rhts environment
|
||||
. /usr/bin/rhts-environment.sh
|
||||
. /usr/share/rhts-library/rhtslib.sh
|
||||
|
||||
PACKAGE="findutils"
|
||||
|
||||
MasterConf="/etc/auto.master"
|
||||
DirectConf="/etc/auto.direct"
|
||||
|
||||
MountDir="/mnt/findutils"
|
||||
AutomountDir="$MountDir/etc"
|
||||
RegularDir="$MountDir/regular/directory/master"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlAssertRpm "autofs"
|
||||
rlRun "set -o pipefail"
|
||||
|
||||
# create dirs & back up
|
||||
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
|
||||
rlRun "mkdir -p $RegularDir" 0 "Creating regular directory"
|
||||
rlRun "rlFileBackup $MasterConf"
|
||||
|
||||
# set up autofs
|
||||
rlRun "echo '/- /etc/auto.direct' > $MasterConf" \
|
||||
0 "Setting up autofs master map"
|
||||
rlRun "echo '$AutomountDir localhost:/etc' > $DirectConf" \
|
||||
0 "Setting up autofs direct map"
|
||||
|
||||
# RHEL-7 is using xfs
|
||||
rlIsRHEL 4 5 6 && fs="ext[34]" || fs="xfs"
|
||||
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Without -xautofs option"
|
||||
rlRun "rlServiceStart autofs" 0 "Starting autofs"
|
||||
rlAssertNotGrep "$AutomountDir.*$fs" "/proc/mounts"
|
||||
rlRun "find $MountDir -noleaf -name '*master*' | tee filelist"
|
||||
rlAssertGrep "$RegularDir" "filelist"
|
||||
rlAssertGrep "$MountDir$MasterConf" "filelist"
|
||||
rlAssertGrep "$AutomountDir.*$fs" "/proc/mounts"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "With -xautofs option"
|
||||
rlRun "rlServiceStart autofs" 0 "Starting autofs"
|
||||
rlAssertNotGrep "$AutomountDir.*$fs" "/proc/mounts"
|
||||
rlRun "find $MountDir -xautofs -noleaf -name '*master*' | tee filelist"
|
||||
rlAssertGrep "$RegularDir" "filelist"
|
||||
rlAssertNotGrep "$MountDir$MasterConf" "filelist"
|
||||
rlAssertNotGrep "$AutomountDir.*$fs" "/proc/mounts"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rlFileRestore"
|
||||
rlRun "rlServiceRestore autofs"
|
||||
rlRun "rm -r $TmpDir $DirectConf $MountDir" 0 "Removing tmp files"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user