From: Richard Purdie Date: Thu, 26 Jan 2023 17:06:31 +0000 (+0000) Subject: oeqa/selftest/devtool: Fix for linux 6.1 versions onwards X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~1873 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c15c59c88d229e35eeac1ed948c84168633e7cb1;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/selftest/devtool: Fix for linux 6.1 versions onwards 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 --- diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index c78a68be5b4..86014d25576 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -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')