diff --git a/tests/halrun-lock/README b/tests/halrun-lock/README new file mode 100644 index 00000000000..662031ee3cc --- /dev/null +++ b/tests/halrun-lock/README @@ -0,0 +1 @@ +Tests that the various lock commands result in the expected locking status. diff --git a/tests/halrun-lock/expected b/tests/halrun-lock/expected new file mode 100644 index 00000000000..6df356a71f9 --- /dev/null +++ b/tests/halrun-lock/expected @@ -0,0 +1,28 @@ +HAL locking status: + current lock value 0 (00) + HAL_LOCK_NONE - nothing is locked +HAL locking status: + current lock value 255 (ff) + HAL_LOCK_LOAD - loading of new components is locked + HAL_LOCK_CONFIG - link and addf is locked + HAL_LOCK_PARAMS - setting params is locked + HAL_LOCK_RUN - running/stopping HAL is locked +HAL locking status: + current lock value 0 (00) + HAL_LOCK_NONE - nothing is locked +HAL locking status: + current lock value 3 (03) + HAL_LOCK_LOAD - loading of new components is locked + HAL_LOCK_CONFIG - link and addf is locked +HAL locking status: + current lock value 0 (00) + HAL_LOCK_NONE - nothing is locked +HAL locking status: + current lock value 255 (ff) + HAL_LOCK_LOAD - loading of new components is locked + HAL_LOCK_CONFIG - link and addf is locked + HAL_LOCK_PARAMS - setting params is locked + HAL_LOCK_RUN - running/stopping HAL is locked +HAL locking status: + current lock value 0 (00) + HAL_LOCK_NONE - nothing is locked diff --git a/tests/halrun-lock/halrun.hal b/tests/halrun-lock/halrun.hal new file mode 100644 index 00000000000..569b5df363a --- /dev/null +++ b/tests/halrun-lock/halrun.hal @@ -0,0 +1,14 @@ +status +lock +status +unlock +status +lock tune +status +unlock tune +status +lock all +status +unlock all +status + diff --git a/tests/halrun-lock/test.sh b/tests/halrun-lock/test.sh new file mode 100644 index 00000000000..ee6fd8ce226 --- /dev/null +++ b/tests/halrun-lock/test.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +halrun -f halrun.hal | grep -i lock +