]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/selftest/devtool: Fix for linux 6.1 versions onwards
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Jan 2023 17:06:31 +0000 (17:06 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Jan 2023 21:57:07 +0000 (21:57 +0000)
In recent kernel versions the string "Linux" moved to a header,
'include/linux/uts.h' instead of init/version.c. Allow the test
to work with both situations.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/devtool.py

index c78a68be5b4d56a915756ce2d61110bee47db5a0..86014d25576d59ec33862ca3ba67bff8a86fe953 100644 (file)
@@ -2040,7 +2040,9 @@ class DevtoolUpgradeTests(DevtoolBase):
 
         #Modify the kernel source
         modfile = os.path.join(tempdir, 'init/version.c')
-        runCmd("sed -i 's/Linux/LiNuX/g' %s" % (modfile))
+        # Moved to uts.h in 6.1 onwards
+        modfile2 = os.path.join(tempdir, 'include/linux/uts.h')
+        runCmd("sed -i 's/Linux/LiNuX/g' %s %s" % (modfile, modfile2))
 
         #Modify the configuration
         codeconfigfile = os.path.join(tempdir, '.config.new')