-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Casenorm tests: enable backslash interpretation #8812
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
experiment with printf
will be interest
Ah, the problem is with non-existing |
Thanks for looking in to this. As part of the final fix you're going to want to remove the |
Codecov Report
@@ Coverage Diff @@
## master #8812 +/- ##
==========================================
+ Coverage 79.11% 79.14% +0.03%
==========================================
Files 419 419
Lines 123704 123696 -8
==========================================
+ Hits 97870 97902 +32
+ Misses 25834 25794 -40
Continue to review full report at Codecov.
|
Is this guaranteed to run under |
653962e
to
c28530e
Compare
@ikozhukhov @rlaager I've got it working via printf, just replaced lines with needed format for printf. @behlendorf thank you, removed tests from exclusion list. Used |
@gmelikov looks like a simple (partial) fix, any news on this? Being WIP and such... |
@Ornias1993 unfortunately it's not so simple - printf does work in Linux, but some tests are failing, I think there are some problems with ksh in Linux, but I didn't find the root cause yet. I've updated PR and excluded problematic tests from PR for now, let's see tests and maybe merge this change as is. |
This could be an issue with
For example, a snipet from the ZTS output:
Using
|
Ahh, it seems the locale is being lost from the environment. @gmelikov adding the following hunk to this PR should be enough. diff --git a/tests/zfs-tests/tests/functional/casenorm/casenorm.cfg b/tests/zfs-tests/tests/functional/casenorm/casenorm.cfg
index e35a726e7df..f955d33cd19 100644
--- a/tests/zfs-tests/tests/functional/casenorm/casenorm.cfg
+++ b/tests/zfs-tests/tests/functional/casenorm/casenorm.cfg
@@ -17,6 +17,9 @@
# Copyright (c) 2016 by Delphix. All rights reserved.
#
+LANG=en_US.UTF-8
+LC_ALL=en_US.UTF-8
+
NAME_C_ORIG=$(printf '\u0046\u00ef\u004c\u00eb\u004e\u00c4\u006d\u00eb')
NAME_C_UPPER=$(printf '\u0046\u00cf\u004c\u00cb\u004e\u00c4\u004d\u00cb')
NAME_C_LOWER=$(printf '\u0066\u00ef\u006c\u00eb\u006e\u00e4\u006d\u00eb') |
Instead of "en_US", does "C" or "C.UTF-8" work? If so, it might be better to use that. Otherwise, en_US.UTF-8 is probably fine. |
e7da159
to
d6d3ebb
Compare
@behlendorf thank you! Unfortunately, locale fix didn't work for buildbot, so I've used bash hack. |
Bash hack didn't work either for buildbot. Interesting. |
Can you try the following. @rlaager's suggestion works for me locally.
Note that with this change I still do see 6 local failures like with the original PR. But everything looks to be escaped properly so those failures will need to be inspected individually.
|
Use `printf` to properly interpret unusual symbols. + zlook doesn't exists in ZoL, use `test`. Signed-off-by: George Melikov <mail@gmelikov.ru>
@behlendorf ah, I thought you had all tests passed. Added locale fix for fedora, excluded problematic tests. We may merge this PR and tackle with other tests next time. |
Use `printf` to properly interpret unicode characters. Illumos uses a utility called `zlook` to allow additional flags to be provided to readdir and lookup for testing. This functionality could be ported to Linux, but even without it several of the tests can be enabled by instead using the standard `test` command. Additional, work is required to enable the remaining test cases. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Melikov <mail@gmelikov.ru> Issue openzfs#7633 Closes openzfs#8812
Use `printf` to properly interpret unicode characters. Illumos uses a utility called `zlook` to allow additional flags to be provided to readdir and lookup for testing. This functionality could be ported to Linux, but even without it several of the tests can be enabled by instead using the standard `test` command. Additional, work is required to enable the remaining test cases. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Melikov <mail@gmelikov.ru> Issue openzfs#7633 Closes openzfs#8812
Use `printf` to properly interpret unicode characters. Illumos uses a utility called `zlook` to allow additional flags to be provided to readdir and lookup for testing. This functionality could be ported to Linux, but even without it several of the tests can be enabled by instead using the standard `test` command. Additional, work is required to enable the remaining test cases. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Melikov <mail@gmelikov.ru> Issue #7633 Closes #8812
echo
must have-e
argument to properlyinterpret unusual symbols.
Signed-off-by: George Melikov mail@gmelikov.ru
Motivation and Context
Fix #7633
Description
Thanks to @ikozhukhov , the problem resolves with this patch.
How Has This Been Tested?
WIP, waiting for buildbot successfull finish.
Types of changes
Checklist:
Signed-off-by
.