Only maintain maps between current and previous selinux versions.
New maintenance scheme for mapping files:
Say, V is the current SELinux platform version, then at any point in time we
only maintain (V->V-1) mapping. (V->V-n) map is constructed from top (V->V-n+1)
and bottom (V-n+1->V-n) without changes to previously maintained mapping files.
Caveats:
- 26.0.cil doesn't technically represent 27.0->26.0 map, but rather
current->26.0. We'll fully migrate to the scheme with future releases.
Bug: 67510052
Test: adding new public type only requires changing the latest compat map
Change-Id: Iab5564e887ef2c8004cb493505dd56c6220c61f8
diff --git a/tests/treble_sepolicy_tests.py b/tests/treble_sepolicy_tests.py
index 05549a1..f2d600a 100644
--- a/tests/treble_sepolicy_tests.py
+++ b/tests/treble_sepolicy_tests.py
@@ -240,8 +240,8 @@
if len(violators) > 0:
ret += "SELinux: The following public types were found added to the "
ret += "policy without an entry into the compatibility mapping file(s) "
- ret += "found in private/compat/" + compatMapping.apiLevel + "/"
- ret += compatMapping.apiLevel + "[.ignore].cil\n"
+ ret += "found in private/compat/V.v/V.v[.ignore].cil, where V.v is the "
+ ret += "latest API level.\n"
ret += " ".join(str(x) for x in sorted(violators)) + "\n"
return ret
@@ -263,7 +263,8 @@
if len(violators) > 0:
ret += "SELinux: The following formerly public types were removed from "
ret += "policy without a declaration in the compatibility mapping "
- ret += "file(s) found in prebuilts/api/" + compatMapping.apiLevel + "/\n"
+ ret += "found in private/compat/V.v/V.v[.ignore].cil, where V.v is the "
+ ret += "latest API level.\n"
ret += " ".join(str(x) for x in sorted(violators)) + "\n"
return ret