lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5114CE00.6050307@ozlabs.org>
Date:	Fri, 08 Feb 2013 18:05:52 +0800
From:	Jeremy Kerr <jk@...abs.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
	Matt Fleming <matt.fleming@...el.com>,
	Lingzhu Xiang <lxiang@...hat.com>,
	Dave Young <dyoung@...hat.com>
Subject: Re: [PATCH 1/3 v3] selftests: Add tests for efivarfs

Hi Andrew,

Thanks for taking a look at these.

>> @@ -1,4 +1,4 @@
>> -TARGETS = breakpoints kcmp mqueue vm cpu-hotplug memory-hotplug
>> +TARGETS = breakpoints kcmp mqueue vm cpu-hotplug memory-hotplug efivarfs
>
> bah.  This sort of Makefile construct is a wonderful source of patch
> rejects and fixups.  I'll covert this to
>
> --- a/tools/testing/selftests/Makefile~a
> +++ a/tools/testing/selftests/Makefile
> @@ -1,4 +1,11 @@
> -TARGETS = breakpoints epoll kcmp mqueue vm cpu-hotplug memory-hotplug efivarfs
> +TARGETS = breakpoints
> +TARGETS += epoll
> +TARGETS += kcmp
> +TARGETS += mqueue
> +TARGETS += vm
> +TARGETS += cpu-hotplug
> +TARGETS += memory-hotplug
> +TARGETS += efivarfs

Much better, thanks. I'd already had a collision with the epoll tests...

> I'll do this for now:
>
> --- a/tools/testing/selftests/efivarfs/Makefile~selftests-add-tests-for-efivarfs-fix
> +++ a/tools/testing/selftests/efivarfs/Makefile
> @@ -6,7 +6,7 @@ test_objs = open-unlink
>   all: $(test_objs)
>
>   run_tests: all
> -	@./efivarfs.sh || echo "efivarfs selftests: [FAIL]"
> +	@/bin/sh ./efivarfs.sh || echo "efivarfs selftests: [FAIL]"
>
>   clean:
>   	rm -f $(test_objs)
>
> but I'm not sure I did it right :(

efivarfs.sh requires bash currently, so we'll need to call this explicitly:

+	@/bin/bash ./efivarfs.sh || echo "efivarfs selftests: [FAIL]"

Is this okay?

> The general ruleset for selftests is: do as much as you can if you're not
> root and don't take too long and don't break the build on any
> architecture and don't cause the top-level "make run_tests" to fail if
> your feature is unconfigured.

Ah, good stuff to know. I'll send a patch adding this info to 
Documentation/ too.

> Does this code pass all that?

It should, yes:

  * all test requires root at present, as all efivarfs files are only
    writable by root

  * the built binaries doesn't use anything more than basic C, so should
    build fine wherever we have gcc.

  * efivarfs.sh will skip all tests if efivarfs is not mounted

However, the tests expose a bug at the moment, so run_tests will fail. 
Matt will have that fixed soon though :)

Cheers,


Jeremy


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ