Skip to contentSkip to conversation

KSM test case fixes - ksm03

PATCH Superseded Nageswara R Sastry 1 participant 1 message Sep 5, 2011

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 KSM test case fixes - ksm03

While setting up the environment, checking whether ksm related directory exists in sysfs or not.

ksm03, ksm03_1:
Before patch:
...

ksm03       0  TINFO  :  KSM merging...
ksm03       1  TBROK  :  open: errno=ENOENT(2): No such file or directory
ksm03       2  TBROK  :  Remaining cases broken
ksm03       0  TINFO  :  child 1 stops.
ksm03       1  TBROK  :  unexpected signal 1 received (pid = 46142).
ksm03       2  TBROK  :  Remaining cases broken

...

After patch:
...

ksm03       1  TCONF  :  KSM configuration is not enabled
ksm03       2  TCONF  :  Remaining cases not appropriate for configuration

...

Signature · 2 lines
Regards
R.Nageswara Sastry
testcases/kernel/mem/ksm/ksm03.c +6 -0
@@ -111,6 +111,12 @@ void setup(void)
 	mount_mem("memcg", "cgroup", "memory", MEMCG_PATH, MEMCG_PATH_NEW);
 	tst_sig(FORK, DEF_HANDLER, NULL);
 	TEST_PAUSE;
+
+	char *fname = "/sys/kernel/mm/ksm/";
+
+        if( access( fname, F_OK ) == -1 ) {
+                tst_brkm(TCONF, NULL, "KSM configuration is not enabled");
+        }
 }
 
 void cleanup(void)

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list