All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
To: Aditya <yashsri421@gmail.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] POC script to apply patches into a test-branch and run clang-format
Date: Tue, 15 Dec 2020 07:46:45 +0100	[thread overview]
Message-ID: <CAKXUXMy7XbmWmj5HOrAJ-fYAdZmK0kd9NnP_i4cpOaS7eqCnrw@mail.gmail.com> (raw)
In-Reply-To: <660a4bb0-1ba4-acd4-e8bc-a53cccfbf10a@gmail.com>

On Fri, Dec 11, 2020 at 10:16 AM Aditya <yashsri421@gmail.com> wrote:
>
> On 11/12/20 11:57 am, Lukas Bulwahn wrote:
> > On Fri, Dec 11, 2020 at 7:24 AM Dwaipayan Ray <dwaipayanray1@gmail.com> wrote:
> >>
> >>>
> >>> Aditya, Dwaipayan, can you set up a git repository that you use
> >>> together to work on this script?
> >>>
> >>> And provide a short description of how to use the script with an
> >>> example in that repository?
> >>>
> >>> Then, I am happy to try it out... and provide you more feedback.
> >>>
> >>> Lukas
> >>
> >> Hi Lukas,
> >> Sure enough, if Aditya doesn't mind, I will put up a repo for the same.
> >>
> >
> > Dwaipayan, just set up a repository with your latest state that you
> > are currently happy with, then Aditya can fork that and put changes on
> > top as he might see fit and open a pull request, so you integrate them
> > back.
> >
>
> Hi
> I have added my changes in the repo and also provided steps to run the
> script in readme.
>
> Repo Link: https://github.com/raydwaipayan/apply-patch
>
> You can use this patch for testing. It applies on next-20201204.
>

Okay, I downloaded and tried it:

perl ./scripts/applypatch.pl --clang-format test.patch
--branch=test-clang-format-bfq-cgroup

but it failed:

git checkout test-clang-format-bfq-cgroup
Already on 'test-clang-format-bfq-cgroup'
git am $patchtest.patch
fatal: could not open '.patch' for reading: No such file or directory
Clang formatted patchfile generated at:
test.patch.EXPERIMENTAL-clang_format-fixes
git checkout test-clang-format-bfq-cgroup
Already on 'test-clang-format-bfq-cgroup'

How about setting up a minimal travis.ci check that runs this command
on a small git repository with one file and one patch on top for
testing purposes?

The script does not have error handling yet, so the next steps are
just executed blindly even if the one before failed and is really
required for the next one to do the right thing.

I generally like the script, let us work a bit on tuning it for proper
error handling, add some basic tests and then discuss it with Miguel.

Lukas

> From c631c1b9c4c7e3cdbf0e41b21b8fa1d34ba20aef Mon Sep 17 00:00:00 2001
> From: Aditya Srivastava <yashsri421@gmail.com>
> Date: Fri, 11 Dec 2020 14:19:52 +0530
> Subject: [PATCH] patch for testing
>
> This patch has been created for testing clang-format on c-file.
> ---
>  block/bfq-cgroup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
> index b791e2041e49..8409ee064204 100644
> --- a/block/bfq-cgroup.c
> +++ b/block/bfq-cgroup.c
> @@ -184,7 +184,8 @@ void bfqg_stats_set_start_empty_time(struct
> bfq_group *bfqg)
>                 return;
>
>         stats->start_empty_time = ktime_get_ns();
> -       bfqg_stats_mark_empty(stats);
> +
> +bfqg_stats_mark_empty(stats);
>  }
>
>  void bfqg_stats_update_idle_time(struct bfq_group *bfqg)
> --
> 2.17.1
>
>
> Thanks
> Aditya
>
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2020-12-15  6:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-05 11:10 [Linux-kernel-mentees] POC script to apply patches into a test-branch and run clang-format Dwaipayan Ray
2020-12-05 15:27 ` Aditya
2020-12-05 15:54   ` Dwaipayan Ray
2020-12-06 10:48     ` Aditya
2020-12-11  6:17       ` Lukas Bulwahn
2020-12-11  6:24         ` Dwaipayan Ray
2020-12-11  6:27           ` Lukas Bulwahn
2020-12-11  9:16             ` Aditya
2020-12-15  6:46               ` Lukas Bulwahn [this message]
2020-12-21 19:47                 ` Dwaipayan Ray
2020-12-22 10:25                   ` Aditya
2020-12-22 10:34                     ` Dwaipayan Ray
2020-12-22 10:53                       ` Lukas Bulwahn
2020-12-23 13:16                         ` Aditya
2021-02-05 19:56                           ` Aditya
2021-02-06  9:21                             ` Aditya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKXUXMy7XbmWmj5HOrAJ-fYAdZmK0kd9NnP_i4cpOaS7eqCnrw@mail.gmail.com \
    --to=lukas.bulwahn@gmail.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=yashsri421@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.