[PATCH net-next v4 09/12] selftests/vsock: add BUILD=0 definition

Bobby Eshleman posted 12 patches 1 month, 1 week ago
[PATCH net-next v4 09/12] selftests/vsock: add BUILD=0 definition
Posted by Bobby Eshleman 1 month, 1 week ago
From: Bobby Eshleman <bobbyeshleman@meta.com>

Add the definition for BUILD and initialize it to zero. This avoids
'bash -u vmtest.sh` from throwing 'unbound variable' when BUILD is not
set to 1 and is later checked for its value.

Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>
---
Changes in v2:
- remove fixes tag because it doesn't fix breakage of kselftest, and
  just supports otherwise invoking with bash -u
---
 tools/testing/selftests/vsock/vmtest.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/vsock/vmtest.sh b/tools/testing/selftests/vsock/vmtest.sh
index a1c2969c44b6..e961b65b4c6e 100755
--- a/tools/testing/selftests/vsock/vmtest.sh
+++ b/tools/testing/selftests/vsock/vmtest.sh
@@ -548,6 +548,7 @@ run_shared_vm_test() {
 	return "${rc}"
 }
 
+BUILD=0
 QEMU="qemu-system-$(uname -m)"
 
 while getopts :hvsq:b o

-- 
2.47.3
Re: [PATCH net-next v4 09/12] selftests/vsock: add BUILD=0 definition
Posted by Stefano Garzarella 1 month ago
On Sat, Nov 08, 2025 at 08:01:00AM -0800, Bobby Eshleman wrote:
>From: Bobby Eshleman <bobbyeshleman@meta.com>
>
>Add the definition for BUILD and initialize it to zero. This avoids
>'bash -u vmtest.sh` from throwing 'unbound variable' when BUILD is not
>set to 1 and is later checked for its value.
>
>Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>
>---
>Changes in v2:
>- remove fixes tag because it doesn't fix breakage of kselftest, and
>  just supports otherwise invoking with bash -u
>---
> tools/testing/selftests/vsock/vmtest.sh | 1 +
> 1 file changed, 1 insertion(+)

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

>
>diff --git a/tools/testing/selftests/vsock/vmtest.sh b/tools/testing/selftests/vsock/vmtest.sh
>index a1c2969c44b6..e961b65b4c6e 100755
>--- a/tools/testing/selftests/vsock/vmtest.sh
>+++ b/tools/testing/selftests/vsock/vmtest.sh
>@@ -548,6 +548,7 @@ run_shared_vm_test() {
> 	return "${rc}"
> }
>
>+BUILD=0
> QEMU="qemu-system-$(uname -m)"
>
> while getopts :hvsq:b o
>
>-- 
>2.47.3
>