Print this page
12197 sleeptest is failing

Split Close
Expand all
Collapse all
          --- old/usr/src/test/util-tests/tests/sleep/sleeptest.ksh
          +++ new/usr/src/test/util-tests/tests/sleep/sleeptest.ksh
↓ open down ↓ 4 lines elided ↑ open up ↑
   5    5  # You may only use this file in accordance with the terms of version
   6    6  # 1.0 of the CDDL.
   7    7  #
   8    8  # A full copy of the text of the CDDL should have accompanied this
   9    9  # source.  A copy of the CDDL is also available via the Internet at
  10   10  # http://www.illumos.org/license/CDDL.
  11   11  #
  12   12  
  13   13  #
  14   14  # Copyright 2019 Robert Mustacchi
       15 +# Copyright 2020 Joyent, Inc.
  15   16  #
  16   17  
  17   18  #
  18   19  # Basic tests of sleep(1). sleep is a little hard to test, especially
  19   20  # for longer running cases. Therefore to test it, we basically take
  20   21  # advantage of our knowledge of how it is implemented. We see that it
  21   22  # properly is sleeping for the right amount of time by looking at the
  22   23  # call to nanosleep in libc and make sure that the structures time is
  23   24  # what we expect.
  24   25  #
↓ open down ↓ 136 lines elided ↑ open up ↑
 161  162  sleep_err 1 2 3
 162  163  sleep_err 1@23
 163  164  sleep_err 0,56
 164  165  sleep_err "hello"
 165  166  sleep_err s
 166  167  sleep_err 1z
 167  168  sleep_err -- -0.3
 168  169  
 169  170  #
 170  171  # Test a locale that uses a ',' character (de_DE.UTF-8 is one) as the
 171      -# decimal point to make sure that sleep correctly is using LC_NUMERIC.
 172      -#
 173      -export LANG=de_DE.UTF-8
      172 +# decimal point to make sure that sleep is correctly using LC_NUMERIC.
      173 +export LC_ALL=de_DE.UTF-8
 174  174  sleep_err 21.45
 175  175  sleep_one 2,5 2 500000000
 176  176  sleep_one 34,0051 34 5100000
 177  177  sleep_one 3,6d 311040 0
 178      -export LANG=C.UTF-8
      178 +export LC_ALL=C.UTF-8
 179  179  
 180  180  exit $sleep_exit
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX