Project

General

Profile

Actions

Bug #14245

closed

sed regression tests 7.1 and 7.7 are locale sensitive

Added by Robert Mustacchi 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
tests
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

The multi_test.ksh test 7.1 prints a bunch of values. When I'm in an en_US.UTF-8 locale or a C.UTF-8 locale, or likely any UTF-8 locale, this changes the output of the test as a bunch of escaped characters are now valid. The likely fix here is to force the C locale in the test script so we're in a uniform environment.

Actions #1

Updated by Robert Mustacchi 6 months ago

  • Subject changed from sed regression test 7.1 is locale sensitive to sed regression tests 7.1 and 7.7 are locale sensitive
Actions #2

Updated by Robert Mustacchi 6 months ago

Note, the 7.7 failure can sometimes be masked due to #14246.

Actions #3

Updated by Robert Mustacchi 6 months ago

  • Assignee set to Robert Mustacchi
  • Difficulty changed from Medium to Bite-size
Actions #4

Updated by Electric Monk 6 months ago

  • Gerrit CR set to 1811
Actions #5

Updated by Robert Mustacchi 6 months ago

The test now hardcodes asking for a C locale. I have tested this by running this in a different locale and verifying they all pass:

rm@beowulf:~$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8" 
LC_NUMERIC="en_US.UTF-8" 
LC_TIME="en_US.UTF-8" 
LC_COLLATE="en_US.UTF-8" 
LC_MONETARY="en_US.UTF-8" 
LC_MESSAGES="en_US.UTF-8" 
LC_ALL=
rm@beowulf:~$ /opt/util-tests/tests/sed/multi_test 
[PASS] 1 1.1 # Argument parsing - first type
[PASS] 2 1.2 # Argument parsing - first type
[PASS] 3 1.3 # Argument parsing - first type
[PASS] 4 1.4 # Argument parsing - first type
[PASS] 5 1.4.1 # Argument parsing - second type
[PASS] 6 1.5 # Argument parsing - second type
[PASS] 7 1.6 # Argument parsing - second type
[PASS] 8 1.7 # Argument parsing - second type
[PASS] 9 1.8 # Argument parsing - second type
[PASS] 10 1.9 # Argument parsing - second type
[PASS] 11 1.10 # Argument parsing - second type
[PASS] 12 1.11 # Argument parsing - second type
[PASS] 13 1.12 # Argument parsing - second type
[PASS] 14 1.13 # Argument parsing - second type
[PASS] 15 1.14 # Argument parsing - second type
[PASS] 16 1.15 # Argument parsing - second type
[PASS] 17 1.16 # Argument parsing - second type
[PASS] 18 1.17 # Argument parsing - second type
[PASS] 19 1.18 # Argument parsing - second type
[PASS] 20 2.1 # Address ranges
[PASS] 21 2.2 # Address ranges
[PASS] 22 2.3 # Address ranges
[PASS] 23 2.4 # Address ranges
[PASS] 24 2.5 # Address ranges
[PASS] 25 2.6 # Address ranges
[PASS] 26 2.7 # Address ranges
[PASS] 27 2.8 # Address ranges
[PASS] 28 2.9 # Address ranges
[PASS] 29 2.10 # Address ranges
[PASS] 30 2.11 # Address ranges
[PASS] 31 2.12 # Address ranges
[PASS] 32 2.13 # Address ranges
[PASS] 33 2.14 # Address ranges
[PASS] 34 2.15 # Address ranges
[PASS] 35 2.16 # Address ranges
[PASS] 36 2.17 # Address ranges
[PASS] 37 2.18 # Address ranges
[PASS] 38 2.19 # Address ranges
[PASS] 39 2.20 # Address ranges
[PASS] 40 2.21 # Address ranges
[PASS] 41 2.22 # Address ranges
[PASS] 42 2.23 # Address ranges
[PASS] 43 3.1 # Brace and other grouping
[PASS] 44 3.2 # Brace and other grouping
[PASS] 45 3.3 # Brace and other grouping
[PASS] 46 3.4 # Brace and other grouping
[PASS] 47 4.1 # Commands a c d and i
[PASS] 48 4.2 # Commands a c d and i
[PASS] 49 4.3 # Commands a c d and i
[PASS] 50 4.4 # Commands a c d and i
[PASS] 51 4.5 # Commands a c d and i
[PASS] 52 4.6 # Commands a c d and i
[PASS] 53 4.7 # Commands a c d and i
[PASS] 54 4.8 # Commands a c d and i
[PASS] 55 5.1 # Labels and branching
[PASS] 56 5.2 # Labels and branching
[PASS] 57 5.3 # Labels and branching
[PASS] 58 5.4 # Labels and branching
[PASS] 59 5.5 # Labels and branching
[PASS] 60 5.6 # Labels and branching
[PASS] 61 5.7 # Labels and branching
[PASS] 62 5.8 # Labels and branching
[PASS] 63 6.1 # Pattern space commands
[PASS] 64 6.2 # Pattern space commands
[PASS] 65 6.3 # Pattern space commands
[PASS] 66 6.4 # Pattern space commands
[PASS] 67 6.5 # Pattern space commands
[PASS] 68 6.6 # Pattern space commands
[PASS] 69 7.1 # Print and file routines
[PASS] 70 7.2 # Print and file routines
[PASS] 71 7.3 # Print and file routines
[PASS] 72 7.4 # w results
[PASS] 73 7.5 # w results
[PASS] 74 7.6 # w results
[PASS] 75 7.7 # w results
[PASS] 76 7.8 # w results
[PASS] 77 8.1 # Substitution commands
[PASS] 78 8.2 # Substitution commands
[PASS] 79 8.3 # Substitution commands
[PASS] 80 8.4 # Substitution commands
[PASS] 81 8.5 # Substitution commands
[PASS] 82 8.6 # Substitution commands
[PASS] 83 8.7 # Substitution commands
[PASS] 84 8.8 # Substitution commands
[PASS] 85 8.9 # Substitution commands
[PASS] 86 8.10 # Substitution commands
[PASS] 87 8.11 # Substitution commands
[PASS] 88 8.12 # s wfile results
[PASS] 89 8.13 # s wfile results
[PASS] 90 8.14 # s wfile results
[PASS] 91 8.15 # s wfile results
[PASS] 92 8.16 # s wfile results
[PASS] 93 8.17 # s wfile results
[PASS] 94 8.18 # [ as an s delimiter and its escapes
[PASS] 95 8.19 # [ as an s delimiter and its escapes
[PASS] 96 8.20 # [ as an s delimiter and its escapes
[PASS] 97 8.21 # \ in y command
[PASS] 98 8.22 # \n in a character class
[PASS] 99 8.23 # \n in a BRE
[PASS] 100 9.1 # Error cases
[PASS] 101 9.2 # Error cases
[PASS] 102 9.3 # Error cases
[PASS] 103 9.4 # Error cases
[PASS] 104 9.5 # Error cases
[PASS] 105 9.6 # Error cases
[PASS] 106 9.7 # Error cases
[PASS] 107 9.8 # Error cases
[PASS] 108 9.9 # Error cases
[PASS] 109 9.10 # Error cases
[PASS] 110 9.11 # Error cases
[PASS] 111 9.12 # Error cases
[PASS] 112 9.13 # Error cases
[PASS] 113 9.14 # Error cases
[PASS] 114 9.15 # Error cases
[PASS] 115 9.16 # Error cases
[PASS] 116 9.17 # Error cases
[PASS] 117 9.18 # Error cases
[PASS] 118 9.19 # Error cases
[PASS] 119 9.20 # Error cases
[PASS] 120 9.21 # Error cases
[PASS] 121 9.22 # Error cases
[PASS] 122 9.23 # Error cases
[PASS] 123 9.24 # Error cases
[PASS] 124 9.25 # Error cases
[PASS] 125 9.26 # Error cases
[PASS] 126 9.27 # Error cases
[PASS] 127 9.28 # Error cases
[PASS] 128 9.29 # Error cases
[PASS] 129 9.30 # Error cases
[PASS] 130 9.31 # Error cases
Pass/fail - 130/0

I have also run this as part of the full util-tests as part of a broader regression and sanity check:

rm@beowulf:~$ pfexec /opt/util-tests/bin/utiltest 
Test: /opt/util-tests/tests/allowed-ips (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/ar/artest (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/chown_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/date_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/find/findtest (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/grep_test (run as root)               [00:01] [PASS]
Test: /opt/util-tests/tests/head/head_test (run as root)          [00:00] [PASS]
Test: /opt/util-tests/tests/libjedec_test (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/libsff/libsff (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/make_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/mdb/mdbtest (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/mergeq/mqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/mergeq/wqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/pcidbtest (run as root)               [00:01] [PASS]
Test: /opt/util-tests/tests/pcieadm-priv (run as root)            [00:01] [PASS]
Test: /opt/util-tests/tests/pcieadmtest (run as root)             [00:03] [PASS]
Test: /opt/util-tests/tests/printf_test (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/set-linkprop (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/sleep/sleeptest (run as root)         [00:13] [PASS]
Test: /opt/util-tests/tests/smbios (run as root)                  [00:00] [PASS]
Test: /opt/util-tests/tests/svr4pkg_test (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/xargs_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/awk/runtests.sh (run as nobody)       [02:50] [PASS]
Test: /opt/util-tests/tests/ctf/precheck (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/ctf/ctftest (run as root)             [00:05] [PASS]
Test: /opt/util-tests/tests/demangle/afl-fast (run as root)       [00:01] [PASS]
Test: /opt/util-tests/tests/demangle/gcc-libstdc++ (run as root)  [00:00] [PASS]
Test: /opt/util-tests/tests/demangle/llvm-stdcxxabi (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_remove (run as root)   [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_trunc (run as root)    [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_00_blank (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_01_boolean (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_02_numbers (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_03_empty_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_04_number_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_05_strings (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_06_nested (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_07_nested_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/sed/sed_addr (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/sed/multi_test (run as root)          [00:00] [PASS]

Results Summary
PASS      40

Running Time:   00:03:24
Percent passed: 100.0%
Log directory:  /var/tmp/test_results/20211119T215715
Actions #6

Updated by Electric Monk 6 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit b15548ab7300ec8625be47442fd92b71ed91c2cd

commit  b15548ab7300ec8625be47442fd92b71ed91c2cd
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2021-11-19T23:41:11.000Z

    14245 sed regression tests 7.1 and 7.7 are locale sensitive
    Reviewed by: Yuri Pankov <ypankov@tintri.com>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF