Question about testing and pushing a patch

Hello everyone,
I’ve been working on this easy ticket as my first contribution to make the runtime_loader heap use reserve_address_range before resizing, as discussed in the bug tracker.
I’ve built an Anyboot image with my changes. However, I’m unsure how to properly test it before pushing. I get the same result whether ASLR is disabled or enabled.

Before I push my branch for review I’d like to ask:

  1. Is it ok to push my changes directly for review even if I can’t fully test every edge case?
  2. How do you guys typically test fixes like this one?

Thanks in advance.

1 Like

I can only answer the first question as I haven’t worked with that part of the code yet.
Yes,you can always push changes to Gerrit,even stuff that is still work in progress,but then mark it as such.
If you think your change may be fine but have issues with testing,you can add this as a comment to the review.
Reviewers will need to test the code anyway before merging,and they can probably give you tips how to test it.

2 Likes

Ahoy @Amir !

Welcome to the Haiku community - thank you for your contribution !

Your best contact is @waddlesplash , however I assume you should have added a post to the ticket too you started to work on it.

Decide you want written evidences of details, then it is better to write decisive question write there, in the tickets, however if you want discussion as well, then suggest to register on IRC of Haiku channel(s).

You can have quicker answer from there than the forum. Of course you can use the forum as well, but then target the appropriate person, that is more effective.
If you want such introducing and general questions how to contribute properly you may register on mailing lists there are mostly ( or maybe only ) developers there , so you cannot make mistakes with it.

Have a great journey here, with Haiku, for Haiku !

2 Likes

Whenever I build anyboot images I boot them up with Qemu, this is my current script to launch it from Terminal (64bit)

#!sh

args=(
	-display haiku
	-machine q35
	-accel tcg
	-cpu max
	-m 1G
	-serial stdio
	-parallel none
	-monitor none
#	-bios "OVMF.fd"
	-device cirrus-vga
	-smp 8

	-device nec-usb-xhci,id=xhci
	-device usb-tablet,bus=xhci.0
	-device usb-kbd,bus=xhci.0

	-device nvme,drive=x1,serial=deadbeaf1
	-drive file="/Opslag/Haiku/haiku/generated.x86_64/haiku-nightly-anyboot.iso",format=raw,if=none,id=x1

#	-device nvme,drive=x2,serial=deadbeaf2
#	-drive file="/Opslag/media/VM/Haiku.img",format=raw,if=none,id=x2
)

qemu-system-x86_64 "${args[@]}"

1 Like

A possible answer to both questions:

  • push your work in progress change to Gerrit
  • the buildbot will compile a test build from it
  • add a comment to the ticket asking the person who reported the bug if they can try it and see if it solves their problem

Do as much testing as you can before offloading the work to someone else, but, sometimes, reproducing a bug needs a specific setup and only the person who hit the problem can test the fix fully.

If the changes don’t break anything else, and are obvious enough for the reviewer, we may also merge it without full testing of all cases. Then some users and developers who use nightly builds will surely notice and let you know if something goes wrong, acting as a sort of QA team.

1 Like