Skip to contentSkip to conversation

zram03: drop obsolete sysfs interfaces

PATCH RESEND Superseded Yang Shi 2 participants 3 messages May 31, 2018 – Jun 5, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yang Shi

author
#0 lore raw

PATCH RESEND 1/1 zram03: drop obsolete sysfs interfaces

Due to upstream linux commit c87d1655c29500b459fb135258a93f8309ada9c7 ("zram: remove obsolete sysfs attrs"), some sysfs interfaces are not available anymore. Remove dumping them to avoid test case failure.

---
Subscribed LTP mailing list to resend the patch, so that all subscribers can see it and get reviewed.

 testcases/kernel/device-drivers/zram/zram03.c | 6 ------
 1 file changed, 6 deletions(-)
testcases/kernel/device-drivers/zram/zram03.c +0 -6
index 3f7ab4e..f2c166c 100644
@@ -185,11 +185,5 @@ static void print(char *string)
 static void dump_info(void)
 {
 	print("initstate");
-	print("compr_data_size");
-	print("orig_data_size");
 	print("disksize");
-	print("mem_used_total");
-	print("num_reads");
-	print("num_writes");
-	print("zero_pages");
 }
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH RESEND 1/1 zram03: drop obsolete sysfs interfaces

Quoted 6 lines · Yang Shi

Due to upstream linux commit c87d1655c29500b459fb135258a93f8309ada9c7 ("zram: remove obsolete sysfs attrs"), some sysfs interfaces are not available anymore. Remove dumping them to avoid test case failure.

​Since the commit is merged from kernel-v4.10, how about changing like this:

testcases/kernel/device-drivers/zram/zram03.c +13 -8
@@ -184,12 +184,17 @@ static void print(char *string)
 
 static void dump_info(void)
 {
-       print("initstate");
-       print("compr_data_size");
-       print("orig_data_size");
-       print("disksize");
-       print("mem_used_total");
-       print("num_reads");
-       print("num_writes");
-       print("zero_pages");
+       if ((tst_kvercmp(4, 10, 0)) >= 0) {
+               print("initstate");
+               print("disksize");
+       } else {
+               print("initstate");
+               print("compr_data_size");
+               print("orig_data_size");
+               print("disksize");
+               print("mem_used_total");
+               print("num_reads");
+               print("num_writes");
+               print("zero_pages");
+       }
 }

​

Quoted 31 lines

---
Subscribed LTP mailing list to resend the patch, so that all subscribers can see it and get reviewed.

 testcases/kernel/device-drivers/zram/zram03.c | 6 ------
 1 file changed, 6 deletions(-)
testcases/kernel/device-drivers/zram/zram03.c +0 -7
index 3f7ab4e..f2c166c 100644
@@ -185,11 +185,5 @@ static void print(char *string)
 static void dump_info(void)
 {
        print("initstate");
-       print("compr_data_size");
-       print("orig_data_size");
        print("disksize");
-       print("mem_used_total");
-       print("num_reads");
-       print("num_writes");
-       print("zero_pages");
 }
--

1.8.3.1

--
Mailing list info: https://lists.linux.it/listinfo/ltp

Signature · 5 lines
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180605/34a0d12c/attachment.html>
author
#2 lore raw

PATCH RESEND 1/1 zram03: drop obsolete sysfs interfaces

Quoted 33 lines · Li Wang

On Fri, Jun 1, 2018 at 3:07 AM, Yang Shi <[email protected] <mailto:[email protected]>> wrote:

Due to upstream linux commit c87d1655c29500b459fb135258a93f8309ada9c7 ("zram: remove obsolete sysfs attrs"), some sysfs interfaces are not available anymore. Remove dumping them to avoid test case failure.

<mailto:[email protected]>>

​Since the commit is merged from kernel-v4.10, how about changing like this:

testcases/kernel/device-drivers/zram/zram03.c +3 -8
@@ -184,12 +184,17 @@ static void print(char *string)
 
  static void dump_info(void)
  {
-       print("initstate");
-       print("compr_data_size");
-       print("orig_data_size");
-       print("disksize");
-       print("mem_used_total");
-       print("num_reads");
-       print("num_writes");
-       print("zero_pages");
+       if ((tst_kvercmp(4, 10, 0)) >= 0) {
+               print("initstate");
+               print("disksize");

testcases/kernel/device-drivers/zram/zram03.c static void print(char *string) · line 199

Quoted 10 lines
testcases/kernel/device-drivers/zram/zram03.c +10 -0
+       } else {
+               print("initstate");
+               print("compr_data_size");
+               print("orig_data_size");
+               print("disksize");
+               print("mem_used_total");
+               print("num_reads");
+               print("num_writes");
+               print("zero_pages");
+       }

Yes, sure. Will fix in v2. Thanks for your suggestion.

Yang

Quoted 27 lines
testcases/kernel/device-drivers/zram/zram03.c +0 -0
  }

​

    ---
    Subscribed LTP mailing list to resend the patch, so that all
    subscribers
    can see it and get reviewed.

     testcases/kernel/device-drivers/zram/zram03.c | 6 ------
     1 file changed, 6 deletions(-)

    diff --git a/testcases/kernel/device-drivers/zram/zram03.c
    b/testcases/kernel/device-drivers/zram/zram03.c
    index 3f7ab4e..f2c166c 100644
    --- a/testcases/kernel/device-drivers/zram/zram03.c
    +++ b/testcases/kernel/device-drivers/zram/zram03.c
    @@ -185,11 +185,5 @@ static void print(char *string)
     static void dump_info(void)
     {
            print("initstate");
    -       print("compr_data_size");
    -       print("orig_data_size");
            print("disksize");
    -       print("mem_used_total");
    -       print("num_reads");
    -       print("num_writes");
    -       print("zero_pages");
Quoted 15 lines
     }
    -- 
    1.8.3.1


    -- 
    Mailing list info: https://lists.linux.it/listinfo/ltp
    <https://lists.linux.it/listinfo/ltp>
Signature · 2 lines
Regards,
Li Wang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180605/c62d8341/attachment.html>