public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [Patch 1/4] KSM test case fixes - ksm01
@ 2011-09-05 10:16 Nageswara R Sastry
  2011-09-06  9:24 ` Caspar Zhang
  0 siblings, 1 reply; 2+ messages in thread
From: Nageswara R Sastry @ 2011-09-05 10:16 UTC (permalink / raw)
  To: ltp-list

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]


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

ksm01, ksm01_1:
Before patch:
...
ksm01       0  TINFO  :  KSM merging...
ksm01       1  TBROK  :  open: errno=ENOENT(2): No such file or directory
ksm01       2  TBROK  :  Remaining cases broken
...

After patch:
...
ksm01       1  TCONF  :  KSM configuration is not enabled
ksm01       2  TCONF  :  Remaining cases not appropriate for configuration
...

Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com>

-- 
Regards
R.Nageswara Sastry


[-- Attachment #2: ksm01.patch --]
[-- Type: text/plain, Size: 449 bytes --]

--- ltp.orig/testcases/kernel/mem/ksm/ksm01.c	2011-09-05 08:42:12.000000000 +0200
+++ ltp/testcases/kernel/mem/ksm/ksm01.c	2011-09-05 08:45:15.000000000 +0200
@@ -109,6 +109,12 @@ void setup(void)
 
 	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)

[-- Attachment #3: Type: text/plain, Size: 357 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LTP] [Patch 1/4] KSM test case fixes - ksm01
  2011-09-05 10:16 [LTP] [Patch 1/4] KSM test case fixes - ksm01 Nageswara R Sastry
@ 2011-09-06  9:24 ` Caspar Zhang
  0 siblings, 0 replies; 2+ messages in thread
From: Caspar Zhang @ 2011-09-06  9:24 UTC (permalink / raw)
  To: Nageswara R Sastry; +Cc: ltp-list

On 09/05/2011 06:16 PM, Nageswara R Sastry wrote:
> +
> +	char *fname = "/sys/kernel/mm/ksm/";
> +
> +        if( access( fname, F_OK ) == -1 ) {
> +                tst_brkm(TCONF, NULL, "KSM configuration is not enabled");
> +        }
>   }

Hi, thanks for the patch. However, there is already a macro defined in 
include/mem.h:

#define PATH_KSM                "/sys/kernel/mm/ksm/"

And I think the braces are not necessary here?

Thanks,
Caspar

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-06  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-05 10:16 [LTP] [Patch 1/4] KSM test case fixes - ksm01 Nageswara R Sastry
2011-09-06  9:24 ` Caspar Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox