Skip to contentSkip to conversation

ndctl: limit clear poison test to 4.6+ kernels

PATCH New Dan Williams 1 participant 1 message Mar 29, 2016 libnvdimm: non-volatile memory device

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ndctl: limit clear poison test to 4.6+ kernels

Prior kernels do not export a clear poison facility.

---
 test/clear.sh |    9 +++++++++
 1 file changed, 9 insertions(+)
test/clear.sh +9 -0
index e74522201231..16b0cbf3a71c 100755
@@ -13,6 +13,15 @@ err() {
 	exit $rc
 }
 
+eval $(uname -r | awk -F. '{print "maj="$1 ";" "min="$2}')
+if [ $maj -lt 4 ]; then
+	echo "kernel $maj.$min lacks clear poison support"
+	exit $rc
+elif [ $maj -eq 4 -a $min -lt 6 ]; then
+	echo "kernel $maj.$min lacks clear poison support"
+	exit $rc
+fi
+
 set -e
 trap 'err $LINENO' ERR
 

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm