@@ -32,7 +32,7 @@ test() {
_add_nvmet_subsys_to_port "${port}" "blktests-subsystem-$i"
done
- nvme discover -t loop | sed -r -e "s/portid: [0-9]+/portid: X/"
+ nvme discover -t loop | _filter_discovery
for ((i = iterations - 1; i >= 0; i--)); do
_remove_nvmet_subsystem_from_port "${port}" "blktests-subsystem-$i"
@@ -1,6 +1,6 @@
Running nvme/002
-Discovery Log Number of Records 1000, Generation counter 1000
+Discovery Log Number of Records 1000, Generation counter X
=====Discovery Log Entry 0======
trtype: loop
adrfam: pci
@@ -34,7 +34,7 @@ test() {
port="$(_create_nvmet_port "loop")"
_add_nvmet_subsys_to_port "$port" "${subsys_nqn}"
- nvme discover -t loop | sed -r -e "s/portid: [0-9]+/portid: X/"
+ nvme discover -t loop | _filter_discovery
_remove_nvmet_subsystem_from_port "${port}" "${subsys_nqn}"
_remove_nvmet_port "${port}"
@@ -1,6 +1,6 @@
Running nvme/016
-Discovery Log Number of Records 1, Generation counter 1
+Discovery Log Number of Records 1, Generation counter X
=====Discovery Log Entry 0======
trtype: loop
adrfam: pci
@@ -37,7 +37,7 @@ test() {
port="$(_create_nvmet_port "loop")"
_add_nvmet_subsys_to_port "${port}" "${subsys_name}"
- nvme discover -t loop | sed -r -e "s/portid: [0-9]+/portid: X/"
+ nvme discover -t loop | _filter_discovery
_remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
_remove_nvmet_port "${port}"
@@ -1,6 +1,6 @@
Running nvme/017
-Discovery Log Number of Records 1, Generation counter 1
+Discovery Log Number of Records 1, Generation counter X
=====Discovery Log Entry 0======
trtype: loop
adrfam: pci
@@ -118,3 +118,8 @@ _find_nvme_loop_dev() {
fi
done
}
+
+_filter_discovery() {
+ sed -r -e "s/portid: [0-9]+/portid: X/" \
+ -e "s/Generation counter [0-9]+/Generation counter X/"
+}