Skip to contentSkip to conversation

hugemmap11.c: Change NORMAL_PATH to current working directory

PATCH In review Wei Gao via ltp 3 participants 4 messages Aug 29, 2024 – Sep 2, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hugemmap11.c: Change NORMAL_PATH to current working directory

Following error will happen on sle-micro system since "/" is read only tst_test.c:1062: TBROK: open(/ltp_hug9Iy6OR,16578,10247520240) failed: EROFS (30)

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c +1 -1
index 496a814b5..67fca2ddf 100644
@@ -23,7 +23,7 @@
 
 #define P0 "ffffffff"
 #define IOSZ 4096
-#define NORMAL_PATH ""
+#define NORMAL_PATH "./"
 #define MNTPOINT "hugetlbfs/"
 
 static long hpage_size;
Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v1 1/1
#1 lore raw

Hi Wei, Li,

Quoted 13 lines

Following error will happen on sle-micro system since "/" is read only tst_test.c:1062: TBROK: open(/ltp_hug9Iy6OR,16578,10247520240) failed: EROFS (30)

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c +0 -0
index 496a814b5..67fca2ddf 100644

testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c line 26

Quoted 5 lines
testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c +1 -1
@@ -23,7 +23,7 @@
 
 #define P0 "ffffffff"
 #define IOSZ 4096
-#define NORMAL_PATH ""
+#define NORMAL_PATH "./"

@Li: Do you see any consequences?

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by
#2 lore raw
Quoted 17 lines · Petr Vorel

Hi Wei, Li,

Quoted 13 lines

Following error will happen on sle-micro system since "/" is read only tst_test.c:1062: TBROK: open(/ltp_hug9Iy6OR,16578,10247520240) failed: EROFS (30)

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c +0 -0
index 496a814b5..67fca2ddf 100644
@@ -23,7 +23,7 @@
Quoted 8 lines

testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c line 26

Quoted 4 lines
testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c +1 -1
 #define P0 "ffffffff"
 #define IOSZ 4096
-#define NORMAL_PATH ""
+#define NORMAL_PATH "./"

@Li: Do you see any consequences?

I think it is no problem to apply the patch, as you pointed mntpoint implies needs_tmpdir. So it won't hit an unwritable issue when using $PWD.

Signature · 6 lines
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

Hi Wei, Li,

...

Quoted 5 lines
Quoted 1 line

@Li: Do you see any consequences?

I think it is no problem to apply the patch, as you pointed mntpoint implies needs_tmpdir. So it won't hit an unwritable issue when using $PWD.

Li, thanks a lot for double check!
Wei, thanks for fixing this.
Merged.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp