#!/bin/bash
# SPDX-License-Identifier: GPL-3.0+
# Copyright (C) 2024 Western Digital Corporation or its affiliates.

# The helper function for test cases with CAN_BE_ZONED flag and test()
# function. Run the test case twice for non-zoned and zoned conditions.
set_conditions() {
	local index=$1

	if [[ -z $index ]]; then
		echo 2
		return
	fi

	if ((index == 0)); then
		export RUN_FOR_ZONED=0
		export COND_DESC=
	elif ((index == 1)); then
		export RUN_FOR_ZONED=1
		export COND_DESC="zoned"
	fi
}
