Re: [PATCH] check: add support for --start-after

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On 08/09/2023 06:10, Luis Chamberlain wrote:
Often times one is running a new test baseline we want to continue to
start testing where we left off if the last test was a crash. To do
this the first thing that occurred to me was to use the check.time
file as an expunge file but that doesn't work so well if you crashed
as the file turns out empty.

So instead add super simple argument --start-after which let's you
skip all tests until the test infrastructure has "seen" the test
you want to skip. This does obviously work best if you are not using
a random order, but that is rather implied.



Please consider adding an example in the usage() function.

'./check --start-after btrfs/010 -g btrfs/quick' didn't work because '010' isn't part of 'btrfs/quick'.

Since the tests are sorted before running, why not skip all tests that come before the 'start_after_test'?

Thanks, Anand

@@ -591,6 +599,15 @@ _expunge_test()
  {
  	local TEST_ID="$1"
+ if $start_after; then
+		if [[ "$start_after_test" == ${TEST_ID}* ]]; then



+			start_after=false
+		fi
+		echo "       [skipped]"
+		return 0
+
+	fi
+
  	for f in "${exclude_tests[@]}"; do
  		# $f may contain traling spaces and comments
  		local id_regex="^${TEST_ID}\b"




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux