* [PATCH blktests] Documentation: document prerequisite scriptlets
@ 2018-05-14 11:40 Johannes Thumshirn
2018-05-17 13:44 ` Johannes Thumshirn
2018-05-21 18:29 ` Omar Sandoval
0 siblings, 2 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2018-05-14 11:40 UTC (permalink / raw)
The config file is bash and it gets sourced, so all bash magic is
doable in there as well. Document it so others don't have to
re-discover this gem as well.
Signed-off-by: Johannes Thumshirn <jthumshirn at suse.de>
---
Documentation/running-tests.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Documentation/running-tests.md b/Documentation/running-tests.md
index a479d5e94c5e..b477c0679683 100644
--- a/Documentation/running-tests.md
+++ b/Documentation/running-tests.md
@@ -66,3 +66,15 @@ command line option.
QUICK_RUN=1
TIMEOUT=30
```
+
+### Pre-test setups
+
+Some tests, may need special prerequisites, like configfs being
+mounted for NVMe over Fabrics tests. You can add your custom bash
+scriptlets to `config` to get this done, e.g.:
+
+```sh
+if ! test $(grep -q configfs /proc/mounts) ; then
+ mount -t configfs none /sys/kernel/config
+fi
+```
--
2.16.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH blktests] Documentation: document prerequisite scriptlets
2018-05-14 11:40 [PATCH blktests] Documentation: document prerequisite scriptlets Johannes Thumshirn
@ 2018-05-17 13:44 ` Johannes Thumshirn
2018-05-21 18:29 ` Omar Sandoval
1 sibling, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2018-05-17 13:44 UTC (permalink / raw)
Omar, ping?
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH blktests] Documentation: document prerequisite scriptlets
2018-05-14 11:40 [PATCH blktests] Documentation: document prerequisite scriptlets Johannes Thumshirn
2018-05-17 13:44 ` Johannes Thumshirn
@ 2018-05-21 18:29 ` Omar Sandoval
2018-05-22 7:30 ` Johannes Thumshirn
1 sibling, 1 reply; 6+ messages in thread
From: Omar Sandoval @ 2018-05-21 18:29 UTC (permalink / raw)
On Mon, May 14, 2018@01:40:42PM +0200, Johannes Thumshirn wrote:
> The config file is bash and it gets sourced, so all bash magic is
> doable in there as well. Document it so others don't have to
> re-discover this gem as well.
I'm supportive of this...
> Signed-off-by: Johannes Thumshirn <jthumshirn at suse.de>
> ---
> Documentation/running-tests.md | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/Documentation/running-tests.md b/Documentation/running-tests.md
> index a479d5e94c5e..b477c0679683 100644
> --- a/Documentation/running-tests.md
> +++ b/Documentation/running-tests.md
> @@ -66,3 +66,15 @@ command line option.
> QUICK_RUN=1
> TIMEOUT=30
> ```
> +
> +### Pre-test setups
> +
> +Some tests, may need special prerequisites, like configfs being
> +mounted for NVMe over Fabrics tests. You can add your custom bash
> +scriptlets to `config` to get this done, e.g.:
> +
> +```sh
> +if ! test $(grep -q configfs /proc/mounts) ; then
> + mount -t configfs none /sys/kernel/config
> +fi
> +```
But I'm curious about this specific example. Is this not mounted for you
automatically? I'm guessing systemd does it for me on my setup.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH blktests] Documentation: document prerequisite scriptlets
2018-05-21 18:29 ` Omar Sandoval
@ 2018-05-22 7:30 ` Johannes Thumshirn
2018-05-23 0:15 ` Omar Sandoval
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Thumshirn @ 2018-05-22 7:30 UTC (permalink / raw)
On Mon, May 21, 2018@11:29:04AM -0700, Omar Sandoval wrote:
> But I'm curious about this specific example. Is this not mounted for you
> automatically? I'm guessing systemd does it for me on my setup.
No my setup is kind of special. I don't want to mess with all the
user-space so all I do is:
dracut --no-compress --kver `make kernelrelease` --kmoddir mods/ \
--no-hostonly --no-hostonly-cmdline --modules "bash base" \
--tmpdir `pwd`/myinitrd --force myinitrd/initrd \
--add-drivers "loop nvme nvme-loop nvmet" \
--install "lsblk find sort parted getopt fio tput column date \
dirname mktemp ps diff awk timeout time losetup \
truncate wc grep stat basename cut blktrace sg_inq \
realpath findmnt vi dd sed rm rmdir nvme" \
--include "$HOME/src/blktests" "/blktests
qemu-kvm -m 4096 -smp 4 -nographic -serial mon:stdio -kernel \
arch/x86/boot/bzImage -initrd myinitrd/initrd \
-append "console=ttyS0 debug"
I have the above in a shell wrapper as I simply can't remember it, or
I just use rapido [1] which a co-worker of mine started for this job.
As minimal as possible. I try to get my rebuild - boot - test cycles
short.
With my current config I have a bootup time in qemu below half a
second on a reasonable machine in my lab and just below one second
on my laptop.
[1] https://github.com/rapido-linux/rapido
Byte,
Johannes
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH blktests] Documentation: document prerequisite scriptlets
2018-05-22 7:30 ` Johannes Thumshirn
@ 2018-05-23 0:15 ` Omar Sandoval
2018-05-23 7:23 ` Johannes Thumshirn
0 siblings, 1 reply; 6+ messages in thread
From: Omar Sandoval @ 2018-05-23 0:15 UTC (permalink / raw)
On Tue, May 22, 2018@09:30:24AM +0200, Johannes Thumshirn wrote:
> On Mon, May 21, 2018@11:29:04AM -0700, Omar Sandoval wrote:
> > But I'm curious about this specific example. Is this not mounted for you
> > automatically? I'm guessing systemd does it for me on my setup.
>
> No my setup is kind of special. I don't want to mess with all the
> user-space so all I do is:
>
> dracut --no-compress --kver `make kernelrelease` --kmoddir mods/ \
> --no-hostonly --no-hostonly-cmdline --modules "bash base" \
> --tmpdir `pwd`/myinitrd --force myinitrd/initrd \
> --add-drivers "loop nvme nvme-loop nvmet" \
> --install "lsblk find sort parted getopt fio tput column date \
> dirname mktemp ps diff awk timeout time losetup \
> truncate wc grep stat basename cut blktrace sg_inq \
> realpath findmnt vi dd sed rm rmdir nvme" \
> --include "$HOME/src/blktests" "/blktests
>
> qemu-kvm -m 4096 -smp 4 -nographic -serial mon:stdio -kernel \
> arch/x86/boot/bzImage -initrd myinitrd/initrd \
> -append "console=ttyS0 debug"
>
> I have the above in a shell wrapper as I simply can't remember it, or
> I just use rapido [1] which a co-worker of mine started for this job.
>
> As minimal as possible. I try to get my rebuild - boot - test cycles
> short.
>
> With my current config I have a bootup time in qemu below half a
> second on a reasonable machine in my lab and just below one second
> on my laptop.
>
> [1] https://github.com/rapido-linux/rapido
>
> Byte,
> Johannes
Cool setup :) I have my own fanciness [1] which lets met boot straight
into a test kernel without packaging it up in any way.
Anyways, I added some documentation based on yours. Thanks!
1: https://github.com/osandov/osandov-linux#vm-setup
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH blktests] Documentation: document prerequisite scriptlets
2018-05-23 0:15 ` Omar Sandoval
@ 2018-05-23 7:23 ` Johannes Thumshirn
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2018-05-23 7:23 UTC (permalink / raw)
On Tue, May 22, 2018@05:15:30PM -0700, Omar Sandoval wrote:
> Cool setup :) I have my own fanciness [1] which lets met boot straight
> into a test kernel without packaging it up in any way.
>
> Anyways, I added some documentation based on yours. Thanks!
>
> 1: https://github.com/osandov/osandov-linux#vm-setup
Cool thanks for sharing.
Johannes
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-05-23 7:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-14 11:40 [PATCH blktests] Documentation: document prerequisite scriptlets Johannes Thumshirn
2018-05-17 13:44 ` Johannes Thumshirn
2018-05-21 18:29 ` Omar Sandoval
2018-05-22 7:30 ` Johannes Thumshirn
2018-05-23 0:15 ` Omar Sandoval
2018-05-23 7:23 ` Johannes Thumshirn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).