Skip to content

Commit

Permalink
Casenorm tests: fix unicode interpretation
Browse files Browse the repository at this point in the history
`echo` must have `-e` argument to properly
interpret unusual symbols.

+ zlook doesn't exists in ZoL, use `test`.

Signed-off-by: George Melikov <mail@gmelikov.ru>

TEST_ZFSTESTS_TAGS="casenorm"
  • Loading branch information
gmelikov committed Jun 2, 2019
1 parent 8708fd8 commit 653962e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
14 changes: 0 additions & 14 deletions tests/test-runner/bin/zts-report.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,6 @@
# reasons listed above can be used.
#
known = {
'casenorm/sensitive_none_lookup': ['FAIL', '7633'],
'casenorm/sensitive_none_delete': ['FAIL', '7633'],
'casenorm/sensitive_formd_lookup': ['FAIL', '7633'],
'casenorm/sensitive_formd_delete': ['FAIL', '7633'],
'casenorm/insensitive_none_lookup': ['FAIL', '7633'],
'casenorm/insensitive_none_delete': ['FAIL', '7633'],
'casenorm/insensitive_formd_lookup': ['FAIL', '7633'],
'casenorm/insensitive_formd_delete': ['FAIL', '7633'],
'casenorm/mixed_none_lookup': ['FAIL', '7633'],
'casenorm/mixed_none_lookup_ci': ['FAIL', '7633'],
'casenorm/mixed_none_delete': ['FAIL', '7633'],
'casenorm/mixed_formd_lookup': ['FAIL', '7633'],
'casenorm/mixed_formd_lookup_ci': ['FAIL', '7633'],
'casenorm/mixed_formd_delete': ['FAIL', '7633'],
'cli_root/zfs_receive/zfs_receive_004_neg': ['FAIL', known_reason],
'cli_root/zfs_unshare/zfs_unshare_002_pos': ['SKIP', na_reason],
'cli_root/zfs_unshare/zfs_unshare_006_pos': ['SKIP', na_reason],
Expand Down
12 changes: 6 additions & 6 deletions tests/zfs-tests/tests/functional/casenorm/casenorm.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
# Copyright (c) 2016 by Delphix. All rights reserved.
#

NAME_C_ORIG=$(echo 'F\0303\0257L\0303\0253N\0303\0204m\0303\0253')
NAME_C_UPPER=$(echo 'F\0303\0217L\0303\0213N\0303\0204M\0303\0213')
NAME_C_LOWER=$(echo 'f\0303\0257l\0303\0253n\0303\0244m\0303\0253')
NAME_D_ORIG=$(echo 'Fi\0314\0210Le\0314\0210NA\0314\0210me\0314\0210')
NAME_D_UPPER=$(echo 'FI\0314\0210LE\0314\0210NA\0314\0210ME\0314\0210')
NAME_D_LOWER=$(echo 'fi\0314\0210le\0314\0210na\0314\0210me\0314\0210')
NAME_C_ORIG=$(echo -e 'F\0303\0257L\0303\0253N\0303\0204m\0303\0253')
NAME_C_UPPER=$(echo -e 'F\0303\0217L\0303\0213N\0303\0204M\0303\0213')
NAME_C_LOWER=$(echo -e 'f\0303\0257l\0303\0253n\0303\0244m\0303\0253')
NAME_D_ORIG=$(echo -e 'Fi\0314\0210Le\0314\0210NA\0314\0210me\0314\0210')
NAME_D_UPPER=$(echo -e 'FI\0314\0210LE\0314\0210NA\0314\0210ME\0314\0210')
NAME_D_LOWER=$(echo -e 'fi\0314\0210le\0314\0210na\0314\0210me\0314\0210')
NAMES_ORIG="$NAME_C_ORIG $NAME_D_ORIG"
NAMES_UPPER="$NAME_C_UPPER $NAME_D_UPPER"
NAMES_LOWER="$NAME_C_LOWER $NAME_D_LOWER"
Expand Down
12 changes: 10 additions & 2 deletions tests/zfs-tests/tests/functional/casenorm/casenorm.kshlib
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,22 @@ function lookup_file
{
typeset name=$1

zlook -l $TESTDIR $name >/dev/null 2>&1
if is_linux; then
test -f "${TESTDIR}/${name}" >/dev/null 2>&1
else
zlook -l $TESTDIR $name >/dev/null 2>&1
fi
}

function lookup_file_ci
{
typeset name=$1

zlook -il $TESTDIR $name >/dev/null 2>&1
if is_linux; then
test -f "${TESTDIR}/${name}" >/dev/null 2>&1
else
zlook -il $TESTDIR $name >/dev/null 2>&1
fi
}

function lookup_any
Expand Down

0 comments on commit 653962e

Please sign in to comment.