Re: [patch 16/40] selftests/vm: use a common gup_test.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/20 12:33 PM, Linus Torvalds wrote:
On Sun, Oct 18, 2020 at 12:13 PM John Hubbard <jhubbard@xxxxxxxxxx> wrote:
...

Guys, you're looking at the wrong thing.

Inside the *tools* subdirectory, that "../../.." thing makes sense.
You're in tools/testing/selftests/vm, and those crazy ".." paths are
ok. Ugly, but ok.

But the thing I objected to wasn't that tools directory ugliness.

Let me repeat what I found completely and utterly unacceptable, and
what you don't seem to have noticed, and what your patch didn't fix or
touch:

+++ a/mm/gup_test.c
+#include "../../../../mm/gup_test.h"

Notice what directory it is in? Notice how "../../.." etc is
COMPLETELY UNACCEPTABLE GARBAGE.

                     Linus


aha, yes. yuck. So can we please just fix it up like this? A quick compile
test shows that it does build as expected:

diff --git a/mm/gup_test.c b/mm/gup_test.c
index 32770656cc32..e4c396146e90 100644
--- a/mm/gup_test.c
+++ b/mm/gup_test.c
@@ -4,7 +4,7 @@
 #include <linux/uaccess.h>
 #include <linux/ktime.h>
 #include <linux/debugfs.h>
-#include "../../../../mm/gup_test.h"
+#include "gup_test.h"

 static void put_back_pages(unsigned int cmd, struct page **pages,
 			   unsigned long nr_pages, unsigned int gup_test_flags)



Meanwhile, I'll work on coming up with a rationalization for how I let that
mistake slip past me. I've got a teenager living under the same roof with me
here, so I'm routinely exposed to some truly inspirational ideas for excuses. :)


thanks,
--
John Hubbard
NVIDIA




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux