components/cups/README.trustext
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 2389 7984e0fd8655
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2389
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     1
#
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     3
#
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     7
#
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    12
#
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    18
#
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    20
#
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    21
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    22
#
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    23
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    24
SETTING UP TEST ENVIRONMENT
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    25
--------------------------- 
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    26
The following steps should be followed for setting up the test environment
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    27
for Trusted Solaris:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    28
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    29
1. Install trusted packages
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    30
	# pkg install system/trusted
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    31
	# pkg install system/trusted/trusted-global-zone
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    32
	# pkg install trusted-extensions
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    33
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    34
2. Enable labeld service
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    35
	# svcadm enable -s labeld
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    36
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    37
3. Verify that the service is enabled.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    38
	# svcs -x labeld
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    39
	svc:/system/labeld:default (Trusted Extensions)
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    40
	 State: online since weekday month date hour:minute:second year
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    41
	   See: labeld(1M)
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    42
	Impact: None.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    43
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    44
4. This step is required in case you want to install your own
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    45
   label_encodings file.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    46
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    47
   To test labels greater than 80 characters, you will have to use
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    48
   large labels_encodings file.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    49
   i)   Copy the label_encodings file to the disk.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    50
   ii)  Check the syntax of the file and make it the active
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    51
        label_encodings file.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    52
     a) Run the chk_encodings command.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    53
	# /usr/sbin/chk_encodings /full-pathname-of-label-encodings-file
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    54
     b) Make the file the active label_encodings file.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    55
	# cp /full-pathname-of-label-encodings-file \
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    56
	  /etc/security/tsol/label.encodings.site
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    57
	# cd /etc/security/tsol
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    58
	# cp label_encodings label_encodings.tx.orig
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    59
	# cp label.encodings.site label_encodings
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    60
   Your label_encodings file must pass the Check Encodings test before
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    61
   you continue.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    62
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    63
5. Reboot the system.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    64
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    65
6. Once the system is up after reboot, create labeled zones.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    66
   Labeled zones can be created using '/usr/sbin/txzonemgr' command.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    67
   For details refer to 'txzonemgr(1M)' manpage.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    68
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    69
   Documentation on 'Printing in Trusted extensions environment' can be found at:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    70
   http://docs.oracle.com/cd/E23824_01/html/821-1482/manageprint-1.html#scrolltoc
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    71
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    72
--------------------------------------------------------------------------------------------
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    73
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    74
TEST CASES
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    75
----------
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    76
All the following test cases should be run in Trusted Solaris environment.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    77
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    78
1. Run printing test suite for CUPS.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    79
   Details on printing test-suite can be found at:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    80
   https://stbeehive.oracle.com/teamcollab/wiki/Solaris+Printing:CUPS+Printing+Test+Suite
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    81
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    82
2. Printing from labeled zones to network printer directly.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    83
3. Printing from labeled zones to network printer via Global zone.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    84
4. Printing from global zone to directly attached USB printer.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    85
5. Printing from global zone to network printer.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    86
6. Print in different orientations.  (Should be tested for both Image & Text files)
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    87
   The -o landscape option will rotate the page 90 degrees to print in landscape 
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    88
   orientation:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    89
	lp -o landscape filename
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    90
	lpr -o landscape filename
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    91
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    92
   The -o orientation-requested=N option rotates the page depending on the value of N:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    93
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    94
	-o orientation-requested=3 - portrait orientation (no rotation)
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    95
	-o orientation-requested=4 - landscape orientation (90 degrees)
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    96
	-o orientation-requested=5 - reverse landscape or seascape orientation (270 degrees)
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    97
	-o orientation-requested=6 - reverse portrait or upside-down orientation
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    98
				     (180 degrees)
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
    99
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   100
   -o number-up=2
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   101
   -o number-up=6
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   102
   this should be landscape by default
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   103
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   104
   rest number-up should be portrait
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   105
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   106
   Mix -o number-up & orientation-requested.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   107
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   108
7. Printing On Both Sides of the Paper
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   109
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   110
	-o sides=two-sided-short-edge
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   111
	-o sides=two-sided-long-edge
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   112
   These options will enable two-sided printing on the printer if the printer supports it.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   113
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   114
   '-o sides=two-sided-short-edge' option is suitable for landscape pages,
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   115
   while '-o sides=two-sided-long-edge' option is suitable for portrait pages:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   116
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   117
	lp -o sides=two-sided-short-edge filename
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   118
	lp -o sides=two-sided-long-edge filename
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   119
	lpr -o sides=two-sided-long-edge filename
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   120
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   121
   The default is to print single-sided:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   122
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   123
	lp -o sides=one-sided filename
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   124
	lpr -o sides=one-sided filename
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   125
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   126
8. Labels greater than 80 characters. 
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   127
   Labels greater than 80 characters would be truncated at the right by '->'
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   128
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   129
9. Printing to a printer in same subnet.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   130
   If the printer is in the same subnet, then add it using cups web interface
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   131
   at localhost:631
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   132
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   133
10. Printing to a printer in different subnet.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   134
   You should be able to ping the printer ip address.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   135
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   136
   Adding the printer:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   137
	lpadmin -p printer_name -E -v socket://<ip-addr-of-printer> -m <model>
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   138
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   139
   You can find your printer model using
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   140
	lpinfo -m | grep -i <model name>
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   141
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   142
	model example: "foomatic-db-ppds/Ricoh/PS/Ricoh-Aficio_MP_5000_PS.ppd.gz"
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   143
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   144
   e.g:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   145
	lpadmin -p printer -E -v socket://10.163.198.77 -m foomatic-db-ppds/Ricoh/PS/Ricoh-Aficio_MP_5000_PS.ppd.gz
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   146
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   147
11. Printing without banner and trailer pages and also without page-labels.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   148
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   149
	-o nolabels
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   150
   Does not print job labels
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   151
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   152
	-o job-sheets=none
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   153
	-o job-sheets=none, none
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   154
	-o job-sheets=none,<any-label>
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   155
   The above three work same. No banner and trailer pages get printed.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   156
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   157
	-o job-sheets=<any-label>,none
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   158
	-o job-sheets=<any-label>,<any-label>
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   159
   The above two work same. Both banner and trailer pages get printed.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   160
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   161
	-o job-sheets=none -o nolabels
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   162
   No banner and trailer page and no job-labels
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   163
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   164
12. Test following authorizations:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   165
	solaris.print.admin
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   166
	solaris.print.unlabeled
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   167
	solaris.print.nobanner
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   168
	solaris.print.list
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   169
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   170
   Following command can be used to list the user authorizations:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   171
	$ auths <user>
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   172
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   173
   For eg:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   174
   Printing from a labeled zone as root.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   175
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   176
	$ lp -d public -o job-sheets=none,none /etc/release
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   177
	request id is public-19 (1 file(s))
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   178
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   179
   This request is submitted to the server as 'remroot'. In this case both
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   180
   banner and trailer pages get printed, as 'remroot' does not have the
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   181
   solaris.print.nobanner authorization.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   182
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   183
   solaris.print.list
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   184
	# lp -d test /etc/release
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   185
	request id is test-313 (1 file(s))
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   186
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   187
	# lpstat test
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   188
	test-313                root              3072   Fri Mar 30 07:42:58 2012
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   189
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   190
	---> Login as 'remroot' <---
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   191
	# su - remroot
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   192
	Oracle Corporation      SunOS 5.11      11.0    November 2011
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   193
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   194
	---> 'remroot' doesn't have solaris.print.list authorization so it cannot list
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   195
              the jobs for printer test <---
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   196
	$ lpstat test
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   197
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   198
	$ lp -d test /etc/release
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   199
	request id is test-314 (1 file(s))
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   200
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   201
	---> For 'remroot', 'lpstat' lists only the jobs requested by 'remroot' <---
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   202
	$ lpstat test
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   203
	test-314                remroot           3072   Fri Mar 30 07:43:44 2012
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   204
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   205
	$ logout
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   206
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   207
	---> For 'root', 'lpstat' lists all the jobs <---
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   208
	# lpstat test
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   209
	test-313                root              3072   Fri Mar 30 07:42:58 2012
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   210
	test-314                remroot           3072   Fri Mar 30 07:43:44 2012
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   211
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   212
	---> Give remroot solaris.print.list authorization <---
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   213
	# usermod -A solaris.print.list remroot
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   214
	Found user in files repository.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   215
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   216
	---> Login as 'remroot'
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   217
	[email protected]:/var/log/cups# su - remroot
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   218
	Oracle Corporation      SunOS 5.11      11.0    November 2011
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   219
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   220
	---> Now for 'root', 'lpstat' lists all the jobs <---
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   221
	-bash-4.1$ lpstat test
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   222
	test-313                root              3072   Fri Mar 30 07:42:58 2012
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   223
	test-314                remroot           3072   Fri Mar 30 07:43:44 2012
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   224
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   225
13. Printing to a printer which is outside the labeled range.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   226
   E.g: Printing from a 'Public Zone' to a printer labeled 'Confidential'
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   227
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   228
	$ lp -d hp /etc/release
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   229
	lp: label violation.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   230
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   231
14. Cascade printing
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   232
   Print from a system which is accessible from local zone, to a printer which
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   233
   is accessible to the GZ only.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   234
   Print request goes from the system to LZ to GZ to Printer.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   235
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   236
   Note: For cascading to work printer must be shared on both LZ and GZ.
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   237
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   238
   Printer can be shared from command line as:
7984e0fd8655 7184564 Test cases for printing via CUPS in TX environment
Sonam Gupta <sonam.x.gupta@oracle.com>
parents:
diff changeset
   239
	$ lpadmin -p <printer> -o printer-is-shared=true