Plan 9 from Bell Labs’s /usr/web/sources/contrib/mospak/abaco/test/TESTING.md

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


# Testing abaco-html2-wiring.patch on 9legacy

Files:
- `abaco-html2-wiring.patch`
- `abaco-html4-tests.zip`

## 1. Put the test pages on your web server

Extract `abaco-html4-tests.zip` on another machine, then copy the contents to your web root.

For example, make:

```text
/usr/web/abaco-test/
```

and put these there:

```text
index.html
01-hr.html
02-imgsize.html
03-select.html
04-forms.html
05-fragments.html
06-title.html
07-lists.html
08-tables.html
09-captions.html
10-imagemap.html
11-frames.html
12-refresh.html
map.png
```

Then verify the index page is reachable:

```text
http://your-host/abaco-test/index.html
```

## 2. Build the current unpatched abaco and save the old binary

On the 9legacy machine:

```rc
cd /sys/src/cmd/abaco
mk install
cp /$objtype/bin/abaco /tmp/abaco.before-html2-wiring
```

That saves the current installed binary.

## 3. Test the unpatched browser

If Abaco is not already running:

```rc
abaco http://your-host/abaco-test/index.html
```

If Abaco is already running:

```rc
readweb http://your-host/abaco-test/index.html
```

Then open each test page from the index and note what you see.

A very small log file is enough:

```text
01-hr: before =
02-imgsize: before =
03-select: before =
04-forms: before =
05-fragments: before =
06-title: before =
07-lists: before =
08-tables: before =
09-captions: before =
10-imagemap: before =
11-frames: before =
12-refresh: before =
```

## 4. Apply the patch

Copy the patch file onto the 9legacy machine, for example as:

```text
/tmp/abaco-html2-wiring.patch
```

Then apply it from the filesystem root:

```rc
cd /
ape/patch -p0 < /tmp/abaco-html2-wiring.patch
```

If `ape/patch` reports rejects, stop there and do not continue.

## 5. Rebuild patched abaco

```rc
cd /sys/src/cmd/abaco
mk install
```

If that succeeds, test the same pages again.

If Abaco is not already running:

```rc
abaco http://your-host/abaco-test/index.html
```

If Abaco is already running:

```rc
readweb http://your-host/abaco-test/index.html
```

Now fill the “after” side of your notes.

## 6. What to compare

Use this simple checklist:

```text
01-hr: rules vary by width/align/noshade
02-imgsize: placeholder box keeps the specified size
03-select: selected options appear initially
04-forms: maxlength works; field names are encoded
05-fragments: #fragment jumps scroll in place
06-title: button 2 shows URL — title
07-lists: list markers hang left of body text
08-tables: row backgrounds and cell valign appear
09-captions: captions are visible
10-imagemap: rect/circle/poly map areas go to different targets
11-frames: frame borders and margins are visible
12-refresh: page redirects after a few seconds
```

## 7. Revert after testing

Best way: reverse the patch and rebuild.

```rc
cd /
ape/patch -R -p0 < /tmp/abaco-html2-wiring.patch
cd /sys/src/cmd/abaco
mk install
```

That returns both source and binary to the old state.

## 8. Quick rollback option

If you only want the old binary back quickly:

```rc
cp /tmp/abaco.before-html2-wiring /$objtype/bin/abaco
```

But that does not unpatch the source tree. For a proper cleanup, still do `ape/patch -R` later.

## 9. Cleanup

When you are done:

```rc
rm /tmp/abaco-html2-wiring.patch
rm /tmp/abaco.before-html2-wiring
```

And if you no longer want the web test set:

```rc
rm -r /usr/web/abaco-test
```

## 10. Small practical advice

Keep three windows open:

1. one in `/sys/src/cmd/abaco` for `mk install`
2. one in `/` for `ape/patch` / `ape/patch -R`
3. one running Abaco on `http://your-host/abaco-test/index.html`

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].