diff options
author | Baokun Li <libaokun1@huawei.com> | 2022-12-29 21:44:34 +0800 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-01-14 21:29:49 +0800 |
commit | e3774b281662d04a3cdab6c2eda2742a61854176 (patch) | |
tree | af7cc7d47624ecd7c4a48af05be528f8147b8fbe /check | |
parent | fbd489798b31e32f0eaefcd754326a06aa5b166f (diff) |
overlay: avoid to use NULL OVL_BASE_FSTYP for mounting
Generally, FSTYP is used to specify OVL_BASE_FSTYP. When we specify FSTYP
through an environment variable, it is not converted to OVL_BASE_FSTYP.
In addition, sometimes we do not even specify the file type. For example,
we only use `./check -n -overlay -g auto` to list overlay-related cases.
If OVL_BASE_FSTYP is NULL, mounting fails and the test fails.
To solve this problem, try to assign a value to OVL_BASE_FSTYP when
specifying -overlay. In addition, in the _overlay_base_mount function,
the basic file system type of the overlay is specified only when
OVL_BASE_FSTYP is not NULL.
Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'check')
-rwxr-xr-x | check | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -283,6 +283,7 @@ while [ $# -gt 0 ]; do FSTYP="${1:1}" ;; -overlay) + [ "$FSTYP" == overlay ] || export OVL_BASE_FSTYP="$FSTYP" FSTYP=overlay export OVERLAY=true ;; |