OpenSolaris

You are not signed in. Sign in or register.

Heads-Up: nightly -w, and wsdiff(1)

Date: Fri, 11 Aug 2006 18:19:15 -0700
From: Eric Saxe <eric.saxe at sun dot com>
To: on-all at eng dot sun dot com, onnv-gate at onnv dot eng dot sun dot com
Subject: Heads-Up: nightly -w, and wsdiff(1)

Greetings,

The putback of:

    5016095 nightly should help determine what really changes from build 
to build

introduces a new onbld tool, wsdiff(1), and associated changes to nightly(1)
that can be used to determine which compiled (proto area) objects have
changed as a result of a given source change.

More specifically, this putback introduces a mechanism for determining which
deliverable objects should be specified when backporting changes destined
for patch delivery.

I. How do I use it?
-------------------
By invoking nightly with the -w flag set in NIGHTLY_OPTIONS, at the
conclusion of a successful build, nightly will report (in the summary mail)
which objects in the newly constructed proto area have changed, compared
to the previous build (if there was one):

    ==== Objects that differ since last build ====

    New objects found:
    usr/share/lib/keytables/type_6/latinamerica
    usr/share/lib/keytables/type_6/layout_11

    Changed objects:
    lib/ld.so.1
    lib/libadm.so.1
    lib/libavl.so.1
    ...

A "wsdiff.results" file detailing which objects differed (as well what 
looked
different about them), will also appear in nightly's log directory.

To determine which proto objects have changed as a result of a given
source change (as required in the patch RTI):

    - In a fresh/clobbered workspace, perform a full non-debug nightly build
    - Integrate your source changes into the workspace
    - Specify -w in NIGHTLY_OPTIONS, and perform another non-debug build
    - Look at the object list in the mail from nightly. Consult the
      "wsdiff.results" file in the log directory for additional detail.

For additional usage information, see the wsdiff(1) and nightly(1) man 
pages.

II. How does it work?
---------------------
wsdiff(1) compares two proto area subtrees (and the objects) within. Objects
existing in only one of the subtrees are reported as new/deleted. Objects
found in both subtrees are compared. Detected changes are then flagged, and
optionally logged.

III. Build Determinism
----------------------
For tools like wsdiff(1) to be effective, the ON build must be 
deterministic.
That is, successive compilations of identical source, should in turn produce
identical binaries. While this is largely true of our ON build, there are
exceptions including:
    - Use of __DATE__ / __TIME__ in source makes binaries look
      different with each compilation (since a different date/time
      is encoded in the binary).
    - "unique" disambiguation prefix generated for some static symbol names
    - Workspace name / date information encoded in .comment section
      of ELF binaries.

Integration of these bug fixes:
    6404908 ON builds should employ a static globalization prefix
    6404876 uses of __DATE__ / __TIME__ should be purged from ON

...fixes today's build determinism issues associated with the first two
cases above, while wsdiff handles cases like the 3rd by ignoring the
non-germane (and non-deterministic) portions of the ELF binary.

However, build determinism issues may sneak in over time, which will 
manifest
in the form of "false positives" reported by wsdiff (a false positive is
where an object changes *not* as a result of the intended source change,
but simply because the object's unchanged source does not build the same way
twice).

Please report any such build issues by filing bugs against the appropriate
product cat/subcat, and by adding the "wsdiff" keyword to the CR.

IV. When will this be available for use on the on10 patch gate?
---------------------------------------------------------------
Very soon. Efforts to integrate these changes to the on10-patch development
environment are underway. In the meanwhile, please see:
        http://muskoka.sfbay/~esaxe/patch.html

for interim versions of on10-patch based nightly(1) and wsdiff(1) that
you can use.

V. I have questions about wsdiff(1) or something that it's reporting...
-----------------------------------------------------------------------
Please send any questions/comments my way (eric.saxe at sun dot com)

Thanks,
-Eric