Displaying 12 results from an estimated 12 matches for "skip_unless_feature_available".
2019 Nov 29
0
[PATCH] tests: test --key for a real guest (with inspection)
...e
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Test the --key option. It is handled by common code so we only need
+# to test one tool (guestfish).
+
+set -e
+
+$TEST_FUNCTIONS
+skip_if_skipped
+skip_unless_feature_available luks
+skip_unless_phony_guest fedora-luks.img
+
+disk=../../test-data/phony-guests/fedora-luks.img
+device=/dev/sda2
+
+# Get the UUID of the LUKS device.
+uuid="$(guestfish --ro -a $disk run : luks-uuid $device)"
+
+# Try to decrypt the disk in different ways:
+# - pass a wrong key via s...
2018 Sep 21
0
[PATCH v2] sparsify: Fix test-virt-sparsify-in-place-fstrim-unsupported.sh
...ystems.
+guestfish -N $img=bootroot:minix:ext4 exit
# This should warn.
virt-sparsify --in-place $img |& tee $log
diff --git a/tests/test-functions.sh b/tests/test-functions.sh
index 22beaf99c..a0bad16fa 100755
--- a/tests/test-functions.sh
+++ b/tests/test-functions.sh
@@ -198,6 +198,16 @@ skip_unless_feature_available ()
fi
}
+# Skip if a filesystem is unavailable in the daemon.
+skip_unless_filesystem_available ()
+{
+ r="$(guestfish -a /dev/null run : filesystem_available "$1")"
+ if [ "$r" != "true" ] ; then
+ echo "$(basename $0): test skipped...
2019 Nov 12
1
[PATCH] tests: luks: Test the --key options.
Requires this series:
https://www.redhat.com/archives/libguestfs/2019-November/msg00036.html
2018 Sep 21
2
[PATCH v2] sparsify: Fix test-virt-sparsify-in-place-fstrim-unsupported.sh
This addresses the feedback on v1 here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00023.html
Rich.
2017 Apr 06
0
[PATCH v6 PATCH 7/7] yara_scan: added API tests
...ls.
+#
+# 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.
+
+# Test the yara_scan command.
+
+set -e
+
+$TEST_FUNCTIONS
+skip_if_skipped
+skip_unless_feature_available sleuthkit
+skip_unless_phony_guest blank-fs.img
+
+rm -f test-yara-rules.yar
+
+/bin/cat << EOF > test-yara-rules.yar
+rule TestRule
+{
+ strings:
+ \$my_text_string = "some text"
+
+ condition:
+ \$my_text_string
+}
+EOF
+
+output=$(
+guestfish --ro -a ../../...
2019 Nov 29
1
Re: [PATCH] tests: test --key for a real guest (with inspection)
...Free Software
> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> +
> +# Test the --key option. It is handled by common code so we only need
> +# to test one tool (guestfish).
> +
> +set -e
> +
> +$TEST_FUNCTIONS
> +skip_if_skipped
> +skip_unless_feature_available luks
> +skip_unless_phony_guest fedora-luks.img
> +
> +disk=../../test-data/phony-guests/fedora-luks.img
> +device=/dev/sda2
> +
> +# Get the UUID of the LUKS device.
> +uuid="$(guestfish --ro -a $disk run : luks-uuid $device)"
> +
> +# Try to decrypt the disk i...
2017 Feb 20
3
[PATCH 0/3] tests: Define common test functions.
Previously I posted a work-in-progress preview of this patch series:
https://www.redhat.com/archives/libguestfs/2017-February/msg00224.html
This is the finished version that updates all of the shell-script
based tests. It passes 'make check', 'make check-direct' and
'make check-slow'.
Rich.
2019 Nov 29
8
[PATCH 0/1] Allow UUIDs for --key identifiers.
This combined patch series enables to decrypt LUKS devices on inspection
by allowing the UUID of the LUKS device with the --key syntax.
I opted for reusing the option instead of adding another one, as I think
that device names and UUIDs are different enough that can be properly
distinguished.
A test for this (patch #4) can be applied only when the patches for
common are applied, and the
2017 Apr 25
8
[PATCH v9 0/7] Feature: Yara file scanning
v9:
- fixes according to comments
Matteo Cafasso (7):
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am | 4 +-
2017 Apr 24
10
[PATCH v8 0/8] Feature: Yara file scanning
v8:
- Ignore returned value in daemon/upload.c
- Report serialization errors in lib/yara.c
Matteo Cafasso (8):
daemon: ignore unused return value in upload function
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in
2017 Apr 23
11
[PATCH v7 0/7] Feature: Yara file scanning
v7:
- Fixes according to comments
- Rebase on top of 1.37.12
Matteo Cafasso (7):
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am
2017 Apr 06
14
[PATCH v6 0/7] Feature: Yara file scanning
v6:
- use new test functions
- fix yara_detection struct field names
- revert yara_load function to initial version
With Pino we were exploring the idea of allowing Users to load multiple
rule files with subsequent calls to yara_load API.
https://www.redhat.com/archives/libguestfs/2016-November/msg00119.html
It turns out impractical due to YARA API limitations. It is possible
to load multiple