Compare commits
No commits in common. "c9-beta" and "c10s" have entirely different histories.
@ -1 +0,0 @@
|
|||||||
e6d7751fe5c61340d3b9ce15f2109c6e5563f267 SOURCES/exfatprogs-1.2.2.tar.xz
|
|
10
.gitignore
vendored
10
.gitignore
vendored
@ -1 +1,9 @@
|
|||||||
SOURCES/exfatprogs-1.2.2.tar.xz
|
/exfatprogs-1.0.4.tar.xz
|
||||||
|
/exfatprogs-1.1.0.tar.xz
|
||||||
|
/exfatprogs-1.1.1.tar.xz
|
||||||
|
/exfatprogs-1.1.2.tar.xz
|
||||||
|
/exfatprogs-1.1.3.tar.xz
|
||||||
|
/exfatprogs-1.2.0.tar.xz
|
||||||
|
/exfatprogs-1.2.1.tar.xz
|
||||||
|
/exfatprogs-1.2.2.tar.xz
|
||||||
|
/exfatprogs-1.2.8.tar.xz
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
From 79b5b71cc6a1dbc45eeb63f53a6b51aa924309c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pavel Reichl <preichl@redhat.com>
|
|
||||||
Date: Mon, 13 Nov 2023 08:13:27 +0100
|
|
||||||
Subject: [PATCH] exfat2img: fix Missing Initialization
|
|
||||||
|
|
||||||
exfatprogs-1.2.2/exfat2img/exfat2img.c:895: uninit_use: Using uninitialized value "ret".
|
|
||||||
|
|
||||||
Signed-off-by: Pavel Reichl <preichl@redhat.com>
|
|
||||||
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
|
|
||||||
---
|
|
||||||
exfat2img/exfat2img.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/exfat2img/exfat2img.c b/exfat2img/exfat2img.c
|
|
||||||
index 3f83588..f1a4ef2 100644
|
|
||||||
--- a/exfat2img/exfat2img.c
|
|
||||||
+++ b/exfat2img/exfat2img.c
|
|
||||||
@@ -762,7 +762,7 @@ static ssize_t read_stream(int fd, void *buf, size_t len)
|
|
||||||
|
|
||||||
static int restore_from_stdin(struct exfat2img *ei)
|
|
||||||
{
|
|
||||||
- int in_fd, ret;
|
|
||||||
+ int in_fd, ret = 0;
|
|
||||||
unsigned char cc;
|
|
||||||
unsigned int clu, end_clu;
|
|
||||||
unsigned int cc_clu_count;
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
From cb641bd9b81179b7f039e6d0e64cd67e7fb4e11c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pavel Reichl <preichl@redhat.com>
|
|
||||||
Date: Wed, 6 Dec 2023 22:01:04 +0100
|
|
||||||
Subject: [PATCH] exfatprogs: Fix issues found by OpenScanHub tool
|
|
||||||
|
|
||||||
Fix some issues found by red hat internal OpenScanHub tool.
|
|
||||||
|
|
||||||
exfatprogs-1.2.2/exfat2img/exfat2img.c:893: check_return: Calling
|
|
||||||
"fsync" without checking return value (as is done elsewhere
|
|
||||||
6 out of 7 times).
|
|
||||||
|
|
||||||
exfatprogs-1.2.2/fsck/fsck.c:1251:2: warning[deadcode.DeadStores]:
|
|
||||||
Value stored to 'err' is never read
|
|
||||||
|
|
||||||
exfatprogs-1.2.2/lib/libexfat.c:983: returned_null: "malloc" returns
|
|
||||||
"NULL" (checked 20 out of 23 times)
|
|
||||||
|
|
||||||
Signed-off-by: Pavel Reichl <preichl@redhat.com>
|
|
||||||
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
|
|
||||||
---
|
|
||||||
exfat2img/exfat2img.c | 5 ++++-
|
|
||||||
fsck/fsck.c | 1 -
|
|
||||||
lib/libexfat.c | 4 ++++
|
|
||||||
3 files changed, 8 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/exfat2img/exfat2img.c b/exfat2img/exfat2img.c
|
|
||||||
index f1a4ef2..4774a56 100644
|
|
||||||
--- a/exfat2img/exfat2img.c
|
|
||||||
+++ b/exfat2img/exfat2img.c
|
|
||||||
@@ -890,7 +890,10 @@ static int restore_from_stdin(struct exfat2img *ei)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
out:
|
|
||||||
- fsync(ei->out_fd);
|
|
||||||
+ if (fsync(ei->out_fd)) {
|
|
||||||
+ exfat_err("failed to fsync: %d\n", errno);
|
|
||||||
+ ret = -EIO;
|
|
||||||
+ }
|
|
||||||
exfat_free_buffer(ei->dump_bdesc, 2);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
diff --git a/fsck/fsck.c b/fsck/fsck.c
|
|
||||||
index 77272aa..a5517d2 100644
|
|
||||||
--- a/fsck/fsck.c
|
|
||||||
+++ b/fsck/fsck.c
|
|
||||||
@@ -1248,7 +1248,6 @@ static int exfat_root_dir_check(struct exfat *exfat)
|
|
||||||
err = exfat_read_volume_label(exfat);
|
|
||||||
if (err && err != EOF)
|
|
||||||
exfat_err("failed to read volume label\n");
|
|
||||||
- err = 0;
|
|
||||||
|
|
||||||
err = read_bitmap(exfat);
|
|
||||||
if (err) {
|
|
||||||
diff --git a/lib/libexfat.c b/lib/libexfat.c
|
|
||||||
index d7b8344..6ae5742 100644
|
|
||||||
--- a/lib/libexfat.c
|
|
||||||
+++ b/lib/libexfat.c
|
|
||||||
@@ -981,6 +981,10 @@ int read_boot_sect(struct exfat_blk_dev *bdev, struct pbr **bs)
|
|
||||||
unsigned int sect_size, clu_size;
|
|
||||||
|
|
||||||
pbr = malloc(sizeof(struct pbr));
|
|
||||||
+ if (!pbr) {
|
|
||||||
+ exfat_err("failed to allocate memory\n");
|
|
||||||
+ return -ENOMEM;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (exfat_read(bdev->dev_fd, pbr, sizeof(*pbr), 0) !=
|
|
||||||
(ssize_t)sizeof(*pbr)) {
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
From 8e4f2e671a154549d07ec45cb3c9cfe31b27b27f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pavel Reichl <preichl@redhat.com>
|
|
||||||
Date: Mon, 13 Nov 2023 08:37:06 +0100
|
|
||||||
Subject: [PATCH] tune: label: fix USE_AFTER_FREE
|
|
||||||
|
|
||||||
double_free: Calling free frees pointer bs which has already been freed.
|
|
||||||
|
|
||||||
if exfat_alloc_exfat fails it already frees exfat->bs via exfat_free_exfat
|
|
||||||
|
|
||||||
Signed-off-by: Pavel Reichl <preichl@redhat.com>
|
|
||||||
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
|
|
||||||
---
|
|
||||||
label/label.c | 1 -
|
|
||||||
tune/tune.c | 1 -
|
|
||||||
2 files changed, 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/label/label.c b/label/label.c
|
|
||||||
index 8cd5748..b110670 100644
|
|
||||||
--- a/label/label.c
|
|
||||||
+++ b/label/label.c
|
|
||||||
@@ -105,7 +105,6 @@ int main(int argc, char *argv[])
|
|
||||||
|
|
||||||
exfat = exfat_alloc_exfat(&bd, bs);
|
|
||||||
if (!exfat) {
|
|
||||||
- free(bs);
|
|
||||||
ret = -ENOMEM;
|
|
||||||
goto close_fd_out;
|
|
||||||
}
|
|
||||||
diff --git a/tune/tune.c b/tune/tune.c
|
|
||||||
index f883556..fdb8c94 100644
|
|
||||||
--- a/tune/tune.c
|
|
||||||
+++ b/tune/tune.c
|
|
||||||
@@ -129,7 +129,6 @@ int main(int argc, char *argv[])
|
|
||||||
|
|
||||||
exfat = exfat_alloc_exfat(&bd, bs);
|
|
||||||
if (!exfat) {
|
|
||||||
- free(bs);
|
|
||||||
ret = -ENOMEM;
|
|
||||||
goto close_fd_out;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
|||||||
Name: exfatprogs
|
|
||||||
Version: 1.2.2
|
|
||||||
Release: 2%{?dist}
|
|
||||||
Summary: Userspace utilities for exFAT filesystems
|
|
||||||
License: GPLv2
|
|
||||||
URL: https://github.com/%{name}/%{name}
|
|
||||||
|
|
||||||
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
|
|
||||||
Patch0: for-next-1.2.2-exfat2img-fix-Missing-Initialization.patch
|
|
||||||
Patch1: for-next-1.2.2-exfatprogs-Fix-issues-found-by-OpenScanHub-tool.patch
|
|
||||||
Patch2: for-next-1.2.2-tune-label-fix-USE_AFTER_FREE.patch
|
|
||||||
|
|
||||||
BuildRequires: autoconf
|
|
||||||
BuildRequires: automake
|
|
||||||
BuildRequires: gcc
|
|
||||||
BuildRequires: libtool
|
|
||||||
BuildRequires: make
|
|
||||||
|
|
||||||
%description
|
|
||||||
Utilities for formatting and repairing exFAT filesystems.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup -p1
|
|
||||||
|
|
||||||
%build
|
|
||||||
autoreconf -vif
|
|
||||||
%configure \
|
|
||||||
--enable-shared=yes \
|
|
||||||
--enable-static=no
|
|
||||||
%make_build
|
|
||||||
|
|
||||||
%install
|
|
||||||
%make_install
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license COPYING
|
|
||||||
%doc README.md
|
|
||||||
%{_sbindir}/dump.exfat
|
|
||||||
%{_sbindir}/exfatlabel
|
|
||||||
%{_sbindir}/exfat2img
|
|
||||||
%{_sbindir}/fsck.exfat
|
|
||||||
%{_sbindir}/mkfs.exfat
|
|
||||||
%{_sbindir}/tune.exfat
|
|
||||||
%{_mandir}/man8/dump.exfat.*
|
|
||||||
%{_mandir}/man8/exfatlabel.*
|
|
||||||
%{_mandir}/man8/exfat2img.*
|
|
||||||
%{_mandir}/man8/fsck.exfat.*
|
|
||||||
%{_mandir}/man8/mkfs.exfat.*
|
|
||||||
%{_mandir}/man8/tune.exfat.*
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Fri Dec 08 2023 Pavel Reichl <preichl@redhat.com> - 1.2.2-2
|
|
||||||
- Backport fixes for issues found by OpenScanHub
|
|
||||||
- Related: RHEL-7945
|
|
||||||
|
|
||||||
* Mon Nov 06 2023 Pavel Reichl <preichl@redhat.com> - 1.2.2-1
|
|
||||||
- Rebase to upstream v1.2.2
|
|
||||||
- Related: RHEL-15865
|
|
||||||
- Related: RHEL-14995
|
|
||||||
|
|
||||||
* Mon Mar 13 2023 Pavel Reichl <preichl@redhat.com> - 1.2.0-2
|
|
||||||
- Fix wrong BZ number in git log
|
|
||||||
Related: rhbz#2173273
|
|
||||||
|
|
||||||
* Mon Mar 06 2023 Pavel Reichl <preichl@redhat.com> - 1.2.0-1
|
|
||||||
- Rebase
|
|
||||||
Related: rhbz#2173273
|
|
||||||
|
|
||||||
* Tue May 24 2022 Pavel Reichl <preichl@redhat.com> - 1.1.3-3.test
|
|
||||||
- Fix some covscan issues
|
|
||||||
|
|
||||||
* Mon May 09 2022 Pavel Reichl <preichl@redhat.com> - 1.1.3-2
|
|
||||||
- Fix memomry leak
|
|
||||||
|
|
||||||
* Wed Apr 20 2022 Pavel Reichl <preichl@redhat.com> - 1.1.3-1
|
|
||||||
- Rebase
|
|
||||||
|
|
||||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.2-2
|
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
||||||
Related: rhbz#1991688
|
|
||||||
|
|
||||||
* Tue Jun 1 2021 Pavel Reichl <preichl@redhat.com> - 1.1.2-1
|
|
||||||
- First build.
|
|
123
exfatprogs.spec
Normal file
123
exfatprogs.spec
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
Name: exfatprogs
|
||||||
|
Version: 1.2.8
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Userspace utilities for exFAT filesystems
|
||||||
|
License: GPL-2.0-only
|
||||||
|
URL: https://github.com/%{name}/%{name}
|
||||||
|
|
||||||
|
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: libtool
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
|
%description
|
||||||
|
Utilities for formatting and repairing exFAT filesystems.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoreconf -vif
|
||||||
|
%configure \
|
||||||
|
--enable-shared=yes \
|
||||||
|
--enable-static=no
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license COPYING
|
||||||
|
%doc README.md
|
||||||
|
%{_sbindir}/dump.exfat
|
||||||
|
%{_sbindir}/exfat2img
|
||||||
|
%{_sbindir}/exfatlabel
|
||||||
|
%{_sbindir}/fsck.exfat
|
||||||
|
%{_sbindir}/mkfs.exfat
|
||||||
|
%{_sbindir}/tune.exfat
|
||||||
|
%{_mandir}/man8/dump.exfat.*
|
||||||
|
%{_mandir}/man8/exfat2img.*
|
||||||
|
%{_mandir}/man8/exfatlabel.*
|
||||||
|
%{_mandir}/man8/fsck.exfat.*
|
||||||
|
%{_mandir}/man8/mkfs.exfat.*
|
||||||
|
%{_mandir}/man8/tune.exfat.*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Mar 31 2025 Pavel Reichl <preichl@redhat.com> - 1.2.8-1
|
||||||
|
- Rebase to the latest upstream version
|
||||||
|
Related: RHEL-66219
|
||||||
|
|
||||||
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.2.2-6
|
||||||
|
- Bump release for October 2024 mass rebuild:
|
||||||
|
Resolves: RHEL-64018
|
||||||
|
|
||||||
|
* Mon Jul 01 2024 Pavel Reichl <preichl@redhat.com> - 1.2.2-5
|
||||||
|
- Fix High impact true positive findings
|
||||||
|
|
||||||
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.2.2-4
|
||||||
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
|
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.2-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Oct 30 2023 Pavel Reichl <preichl@redhat.com> - 1.2.2-2
|
||||||
|
- Convert License tag to SPDX format
|
||||||
|
|
||||||
|
* Sat Oct 28 2023 Simone Caronni <negativo17@gmail.com> - 1.2.2-1
|
||||||
|
- Update to 1.2.2.
|
||||||
|
|
||||||
|
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon May 22 2023 Simone Caronni <negativo17@gmail.com> - 1.2.1-1
|
||||||
|
- Update to 1.2.1.
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Oct 28 2022 Simone Caronni <negativo17@gmail.com> - 1.2.0-1
|
||||||
|
- Update to 1.2.0.
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Nov 21 2021 Simone Caronni <negativo17@gmail.com> - 1.1.3-1
|
||||||
|
- Update to 1.1.3.
|
||||||
|
|
||||||
|
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 25 2021 Simone Caronni <negativo17@gmail.com> - 1.1.2-1
|
||||||
|
- Update to 1.1.2.
|
||||||
|
|
||||||
|
* Thu Apr 22 2021 Simone Caronni <negativo17@gmail.com> - 1.1.1-1
|
||||||
|
- Update to 1.1.1.
|
||||||
|
|
||||||
|
* Tue Mar 23 2021 Simone Caronni <negativo17@gmail.com> - 1.1.0-1
|
||||||
|
- Update to 1.1.0.
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Dec 04 2020 Simone Caronni <negativo17@gmail.com> - 1.0.4-1
|
||||||
|
- Update to 1.0.4.
|
||||||
|
|
||||||
|
* Wed May 20 2020 Simone Caronni <negativo17@gmail.com> - 1.0.3-1
|
||||||
|
- Update to 1.0.3, no more shared libraries.
|
||||||
|
|
||||||
|
* Mon Apr 27 2020 Simone Caronni <negativo17@gmail.com> - 1.0.2-1
|
||||||
|
- Review fixes.
|
||||||
|
- Update to 1.0.2.
|
||||||
|
|
||||||
|
* Thu Apr 23 2020 Simone Caronni <negativo17@gmail.com> - 1.0.1-2
|
||||||
|
- Rename to exfatprogs.
|
||||||
|
- Removed provides/obsoletes on Fuse implementation.
|
||||||
|
|
||||||
|
* Wed Apr 15 2020 Simone Caronni <negativo17@gmail.com> - 1.0.1-1
|
||||||
|
- First build.
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-10
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (exfatprogs-1.2.8.tar.xz) = 5930555bde84d77b2b949a268cd0423abaf91bbc3b9632b66705f9e4a1245367c92515111a85f2846541cff7ac465197aed8b091d889dbf8309381ac2d41af98
|
80
tests/scripts/basic_test.sh
Normal file
80
tests/scripts/basic_test.sh
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
IMG=exfat.img
|
||||||
|
MKFS=mkfs.exfat
|
||||||
|
FSCK=fsck.exfat
|
||||||
|
MNT=mount
|
||||||
|
MNT_POINT=/mnt/exfattest
|
||||||
|
PASS_COUNT=0
|
||||||
|
TEST_COUNT=4
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
umount $MNT_POINT
|
||||||
|
rm -rf $IMG
|
||||||
|
echo ""
|
||||||
|
echo "Passed ${PASS_COUNT} of ${TEST_COUNT}"
|
||||||
|
if [ ${PASS_COUNT} -ne ${TEST_COUNT} ]; then
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#Create img:
|
||||||
|
dd if=/dev/zero of=$IMG bs=1M count=200
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERR: Make img failed!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "--- Created img file: $IMG ---"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#mkfs test
|
||||||
|
echo ""
|
||||||
|
$MKFS $IMG --verbose
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERR: mkfs.exfat failed!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "--- mkfs test done ---"
|
||||||
|
PASS_COUNT=$((PASS_COUNT + 1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
#fsck test
|
||||||
|
echo ""
|
||||||
|
$FSCK $IMG --verbose
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERR: fsck.exfat failed!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "--- fsck test done ---"
|
||||||
|
PASS_COUNT=$((PASS_COUNT + 1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
#mount test
|
||||||
|
echo ""
|
||||||
|
mkdir -p $MNT_POINT
|
||||||
|
$MNT -o loop $IMG $MNT_POINT
|
||||||
|
$MNT | grep $MNT_POINT | grep exfat
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERR: mount failed!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "--- mount test done ---"
|
||||||
|
PASS_COUNT=$((PASS_COUNT + 1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
#RW test
|
||||||
|
mkdir -p $MNT_POINT/testdir
|
||||||
|
echo "This is a test" > $MNT_POINT/testdir/testfile
|
||||||
|
cat $MNT_POINT/testdir/testfile | grep "This is a test"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERR: Read or write failed!"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "--- RW test done ---"
|
||||||
|
PASS_COUNT=$((PASS_COUNT + 1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
cleanup
|
11
tests/tests.yml
Normal file
11
tests/tests.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
tests:
|
||||||
|
- simple:
|
||||||
|
dir: scripts
|
||||||
|
run: ./basic_test.sh
|
||||||
|
required_packages:
|
||||||
|
- exfatprogs
|
Loading…
Reference in New Issue
Block a user