QA/Bibisect/macOS

This page provides information about using our Bibisect repositories on computers running macOS.

Introduction
Our bibisect repositories were originally built on Ubuntu 64bit machines, and most of our repositories still target GNU/Linux systems. We now have a few repositories built for macOS, and are adding more in time.

If you're testing cross-platform and wish to test Mac bugs on a different OS, one option is to set up a virtual machine running macOS (see below).

Limitations
We do not currently have bibisect support for
 * LibreOffice Vanilla for Mac (in the Mac App Store)

Choosing a Bibisect repository
As you can see in the table below, there are multiple bibisect repositories covering different commit ranges. If you find a bug in LibreOffice 4.4.4, you'll want to download the 50max repository, as it covers: "The range from 4.4 branch point to 5.0 branch point"

It's possible that the bug in LO 4.4.4 predates the 4.4 branch point, at which point you'll want to download an additional (earlier) bibisect repository. We maintain separate bibisect repositories to both speed up the use of the repository, and to make it possible to download just one piece of the commit range.

Don't have a bug to bibisect yet? Find documented regressions in the list here.

Setting up Environment
Before we download the bibisect repository, let's make sure your machine has the right software installed. For all OSes, you'll need to install
 * git

The table below shows some of the additional software you'll need to add to get each of these bibisect repositories running properly on your system.

Downloading Bibisect Repository
Because we are a distributed, community project, we have created and hosted bibisect repositories on different servers. Although the exact procedures for downloading the repositories may differ slightly, most repositories may be retrieved via regular download from a web server or directly via git.

From a Web Server
Using the lo-4.1_to_lo-4.2 repository as an example, we can download the git bundle from the TDF server, and clone in into a new git repository using the instructions found on that page.

Using Git
Live repositories are available from our Bibisect hosting. You may clone a bibisect repository as you would any other git repository:

> git clone https://bibisect.libreoffice.org/mac64-7.1.git

Please be aware that the original download may be several gigabytes, so please make sure you're on a fast Internet connection and are reasonably certain that you will not experience network interruption. Because of the mechanics of git repositories, if the initial clone is interrupted, you will have to start the clone all over again. In the case of frozen repositories you can safely stop the download process of the bundle and resume later. Check the instruction on the repository webpage for details.

After the first clone, further updates to the git repository will be smaller, and will depend on how frequently the Tinderbox adds commits to the repository and how many days you wait before updating your repository.

Update your repository with

> git checkout master && git pull

Bibisecting the Bug
With a bug and test procedures in hand, and a downloaded and unpacked git repository ready to go, it's finally time to start bibisecting!

Note: We refer to the latest and oldest commit in these guides, these are tags that are not present in all builds. See the table of versions below.

Note 2:You might have to right click and select open in Finder to verify the app the first time you use a new bibisect repository

Open a terminal, cd to your git repository, and checkout the latest commit:

> git checkout latest > open LibreOffice.app/

If the bug does not appear in that version, put a comment on the bug saying "Regression does not appear in latest version of , e.g. bibisect-macosx-64-5.0 and must be younger" and add bibisected and bibisectedNewer to the Keywords. You've now completed your bibisection! If there is a newer bibisect repository available, please consider downloading it and testing the bug again.

If the bug does appear in the latest version, continue.

After testing with the latest build, we next test with the oldest build included in the repo and check that the regression is not there:

> git checkout oldest > open LibreOffice.app/

If the bug is already present at this point, it is not a regression in the range covered by the repo, but an even older bug.

First, put a comment on the bug saying "Regression does appear in oldest version of  and must be older"

If you are using the lo-4.1_to_lo-4.2 repo, then:
 * 1) Add the word preBibisect to the Keywords, and
 * 2) Set the version of LibreOffice in the bug report to 4.1 All Versions

If you are using another (newer) bibisect repo, please try downloading and testing with lo-4.1_to_lo-4.2.

If the bug does not appear in the oldest version, this means it is a regression in the range covered by the download and we can corner it down very well (hooray!). We will now leverage one of git's built-in tools to perform a binary search:

> git bisect start latest oldest

Then repeat these commands:

> open LibreOffice.app/ > git bisect good # if the bug is not there > git bisect bad # if the bug is there

NB: From time to time, the currently check-out version of LibreOffice may fail to start. This can happen because, although the bibisect repo includes only successful builds, a successful build is not guaranteed to really work. In those cases, you'll want to skip a particular build:

> git bisect skip # if you cannot get far enough to try the bug

After several repetitions, git will print out something like this: 9625329ea5a7e3e8475cd21c07726beec20573bd is the first bad commit commit 9625329ea5a7e3e8475cd21c07726beec20573bd Author: Bjoern Michaelsen  Date:  Thu Dec 8 12:29:59 2011 +0100

source-hash-2d19e9bb07ccff3134f855812dddfda5c07b1fe4 commit 2d19e9bb07ccff3134f855812dddfda5c07b1fe4 Author:    Jan Holesovsky  AuthorDate: Wed Nov 16 14:17:03 2011 +0100 Commit:    Jan Holesovsky  CommitDate: Wed Nov 16 14:21:33 2011 +0100 Kill one usage of chrel.sed to fix build.

We'll want to append this useful information to the bug report. (The source-hash-2d19e9bb07ccff3134f855812dddfda5c07b1fe4 line is the important piece, but please copy-in the entire message to a new comment).

The developers will also appreciate having the log output in the same comment:

> git bisect log

Here's an example of how the log output might appear to you:

git bisect start 'latest' 'oldest' # good: [2faf4bc12ab490370d2196dedbc8091f9b09d0a5] source-hash-418a35f4861e863feb39eec73f4a39a87fbcb1f3 git bisect good 2faf4bc12ab490370d2196dedbc8091f9b09d0a5 # bad: [b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4] source-hash-ce60138d339a5eb2a174a5d27063249acf2cac42 git bisect bad b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4 # good: [0a28a62d53e996cf66d86e9bfb63ddc6ade75b7e] source-hash-71cbcb62028295a98ceee60cb4c4ee425bafcd2e git bisect good 0a28a62d53e996cf66d86e9bfb63ddc6ade75b7e # bad: [9625329ea5a7e3e8475cd21c07726beec20573bd] source-hash-2d19e9bb07ccff3134f855812dddfda5c07b1fe4 git bisect bad 9625329ea5a7e3e8475cd21c07726beec20573bd # good: [89d91bb6074026dc0894bcdc6aaf8f6124102da7] source-hash-fb754a0df859e30255c25af8fa19bfaa75f257e7 git bisect good 89d91bb6074026dc0894bcdc6aaf8f6124102da7

With our testing complete, please add the tag bibisected to the Keywords so that this bug will no longer appear in the list of bugs that need bibisecting.

Youtube Video Tutorial
(Screencast soon)

VM
Testing Mac bugs inside a VM is a great way to leverage the large number of bibisect repositories available for this platform if you're using Windows or GNU/Linux as your host OS.

Suggested setup:
 * Virtualization Software: VirtualBox
 * Guest OS: macOS 10.10 or later
 * (Virtual) Hard drive: at least 40GB (some bibisect repositories are over 10GB each)