The branch stable/14 has been updated by ronald: URL: https://cgit.FreeBSD.org/src/commit/?id=af8af9b28c9d7c60f6f37971dc5b734c7f1bc413
commit af8af9b28c9d7c60f6f37971dc5b734c7f1bc413 Author: Siva Mahadevan <m...@svmhdvn.name> AuthorDate: 2025-07-01 09:57:29 +0000 Commit: Ronald Klop <ron...@freebsd.org> CommitDate: 2025-07-13 11:44:36 +0000 fix parallel execution of swapon tests And apparantly the CI env already has an md device so be relaxed about which md device is added. PR: 186252 Reported by: markj Fixes: 1ee33e3a578c35ff0e8ef5db87a8005f1f99546a "swapon: parse md.eli device for encrypted swapfile from fstab" Pull Request: https://github.com/freebsd/freebsd-src/pull/1747 (cherry picked from commit 83b08f40264177ecf03fce808474815816f9846f) --- sbin/swapon/tests/swapon_test.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sbin/swapon/tests/swapon_test.sh b/sbin/swapon/tests/swapon_test.sh index 3c4286cd6815..b6d31ecaeed0 100755 --- a/sbin/swapon/tests/swapon_test.sh +++ b/sbin/swapon/tests/swapon_test.sh @@ -32,8 +32,8 @@ attach_mdX_body() { # if the swapfile is too small (like 1k) then mdconfig hangs looking up the md atf_check -s exit:0 -x "truncate -s 10k swapfile" - atf_check -s exit:0 -o save:fstab.out -x "echo 'md3 none swap sw,file=swapfile 0 0'" - atf_check -s exit:0 -o match:"swapon: adding /dev/md3 as swap device" -x "swapon -F fstab.out -a" + atf_check -s exit:0 -o save:fstab.out -x "echo 'md31 none swap sw,file=swapfile 0 0'" + atf_check -s exit:0 -o match:"swapon: adding /dev/md31 as swap device" -x "swapon -F fstab.out -a" } attach_mdX_cleanup() { @@ -50,8 +50,8 @@ attach_dev_mdX_body() { # if the swapfile is too small (like 1k) then mdconfig hangs looking up the md atf_check -s exit:0 -x "truncate -s 10k swapfile" - atf_check -s exit:0 -o save:fstab.out -x "echo '/dev/md3 none swap sw,file=swapfile 0 0'" - atf_check -s exit:0 -o match:"swapon: adding /dev/md3 as swap device" -x "swapon -F fstab.out -a" + atf_check -s exit:0 -o save:fstab.out -x "echo '/dev/md32 none swap sw,file=swapfile 0 0'" + atf_check -s exit:0 -o match:"swapon: adding /dev/md32 as swap device" -x "swapon -F fstab.out -a" } attach_dev_mdX_cleanup() { @@ -62,14 +62,14 @@ attach_dev_mdX_cleanup() atf_test_case attach_md cleanup attach_md_head() { - atf_set "descr" "mdX device should attach" + atf_set "descr" "md device should attach" } attach_md_body() { # if the swapfile is too small (like 1k) then mdconfig hangs looking up the md atf_check -s exit:0 -x "truncate -s 10k swapfile" atf_check -s exit:0 -o save:fstab.out -x "echo 'md none swap sw,file=swapfile 0 0'" - atf_check -s exit:0 -o match:"swapon: adding /dev/md0 as swap device" -x "swapon -F fstab.out -a" + atf_check -s exit:0 -o match:"swapon: adding /dev/md[0-9][0-9]* as swap device" -x "swapon -F fstab.out -a" } attach_md_cleanup() { @@ -87,7 +87,7 @@ attach_dev_md_body() # if the swapfile is too small (like 1k) then mdconfig hangs looking up the md atf_check -s exit:0 -x "truncate -s 10k swapfile" atf_check -s exit:0 -o save:fstab.out -x "echo '/dev/md none swap sw,file=swapfile 0 0'" - atf_check -s exit:0 -o match:"swapon: adding /dev/md0 as swap device" -x "swapon -F fstab.out -a" + atf_check -s exit:0 -o match:"swapon: adding /dev/md[0-9][0-9]* as swap device" -x "swapon -F fstab.out -a" } attach_dev_md_cleanup() { @@ -104,8 +104,8 @@ attach_mdX_eli_body() { # if the swapfile is too small (like 1k) then mdconfig hangs looking up the md atf_check -s exit:0 -x "truncate -s 10k swapfile" - atf_check -s exit:0 -o save:fstab.out -x "echo 'md3.eli none swap sw,file=swapfile 0 0'" - atf_check -s exit:0 -o match:"swapon: adding /dev/md3.eli as swap device" -x "swapon -F fstab.out -a" + atf_check -s exit:0 -o save:fstab.out -x "echo 'md33.eli none swap sw,file=swapfile 0 0'" + atf_check -s exit:0 -o match:"swapon: adding /dev/md33.eli as swap device" -x "swapon -F fstab.out -a" } attach_mdX_eli_cleanup() { @@ -122,8 +122,8 @@ attach_dev_mdX_eli_body() { # if the swapfile is too small (like 1k) then mdconfig hangs looking up the md atf_check -s exit:0 -x "truncate -s 10k swapfile" - atf_check -s exit:0 -o save:fstab.out -x "echo '/dev/md3.eli none swap sw,file=swapfile 0 0'" - atf_check -s exit:0 -o match:"swapon: adding /dev/md3.eli as swap device" -x "swapon -F fstab.out -a" + atf_check -s exit:0 -o save:fstab.out -x "echo '/dev/md34.eli none swap sw,file=swapfile 0 0'" + atf_check -s exit:0 -o match:"swapon: adding /dev/md34.eli as swap device" -x "swapon -F fstab.out -a" } attach_dev_mdX_eli_cleanup() { @@ -141,7 +141,7 @@ attach_md_eli_body() # if the swapfile is too small (like 1k) then mdconfig hangs looking up the md atf_check -s exit:0 -x "truncate -s 10k swapfile" atf_check -s exit:0 -o save:fstab.out -x "echo 'md.eli none swap sw,file=swapfile 0 0'" - atf_check -s exit:0 -o match:"swapon: adding /dev/md0.eli as swap device" -x "swapon -F fstab.out -a" + atf_check -s exit:0 -o match:"swapon: adding /dev/md[0-9][0-9]*.eli as swap device" -x "swapon -F fstab.out -a" } attach_md_eli_cleanup() { @@ -159,7 +159,7 @@ attach_dev_md_eli_body() # if the swapfile is too small (like 1k) then mdconfig hangs looking up the md atf_check -s exit:0 -x "truncate -s 10k swapfile" atf_check -s exit:0 -o save:fstab.out -x "echo '/dev/md.eli none swap sw,file=swapfile 0 0'" - atf_check -s exit:0 -o match:"swapon: adding /dev/md0.eli as swap device" -x "swapon -F fstab.out -a" + atf_check -s exit:0 -o match:"swapon: adding /dev/md[0-9][0-9]*.eli as swap device" -x "swapon -F fstab.out -a" } attach_dev_md_eli_cleanup() {