ECE 441 · Week 9
Modern Computer: Secure Infrastructure
One device-tree or driver change, in the form an upstream project would read: a commit message, a diff, and a test log.
Week 9 of 10 · Solitude
ECE 441 · Week 9 · In class
One device-tree or driver change, in the form an upstream project would read: a commit message, a diff, and a test log.
- This is not ECE 440's teaching module.
- The subject line is at most eight words.
- The test command is the command you will run after the edit.
- Write both before you edit.
ECE 441 · Week 9 · In class
One device-tree or driver change, in the form an upstream project would read: a commit message, a diff, and a test log. (continued)
- That pair is the homework.
ECE 441 · Week 9 · In class
Run the test a second time and keep that log in your notes.
- The graded test log is the first run.
ECE 441 · Week 9 · Lecture
Three parts a maintainer reads
- The commit message says what changed and why, for someone who was not in the room.
- The diff is the smallest change that does that one thing.
- The test log shows the command run after the change and what it printed.
- Missing any one, a reviewer has to take the change on trust.
ECE 441 · Week 9 · Lecture
Shape of a commit message
subsystem: component: short imperative summary
Why the change is needed: what was wrong, or
what was missing, and how it showed on the board.
What the change does, in a sentence or two.
Signed-off-by: Your Name <you@example.com>
- The subject is a prefix and a summary; look at
git logon the same files for the prefix in use.
ECE 441 · Week 9 · Lecture
From commit to patch
git log --oneline -- <path> # prefixes others used
git commit -s
git format-patch -1
./scripts/checkpatch.pl 0001-*.patch
format-patchwrites the commit as a mail-ready file, message and diff together.checkpatch.pl, in the kernel tree, flags style problems before a person has to.
ECE 441 · Week 9 · Lecture
A test log someone can trust
- Start with the kernel running:
uname -rand the commit it was built from. - Then the exact command, then its full output, unedited.
- The graded log is the first run after the edit; a second run stays in your notes.
- A failing test is a log too: say so, and do not trim it.
ECE 441 · Week 9 · Lab
Lab
- Make one device-tree or driver change in the form an upstream project would read.
- Include a test you run, and a commit message. This is not ECE 440's teaching module. Second pass: run the test a second time and keep that log in your notes.
- Assemble the lab hand-in: The commit message, the device-tree or driver diff, and the test log.
ECE 441 · Week 9 · Lab
Hand in
The commit message, the device-tree or driver diff, and the test log.
ECE 441 · Week 9 · Homework
Homework
- Write a planned subject line of at most eight words, and the test command you will run after the edit.
ECE 441 · Week 9 · Homework
Turn in
The subject line and the test command.
ECE 441 · Week 9 · Read
Read
On the lab site: Module 11, Drivers, does not grade a commit message, a diff, and a test log. This week is past Module 12.
ECE 441 · Week 9 · Next
Week 10
The report and the reproduction package carry the week-5 method, the week-4 build hash with its rebuild commands, and the week-6 peer note.