bits-511 released with these changes:
BITS now logs all of the output from Python-based tests to an in-memory log. BITS has a new top-level menu "View and Save Log", from which you can review the log, clear it, or save it as a new ACPI table with signature BITS. Yes, BITS has the ability to save log output now. And there was much rejoicing.
The log includes all output generated from Python scripts in BITS. It does not include non-Python output. Over time, as more of BITS migrates to Python, the log will become more complete.
Saving the log will add a new ACPI table with signature BITS, which will exist only until you next boot the system. That table consists of an ACPI header followed by the log file as plain text. To access the log and save it to disk:
- Boot any OS which can write to disk.
- Dump the ACPI table with signature BITS to a file.
- Strip off the ACPI header (the first 36 bytes).
Under Linux, you can save the log data with dd
as root:
dd if=/sys/firmware/acpi/tables/BITS bs=1 skip=36 of=bits.log
BITS now implements a new GRUB device, (python)
, which can expose arbitrary
data from Python (inspired by FUSE). This allows any GRUB command which
operates on files to operate on arbitrary data provided by Python. It's
almost like having a writable filesystem. The new log mechanism uses this
filesystem, exposing the plain-text log as (python)/log
and the version with
an ACPI table header as (python)/acpilog
. Other future possibilities
include:
- Dynamic menus:
configfile (python)/menu.cfg
- Dynamic initramfs:
initrd (python)/initramfs.cpio
Python code can add new files to the filesystem via the new function
bits.pyfs_add
. Be creative!
Other changes in this release:
Improve the ACPI processor display to show sockets and ACPI scopes. This helps detect systems which do not properly group all the processors from a single socket in a common ACPI scope; this may become a test in future versions of BITS.
Fix ACPI OS selection menu to use functions exposed from the acpi module and not the bits module
Add the standard Python contextlib module.
Compile Python's built-in modules with docstrings. pydoc on built-in Python modules should now be more informative.