]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: integrate test_last_fuzz into the testsuite
authorEvgeny Vereshchagin <evvers@ya.ru>
Wed, 29 Jul 2020 06:31:11 +0000 (06:31 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Thu, 6 Aug 2020 12:33:11 +0000 (12:33 +0000)
by adding tests/ts/* and a testcase triggering https://github.com/karelzak/util-linux/pull/1097

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
tests/commands.sh
tests/ts/fuzzers/test_last_fuzz [new file with mode: 0755]
tests/ts/fuzzers/test_last_fuzz_files/github-1097 [new file with mode: 0644]

index 2bccaa0815821b28ecae3db2b2b820019248f8e8..869671a8771fbf10d509e567204054fe8f98b1b7 100644 (file)
@@ -42,6 +42,7 @@ TS_HELPER_UUID_PARSER="${ts_helpersdir}test_uuid_parser"
 TS_HELPER_UUID_NAMESPACE="${ts_helpersdir}test_uuid_namespace"
 TS_HELPER_MBSENCODE="${ts_helpersdir}test_mbsencode"
 TS_HELPER_CAL="${ts_helpersdir}test_cal"
+TS_HELPER_LAST_FUZZ="${ts_helpersdir}test_last_fuzz"
 
 # paths to commands
 TS_CMD_ADDPART=${TS_CMD_ADDPART:-"${ts_commandsdir}addpart"}
diff --git a/tests/ts/fuzzers/test_last_fuzz b/tests/ts/fuzzers/test_last_fuzz
new file mode 100755 (executable)
index 0000000..4cc86fd
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# This file is part of util-linux.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This file 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.
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="test_last_fuzz"
+
+. $TS_TOPDIR/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LAST_FUZZ"
+
+mkdir -p ${TS_OUTPUT}_workdir
+ts_run $TS_HELPER_LAST_FUZZ ${TS_OUTPUT}_workdir ${TS_SCRIPT}_files -max_total_time=10 >$TS_OUTPUT 2>$TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/fuzzers/test_last_fuzz_files/github-1097 b/tests/ts/fuzzers/test_last_fuzz_files/github-1097
new file mode 100644 (file)
index 0000000..fbd7dbf
Binary files /dev/null and b/tests/ts/fuzzers/test_last_fuzz_files/github-1097 differ