On Fri, Mar 11, 2016 at 10:28:27AM -0800, Dan Williams wrote:
On Fri, Mar 11, 2016 at 12:43 AM, Johannes Thumshirn
> Grab the kernel version used for tests dynamically via utsname() instead of
> hardcoding the version of the build host.
> Otherwise tests will be skipped if the build host had a too old kernel
> flodin:~ # ./ndctl test
> __ndctl_test_attempt: skip test_libndctl:1950 requires: 4.2.0 current: 4.1.0
> test-libndctl: SKIP
> __ndctl_test_attempt: skip test_dpa_alloc:300 requires: 4.2.0 current: 4.1.0
> test-dpa-alloc: SKIP
> __ndctl_test_attempt: skip test_parent_uuid:230 requires: 4.3.0 current: 4.1.0
> test-parent-uuid: SKIP
> attempted: 3 skipped: 3
> Signed-off-by: Johannes Thumshirn <jthumshirn(a)suse.de>
> test/core.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
> Changes to v1:
> Use utsname.release which is obviously correct.
> On my test system utsname.release = "4.4.4-default"
> I can only imagine the sscanf() failing and on stack garbage in a, b, c being
> greater than KERNEL_VERSION(4, 3, 0).
Looks good to me, applied for v52. I've pushed it out on the
'pending' branch. It will move to 'master' after the v4.6-rc1 kernel
Thanks. Though I'm still not too happy with the general case of version
checking in the tests at all. Actually it should check for the presence of a
feature and not when a feature was introduced in the mainline kernel. Some
distro kernels tend to be an rather old version with havily backported
features *cough* ours *cough*. I'll see if I can come up with something, maybe
for the 4.7 window.
Johannes Thumshirn Storage
jthumshirn(a)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