Fix test_glob_utf8 to not run into NAME_MAX on ZFS and reenable it.
PiperOrigin-RevId: 254735250
diff --git a/src/test/shell/integration/loading_phase_posix_test.sh b/src/test/shell/integration/loading_phase_posix_test.sh
index ec5e0f2..dedff2d 100755
--- a/src/test/shell/integration/loading_phase_posix_test.sh
+++ b/src/test/shell/integration/loading_phase_posix_test.sh
@@ -72,13 +72,16 @@
done
}
-# TODO(b/131100868): Re-enable this test.
-function DISABLED_test_glob_utf8() {
+function test_glob_utf8() {
local -r pkg="$FUNCNAME"
mkdir $pkg
echo "filegroup(name='t', srcs=glob(['*']))" > $pkg/BUILD
cd $pkg
- perl -CS -e 'for $i (160..0xd7ff) {print chr $i, $i%80?"":"\n"}' | xargs touch
+ # This might print error messages for individual file names on systems like
+ # macOS that use a file system that only permits correct UTF-8 strings as file
+ # names. The errors can be ignored - we just test with whatever files the OS
+ # allowed us to create.
+ perl -CS -e 'for $i (160..0xd7ff) {print chr $i, $i%20?"":"\n"}' | xargs touch || true
cd ..
bazel query "//$pkg:*" >& $TEST_log || fail "Expected success"
}