Print this page
4206 history_003_pos relies on exact size of history log and entries
4207 history_008_pos depends on obsolete internal history log message
4208 Typo in zfs_main.c: "posxiuser"
4209 Populate zfstest with the remainder of the STF tests
Reviewed by: Sonu Pillai <sonu.pillai@delphix.com>
Reviewed by: Will Guyette <will.guyette@delphix.com>
Reviewed by: Eric Diven <eric.diven@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/test/test-runner/cmd/run.py
          +++ new/usr/src/test/test-runner/cmd/run.py
↓ open down ↓ 4 lines elided ↑ open up ↑
   5    5  # Common Development and Distribution License ("CDDL"), version 1.0.
   6    6  # You may only use this file in accordance with the terms of version
   7    7  # 1.0 of the CDDL.
   8    8  #
   9    9  # A full copy of the text of the CDDL should have accompanied this
  10   10  # source.  A copy of the CDDL is also available via the Internet at
  11   11  # http://www.illumos.org/license/CDDL.
  12   12  #
  13   13  
  14   14  #
  15      -# Copyright (c) 2012 by Delphix. All rights reserved.
       15 +# Copyright (c) 2013 by Delphix. All rights reserved.
  16   16  #
  17   17  
  18   18  import ConfigParser
  19   19  import os
  20   20  import logging
  21   21  from datetime import datetime
  22   22  from optparse import OptionParser
  23   23  from pwd import getpwnam
  24   24  from pwd import getpwuid
  25   25  from select import select
↓ open down ↓ 201 lines elided ↑ open up ↑
 227  227      def log(self, logger, options):
 228  228          """
 229  229          This function is responsible for writing all output. This includes
 230  230          the console output, the logfile of all results (with timestamped
 231  231          merged stdout and stderr), and for each test, the unmodified
 232  232          stdout/stderr/merged in it's own file.
 233  233          """
 234  234          if logger is None:
 235  235              return
 236  236  
 237      -        user = ' (run as %s)' % self.user if len(self.user) else ''
      237 +        logname = getpwuid(os.getuid()).pw_name
      238 +        user = ' (run as %s)' % (self.user if len(self.user) else logname)
 238  239          msga = 'Test: %s%s ' % (self.pathname, user)
 239  240          msgb = '[%s] [%s]' % (self.result.runtime, self.result.result)
 240  241          pad = ' ' * (80 - (len(msga) + len(msgb)))
 241  242  
 242  243          # If -q is specified, only print a line for tests that didn't pass.
 243  244          # This means passing tests need to be logged as DEBUG, or the one
 244  245          # line summary will only be printed in the logfile for failures.
 245  246          if not options.quiet:
 246  247              logger.info('%s%s%s' % (msga, pad, msgb))
 247  248          elif self.result.result is not 'PASS':
↓ open down ↓ 592 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX