Skip to content

Instantly share code, notes, and snippets.

@mohan43u
Created June 13, 2020 16:30
Show Gist options
  • Save mohan43u/795018fe19b35e41ee105a859aac308d to your computer and use it in GitHub Desktop.
Save mohan43u/795018fe19b35e41ee105a859aac308d to your computer and use it in GitHub Desktop.
2020-06-13 15:00:59 mohan43u Hi everyone
2020-06-13 15:01:09 mohan43u welcome to ILUGC June month meet
2020-06-13 15:01:15 anbazhagan hi
2020-06-13 15:01:51 --> Malaw89 (5c0d9633@gateway/web/cgi-irc/kiwiirc.com/ip.92.13.150.51) has joined #ilugc
2020-06-13 15:01:53 --> kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:02:00 kiwi_92 Hi
2020-06-13 15:02:03 mohan43u our first talk is about emacs 'org-mode' by shrini
2020-06-13 15:02:04 shrini hello all
2020-06-13 15:02:16 mohan43u shrini: please carry on
2020-06-13 15:03:22 --> kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has joined #ilugc
2020-06-13 15:03:23 --> rattlesnake (~rattlesna@103.95.82.66) has joined #ilugc
2020-06-13 15:03:51 shrini Hello all
2020-06-13 15:04:16 shrini LEt us wait for five minutes for few more people to join
2020-06-13 15:04:39 Malaw89 Are we going to hear you Shrini?
2020-06-13 15:04:41 -- kushal6 is now known as kushalchand
2020-06-13 15:04:48 --> humachine (~user1@unaffiliated/humachine) has joined #ilugc
2020-06-13 15:05:33 rattlesnake is there a parallel Jitsi channel that we are going to use for presentations if any?
2020-06-13 15:05:38 <-- kushalchand (~kushal6@2a01:4f9:c010:82aa::1) has quit (Client Quit)
2020-06-13 15:06:11 shrini rattlesnake: no
2020-06-13 15:06:14 --> mgopi1990 (6ac6096e@106.198.9.110) has joined #ilugc
2020-06-13 15:06:27 shrini we have only IRC sessions for today
2020-06-13 15:06:36 rattlesnake thanks.
2020-06-13 15:07:12 anbazhagan I hope you will mention the basic keys of emacs as well. I'm not well versed with emacs.
2020-06-13 15:07:27 shrini anbazhagan: yes. will start with that only
2020-06-13 15:07:35 shrini will start in 3.10
2020-06-13 15:07:35 --> kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:07:36 anbazhagan Thx.
2020-06-13 15:09:15 <-- kiwi_92 (dfb6d104@gateway/web/cgi-irc/kiwiirc.com/ip.223.182.209.4) has quit (Quit: Connection closed)
2020-06-13 15:09:51 --> kiwi_92 (dfb6d104@gateway/web/cgi-irc/kiwiirc.com/ip.223.182.209.4) has joined #ilugc
2020-06-13 15:10:05 humachine good afternoon everyone :-)
2020-06-13 15:11:53 shrini hello all
2020-06-13 15:13:05 shrini I am going to explain on how emacs and org mode or helping my life to get better
2020-06-13 15:13:16 shrini I am also very new to the emacs world
2020-06-13 15:13:26 shrini not an expert like mbuf
2020-06-13 15:13:47 shrini I am using eemacs for two months only
2020-06-13 15:13:47 --> zorro_valmunskin (3124829e@gateway/web/cgi-irc/kiwiirc.com/ip.49.36.130.158) has joined #ilugc
2020-06-13 15:13:56 --> rajesh (9d2e0153@157.46.1.83) has joined #ilugc
2020-06-13 15:14:11 zorro_valmunskin i have seen a emac talk on ilug-d youtube it was good
2020-06-13 15:14:14 shrini I feel that I have missed a whole awesome world of emacs in my 15 years of life with linux
2020-06-13 15:14:19 -- rajesh is now known as Guest69251
2020-06-13 15:14:58 shrini I was always trying to use emacs for many years, but failed again and again because of its different key strokes
2020-06-13 15:15:20 -- Guest69251 is now known as rajesh_gp
2020-06-13 15:15:38 shrini I tried different flavours - spacemacs, doom
2020-06-13 15:15:46 shrini still cant get on with a flow
2020-06-13 15:15:49 --> tamil (31cd4fc8@49.205.79.200) has joined #ilugc
2020-06-13 15:15:50 --> nikitha (~nikitha@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:16:00 shrini finally found that simple emacs-nox is the best fit for me
2020-06-13 15:16:18 --> Guha (31cf8289@49.207.130.137) has joined #ilugc
2020-06-13 15:16:20 shrini most of my works are in commandline. I prefer CLI for any tasks
2020-06-13 15:16:24 -- kushal6 is now known as kushalchand
2020-06-13 15:16:37 shrini so this emacs-nox become a very good companion for me
2020-06-13 15:16:58 shrini I suggest all to start emacs with the emacs-nox version
2020-06-13 15:17:01 <-- nikitha (~nikitha@2a01:4f9:c010:82aa::1) has quit (Client Quit)
2020-06-13 15:17:03 <-- kushalchand (~kushal6@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 15:17:11 shrini you can goto any directory and open a file easily
2020-06-13 15:17:16 shrini emacs-nox <filename>
2020-06-13 15:17:19 shrini thats it
2020-06-13 15:17:29 shrini file is opened just like vim or nano
2020-06-13 15:17:34 shrini then make some changes
2020-06-13 15:17:37 shrini and save
2020-06-13 15:17:45 shrini with C-x C-s
2020-06-13 15:17:49 shrini what ?
2020-06-13 15:17:55 --> linuxbaskar85 (~linuxbask@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:17:58 shrini too many keystrokes to save a file?
2020-06-13 15:18:16 --> kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:19:18 <-- linuxbaskar85 (~linuxbask@2a01:4f9:c010:82aa::1) has quit (Client Quit)
2020-06-13 15:19:24 <-- ajithra (9d3372e2@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.114.226) has quit (Quit: Connection closed)
2020-06-13 15:19:24 shrini yes, just like any other command line application, emacs has many keystrokes to do tasks quickly
2020-06-13 15:19:37 shrini we can learn them very slowly
2020-06-13 15:19:47 shrini I started as one item/action per day
2020-06-13 15:19:52 <-- kiwi_92 (dfb6d104@gateway/web/cgi-irc/kiwiirc.com/ip.223.182.209.4) has quit (Quit: Connection closed)
2020-06-13 15:20:00 shrini now I know some 6-7 actions only
2020-06-13 15:20:02 --> ajithra (9d3372e2@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.114.226) has joined #ilugc
2020-06-13 15:20:13 <-- tamil (31cd4fc8@49.205.79.200) has quit (Remote host closed the connection)
2020-06-13 15:20:13 shrini but this is enough to start with emacs
2020-06-13 15:20:26 shrini remember this - take baby steps only on learning emacs
2020-06-13 15:20:36 shrini it will be a one editor for our lifetime
2020-06-13 15:20:38 <-- rattlesnake (~rattlesna@103.95.82.66) has quit (Ping timeout: 264 seconds)
2020-06-13 15:20:40 --> gnurenga (31cd4fc8@49.205.79.200) has joined #ilugc
2020-06-13 15:20:48 shrini we dont need any other editor/ide for our lifetime
2020-06-13 15:21:02 shrini we can do all the things with emacs
2020-06-13 15:21:09 shrini that we can do in commandline
2020-06-13 15:21:36 shrini IRC Chat, Calculator, programming, debugging, games, email, and more
2020-06-13 15:21:37 Guha I belive vi vim and nano were the editors support at almost every linux flaours
2020-06-13 15:21:52 shrini emacs is there for all the operations systems
2020-06-13 15:22:01 shrini we have to install it
2020-06-13 15:22:14 --> rattlesnake (~rattlesna@106.198.135.228) has joined #ilugc
2020-06-13 15:22:29 shrini emacs has different modes to do different things
2020-06-13 15:22:44 shrini org-mode is one thing to manage our tasks
2020-06-13 15:22:47 <-- rajesh_gp (9d2e0153@157.46.1.83) has quit (Remote host closed the connection)
2020-06-13 15:22:48 <-- kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has quit (Client Quit)
2020-06-13 15:23:11 <-- kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has quit (Quit: Connection closed)
2020-06-13 15:23:11 shrini it can be used as notes manager, todo manager, sprint planner, life organizer etc
2020-06-13 15:23:30 --> kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:23:40 --> kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has joined #ilugc
2020-06-13 15:24:06 shrini we need to open or save file with .org extension
2020-06-13 15:24:19 shrini to enable org-mode in emacs
2020-06-13 15:24:28 shrini emacs shrini-tasks.org
2020-06-13 15:25:02 shrini and just start typing
2020-06-13 15:25:15 shrini shall we have some live demo?
2020-06-13 15:25:19 rattlesnake !
2020-06-13 15:25:24 shrini ask rattlesnake
2020-06-13 15:25:34 shrini goto https://training.ilugc.in/
2020-06-13 15:25:39 shrini in your browser
2020-06-13 15:25:43 rattlesnake yes for the live demo any kind of follow along
2020-06-13 15:25:53 shrini and confirm here once you have opened it
2020-06-13 15:26:08 shrini if you have emacs in your computer, you can use that too
2020-06-13 15:26:14 shrini install emacs
2020-06-13 15:26:21 <-- kiwi_0 (7aae2dda@gateway/web/cgi-irc/kiwiirc.com/ip.122.174.45.218) has quit (Quit: Connection closed)
2020-06-13 15:26:26 shrini then type emacs-nox test.org
2020-06-13 15:26:31 shrini in terminal
2020-06-13 15:26:43 shrini if you are in training.ilugc.in
2020-06-13 15:26:51 shrini there are three panels
2020-06-13 15:26:53 --> kushal688 (~kushal6@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:26:54 shrini the top is for IRC
2020-06-13 15:27:00 shrini the middie is for trainier to show demo
2020-06-13 15:27:04 --> humachine59 (~humachine@unaffiliated/humachine) has joined #ilugc
2020-06-13 15:27:09 shrini the bottom is for everyone to practise
2020-06-13 15:27:09 --> rattleshake (~rattlesha@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:27:20 --> philomath (~philomath@209.182.238.225) has joined #ilugc
2020-06-13 15:27:26 --> stof999-kiwi (~stof999-k@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:27:48 rattlesnake joined at training.ilugc.in
2020-06-13 15:28:08 <-- kushal688 (~kushal6@2a01:4f9:c010:82aa::1) has quit (Client Quit)
2020-06-13 15:28:14 shrini any other joining there?
2020-06-13 15:28:24 gnurenga Joined there
2020-06-13 15:28:24 nihaal joined
2020-06-13 15:28:29 humachine joined
2020-06-13 15:28:30 shrini or opened emacs-nox in your laptop?
2020-06-13 15:28:30 stof9-9 joined
2020-06-13 15:29:07 mohan43u !
2020-06-13 15:29:24 shrini ask mohan43u
2020-06-13 15:29:45 famubu would normal emacs be okay?
2020-06-13 15:29:56 shrini normal emacs is fine
2020-06-13 15:30:00 shrini that is simple
2020-06-13 15:30:17 famubu ?
2020-06-13 15:30:26 shrini ask famubu
2020-06-13 15:30:31 mohan43u hi, to people who are joining training.ilugc.in, start emacs as '(unset USER; unset LOGNAME; emacs)' instead of just 'emacs' in "Practice Terminal" to get rid if some initial error
2020-06-13 15:30:37 famubu Whats the difference btw nox and normal?
2020-06-13 15:30:44 gnurenga emacs -nw <filname.org> this also work
2020-06-13 15:30:55 shrini thanks gnurenga
2020-06-13 15:31:00 shrini nox is No X
2020-06-13 15:31:04 --> Guha86 (~Guha@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:31:11 shrini "No X" means open in the same terminal
2020-06-13 15:31:18 shrini dont open in a new GUI window
2020-06-13 15:31:35 shrini I had tons of fears over the GUI window of emacs
2020-06-13 15:31:43 shrini it is not like a gedit or kate
2020-06-13 15:31:54 shrini I did not know how to open a file using that
2020-06-13 15:32:11 <-- Guha86 (~Guha@2a01:4f9:c010:82aa::1) has quit (Client Quit)
2020-06-13 15:32:17 shrini but simple CLI emacs with nox or -nw helps a lot to start with
2020-06-13 15:32:33 shrini we can learn many emacs magics later once we start to use that
2020-06-13 15:32:58 shrini some key stokes may not work on training.ilugc.in
2020-06-13 15:33:00 shrini for emacs
2020-06-13 15:33:02 <-- kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 15:33:22 shrini take note of them and try in your own emacs in your machine
2020-06-13 15:33:30 --> kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:33:40 shrini so, let us start with opening a file
2020-06-13 15:34:05 shrini see the middle pane of that site
2020-06-13 15:34:20 shrini I opened emacs demo.txt
2020-06-13 15:34:29 shrini it shows some window
2020-06-13 15:34:36 shrini ignore the top panel
2020-06-13 15:34:45 --> Hell99 (~Hell@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:34:50 shrini with "File Edit Options" etc
2020-06-13 15:35:24 shrini you can also try creating a file in the bottom pane
2020-06-13 15:35:34 shrini now i am adding some content
2020-06-13 15:37:40 kushal6 !
2020-06-13 15:37:53 gnurenga !
2020-06-13 15:38:26 shrini ask kushal6
2020-06-13 15:38:43 kushal6 Is emacs an OS or an application?
2020-06-13 15:38:53 kushal6 I have known is as an application till date
2020-06-13 15:38:54 shrini kushal6: emacs is an application only
2020-06-13 15:39:06 kushal6 And I was once said by someone
2020-06-13 15:39:19 <-- kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has quit (Quit: Connection closed)
2020-06-13 15:39:28 mohan43u !
2020-06-13 15:39:28 kushal6 " Emacs is not just a text editor, calling it that will be a great insult for Emacs"
2020-06-13 15:39:29 shrini some people use say it for fun as a OS
2020-06-13 15:39:53 shrini it can do many other things that a text editor can not do
2020-06-13 15:40:08 shrini let us see how on the org-mode demo
2020-06-13 15:40:08 kushal6 Yes :shrini That is what I just told.
2020-06-13 15:40:16 shrini ask gnurenga
2020-06-13 15:40:27 --> kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has joined #ilugc
2020-06-13 15:40:39 gnurenga @shrini It needs a good text editor, I dont understand this part
2020-06-13 15:40:39 shrini ask mohan43u
2020-06-13 15:40:51 shrini gnurenga: that is fun text
2020-06-13 15:41:00 gnurenga @shrini oh o
2020-06-13 15:41:09 mohan43u kushal6, gnurenga that line is a joke about emacs
2020-06-13 15:41:19 Satheesh !
2020-06-13 15:41:22 shrini they mean that emacs can do all other things
2020-06-13 15:41:27 mohan43u kushal6, gnurenga one more joke here https://xkcd.com/378/
2020-06-13 15:41:32 <-- kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has quit (Client Quit)
2020-06-13 15:41:46 shrini just like we use our smartphone for lot many things, except for making cals
2020-06-13 15:41:49 gnurenga mohan43u will look in to it
2020-06-13 15:41:56 shrini ask Satheesh
2020-06-13 15:42:17 Satheesh I am getting this error on panel 3 "User guest has no home directory"
2020-06-13 15:42:44 mohan43u Satheesh: use '(unset USER; unset LOGNAME; emacs)' instead of typing 'emacs'
2020-06-13 15:42:58 --> paulpandi (9d334f1d@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.79.29) has joined #ilugc
2020-06-13 15:43:19 shrini you can set as mohan43u says
2020-06-13 15:43:25 shrini or ignore the error
2020-06-13 15:43:28 shrini no harm for now
2020-06-13 15:43:33 <-- anbazhagan (3b613aa5@59.97.58.165) has quit (Remote host closed the connection)
2020-06-13 15:43:36 --> aswin (~aswin@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:43:45 rattlesnake ! solution to problem by Satheesh
2020-06-13 15:44:26 <-- paulpandi (9d334f1d@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.79.29) has quit (Client Quit)
2020-06-13 15:44:38 rattlesnake Press `Ctrl-x 1` and the error will dissappear
2020-06-13 15:44:41 --> paulpandi (9d334f1d@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.79.29) has joined #ilugc
2020-06-13 15:44:55 shrini ok
2020-06-13 15:45:02 <-- paulpandi (9d334f1d@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.79.29) has quit (Client Quit)
2020-06-13 15:45:09 --> kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has joined #ilugc
2020-06-13 15:45:16 --> paulpandi (9d334f1d@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.79.29) has joined #ilugc
2020-06-13 15:45:19 shrini so everyone can open a file, type and save using C-x C-s
2020-06-13 15:45:22 shrini right?
2020-06-13 15:45:39 shrini now exit the emacs with C-x C-c
2020-06-13 15:45:45 gnurenga yes
2020-06-13 15:45:46 shrini C here is Ctrl
2020-06-13 15:45:50 <-- ajithra (9d3372e2@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.114.226) has quit (Ping timeout: 264 seconds)
2020-06-13 15:45:59 shrini once you exitted the emacs,
2020-06-13 15:46:14 shrini create a new file with .org extention
2020-06-13 15:46:17 shrini like shrini.org
2020-06-13 15:46:34 shrini now, emacs will open in org-mode
2020-06-13 15:46:49 shrini more magics are waiting here to unlock
2020-06-13 15:46:56 shrini let me open a file
2020-06-13 15:47:36 --> kiwi_54 (6ad90f6c@gateway/web/cgi-irc/kiwiirc.com/ip.106.217.15.108) has joined #ilugc
2020-06-13 15:48:57 Satheesh Thanks rattlesnake
2020-06-13 15:49:20 shrini You can use org-mode to capture anything text and organize them neatly. │································
2020-06-13 15:49:40 shrini For example, I use it for note taking
2020-06-13 15:49:45 shrini I need heading, sub heading, more sub heading and items as notes.
2020-06-13 15:49:51 shrini * heading starts with *
2020-06-13 15:49:58 shrini ** sub heading starts with **
2020-06-13 15:50:06 shrini *** we can have more inner levels of sub heading with more stars like ***
2020-06-13 15:51:25 famubu ?
2020-06-13 15:51:46 shrini ask famubu
2020-06-13 15:51:48 famubu So similar to markdown?
2020-06-13 15:51:58 shrini org-mode is similar to markdown
2020-06-13 15:52:06 shrini it is just a text markup language
2020-06-13 15:52:14 shrini not a big language
2020-06-13 15:52:16 <-- kiwi_54 (6ad90f6c@gateway/web/cgi-irc/kiwiirc.com/ip.106.217.15.108) has quit (Client Quit)
2020-06-13 15:52:18 shrini just a few symbols
2020-06-13 15:52:27 shrini now, we can move the headings easily
2020-06-13 15:53:15 shrini change their orders with Alt + (UP arrow / DOWN Arrow)
2020-06-13 15:53:58 shrini Put the cursor on the heading and press tab to compress or expand its inner contents
2020-06-13 15:54:32 shrini Now, I am going to organize the items with Alt + arrows
2020-06-13 15:54:39 gnurenga !
2020-06-13 15:54:56 shrini ask gnurenga
2020-06-13 15:55:09 --> kushalchand (31cf80e6@49.207.128.230) has joined #ilugc
2020-06-13 15:55:21 <-- kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 15:55:46 gnurenga Info I was using c+space to cut copy paste
2020-06-13 15:55:47 gnurenga before
2020-06-13 15:55:56 gnurenga thanks alt+arrow is really helpfull
2020-06-13 15:56:25 shrini ok
2020-06-13 15:56:25 --> kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 15:56:37 <-- kushalchand (31cf80e6@49.207.128.230) has quit (Remote host closed the connection)
2020-06-13 15:56:53 shrini this is how we can capture all the notes
2020-06-13 15:57:05 shrini I started to capture all my life events in a text file
2020-06-13 15:57:17 shrini like a digital diary and task manager to capture todo lists
2020-06-13 15:57:37 shrini I tried to use many online tools, but they have different issues
2020-06-13 15:57:47 shrini but the text file we create with org-mode is so handy
2020-06-13 15:58:00 shrini now let us add few tasks on that file
2020-06-13 15:58:29 <-- kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has quit (Quit: Connection closed)
2020-06-13 15:59:43 <-- humachine59 (~humachine@unaffiliated/humachine) has quit (Quit: Client closed)
2020-06-13 16:00:16 shrini We can add more tasks as bullet points as sub headings
2020-06-13 16:00:45 --> kiwi_67 (b641d6eb@gateway/web/cgi-irc/kiwiirc.com/ip.182.65.214.235) has joined #ilugc
2020-06-13 16:00:54 shrini we can add TODO and DONE strings for each tasks
2020-06-13 16:01:01 Guha How you save content with emacs
2020-06-13 16:01:01 shrini we can add manually
2020-06-13 16:01:13 Guha its strange for vi users
2020-06-13 16:01:15 shrini C-x C-s to save
2020-06-13 16:01:21 <-- paulpandi (9d334f1d@gateway/web/cgi-irc/kiwiirc.com/ip.157.51.79.29) has quit (Quit: Connection closed)
2020-06-13 16:01:34 --> kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has joined #ilugc
2020-06-13 16:01:38 gnurenga ctrl + x ctrl+s
2020-06-13 16:02:25 shrini I add TODO and DONE in front of each tasks manually
2020-06-13 16:02:42 <-- kiwi_67 (b641d6eb@gateway/web/cgi-irc/kiwiirc.com/ip.182.65.214.235) has left #ilugc
2020-06-13 16:02:44 gnurenga !
2020-06-13 16:02:45 shrini by this we can get to know what are the items to work on and what we have done
2020-06-13 16:02:48 shrini ask gnurenga
2020-06-13 16:02:57 gnurenga @shrin is it possible list todo alone
2020-06-13 16:03:09 gnurenga suppose if we have large todo and done list
2020-06-13 16:03:12 shrini it should be possible
2020-06-13 16:03:19 shrini There is an agenda view
2020-06-13 16:03:33 shrini which can tell you a overview of a week's taks pending
2020-06-13 16:03:44 shrini I am yet to learn the agenda
2020-06-13 16:03:58 gnurenga @shrini thanks
2020-06-13 16:05:28 shrini https://blog.aaronbieber.com/2016/09/24/an-agenda-for-life-with-org-mode.html
2020-06-13 16:05:33 shrini see here for more details
2020-06-13 16:05:44 shrini how to add TODO quickly?
2020-06-13 16:06:00 shrini C-c C-t
2020-06-13 16:06:27 shrini by pressing tha above combinations, we can add TODO and DONE easily for any items
2020-06-13 16:06:50 shrini if yoy try this on training.ilugc.in, it may not work
2020-06-13 16:06:55 <-- kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has quit (Quit: Connection closed)
2020-06-13 16:06:57 shrini C-t opens a new tab in browser
2020-06-13 16:07:04 shrini try this in your own emacs
2020-06-13 16:07:54 shrini Next is Adding priorities
2020-06-13 16:08:05 shrini S+arrows
2020-06-13 16:08:13 shrini shift + Up/DOWN arrows
2020-06-13 16:08:22 shrini it will add [#B]
2020-06-13 16:08:34 shrini move up, it will change to [#A]
2020-06-13 16:08:41 shrini move down, it will change to [#C]
2020-06-13 16:09:10 shrini with A,B,C we can add priorities and work in high priority tasks
2020-06-13 16:09:23 shrini read "Eat that frog" book
2020-06-13 16:09:35 shrini to know more on managing tasks well
2020-06-13 16:09:44 shrini we can not do all things we think
2020-06-13 16:09:56 shrini do only three high priority tasks on any day
2020-06-13 16:10:13 shrini delegate other tasks or dont do the small tasks
2020-06-13 16:10:30 shrini thus, we can do only tasks that have high impact o n our life
2020-06-13 16:11:19 shrini There is one more thing, to calculate on the hours we work on each task
2020-06-13 16:11:24 shrini clock-in and clock-out
2020-06-13 16:11:55 shrini C-c C-x C-i to clock in
2020-06-13 16:12:08 shrini C-c C-x C-o to clock out
2020-06-13 16:12:15 shrini showing demo on this
2020-06-13 16:12:46 shrini if you press C-c C-x C-i clock in starts
2020-06-13 16:12:52 --> kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has joined #ilugc
2020-06-13 16:12:58 shrini a drawer with LOGBOOK entry added below the task
2020-06-13 16:13:11 shrini you can use TAB to expand the drawer
2020-06-13 16:13:29 shrini once the task is done, clock out the task with C-c C-x C-o
2020-06-13 16:13:38 --> kiwi_82 (31cfcd09@gateway/web/cgi-irc/kiwiirc.com/ip.49.207.205.9) has joined #ilugc
2020-06-13 16:13:52 <-- Malaw89 (5c0d9633@gateway/web/cgi-irc/kiwiirc.com/ip.92.13.150.51) has quit (Quit: Connection closed)
2020-06-13 16:13:56 shrini once clock out, start time and end time with the total time spent is added
2020-06-13 16:14:17 <-- kiwi_82 (31cfcd09@gateway/web/cgi-irc/kiwiirc.com/ip.49.207.205.9) has quit (Client Quit)
2020-06-13 16:14:51 shrini There are more items on this
2020-06-13 16:15:06 shrini we can generate timesheets with this clock-in and clock-out
2020-06-13 16:15:11 <-- famubu (~famubu@59.97.58.165) has quit (Ping timeout: 246 seconds)
2020-06-13 16:15:14 shrini I am yet to learn on the timesheet studd
2020-06-13 16:15:16 shrini stuff
2020-06-13 16:15:38 shrini we can export the org-mode text file in so many formats like HTML, markdown, PDF and more
2020-06-13 16:15:40 shrini C-c C-e h h (org-html-export-to-html)
2020-06-13 16:15:48 --> famubu (~famubu@42.111.146.152) has joined #ilugc
2020-06-13 16:15:52 shrini now I am exporting to html file
2020-06-13 16:16:41 shrini mohan43u: can you install links on that server?
2020-06-13 16:17:00 shrini For now, we can export that org-mode file to html easily
2020-06-13 16:17:07 mohan43u shrini: you can do it. use 'apt install links'
2020-06-13 16:17:11 shrini ok
2020-06-13 16:17:17 mohan43u shrini: sudo apt install links
2020-06-13 16:18:25 shrini ok
2020-06-13 16:18:36 shrini I am nearing the session end
2020-06-13 16:19:00 shrini so, with this emacs, we can easily organizse the taks
2020-06-13 16:19:56 shrini https://kushaldas.in/pages/hacker-ethic-and-free-software-movement.html
2020-06-13 16:20:06 shrini read think link
2020-06-13 16:20:12 <-- malaw (5c0d9633@gateway/web/cgi-irc/kiwiirc.com/ip.92.13.150.51) has quit (Ping timeout: 256 seconds)
2020-06-13 16:20:24 shrini this explains the history of the hacker culture and how emacs was buit
2020-06-13 16:20:42 shrini https://sachachua.com/blog/emacs/
2020-06-13 16:20:55 shrini this is a super site to get weekly news on emacs
2020-06-13 16:21:03 shrini and many interviews with emacs users
2020-06-13 16:21:15 shrini http://emacslife.com/ this is good to start with emacs
2020-06-13 16:21:35 Guha where is your blog located
2020-06-13 16:21:39 stof9-9 ?
2020-06-13 16:22:01 shrini my blog is http://goinggnu.wordpress.com
2020-06-13 16:22:03 shrini ask stof9-9
2020-06-13 16:22:16 shrini https://karl-voit.at/ is good site to learn more about emacs
2020-06-13 16:22:20 stof9-9 any idea of syncronise *.org file to use it on android? that's why i use calddav for notes/tasks/...
2020-06-13 16:23:05 shrini stof9-9: use any nextcloud server to sync
2020-06-13 16:23:24 stof9-9 and then emacs on android?
2020-06-13 16:23:25 shrini on mobile we can use orgzly app
2020-06-13 16:23:40 stof9-9 ok. thanks
2020-06-13 16:23:49 shrini orgzly app can read/write the orgmode files
2020-06-13 16:23:54 shrini https://orgmode.org/worg/org-tutorials/orgtutorial_dto.html
2020-06-13 16:24:02 shrini this is good to start with org-mode
2020-06-13 16:24:28 shrini mbuf is spreading emacs for many years
2020-06-13 16:24:42 rattlesnake ?
2020-06-13 16:24:46 shrini due tomany hesitations to start with it, I feel that I have missed a great life
2020-06-13 16:24:47 gnurenga !
2020-06-13 16:24:49 shrini ask rattlesnake
2020-06-13 16:25:28 rattlesnake Reccommendations on already existing templates
2020-06-13 16:25:30 stof9-9 ?
2020-06-13 16:25:40 rattlesnake for org mode organizers
2020-06-13 16:25:50 shrini rattlesnake: there is no template
2020-06-13 16:26:02 shrini just write down the tasks
2020-06-13 16:26:12 shrini you will figure it on how to organizse them
2020-06-13 16:26:25 rattlesnake setting a system that works for todos, and agenda is going to take a lot of time setting up and learning up
2020-06-13 16:26:31 shrini just use heading,subheading and lot of sub sub headings
2020-06-13 16:26:39 shrini yes
2020-06-13 16:26:50 shrini https://www.williamhern.com/living-in-a-single-text-file.html
2020-06-13 16:26:54 shrini read here
2020-06-13 16:26:59 mbuf rattlesnake, you will find plenty of blogs and reading material online on how people use Org-mode; there is no one template that everyone uses; some of us in this channel participate in https://gitlab.com/shakthimaan/operation-blue-moon which you might want to explore
2020-06-13 16:27:04 <-- stof999-kiwi (~stof999-k@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 16:27:21 shrini few people are using one big text file to add all there notes, tasks and all the life history on one big text file
2020-06-13 16:27:21 rattlesnake since this is an open ended discussion, I will talk more on this after the sessions are over
2020-06-13 16:27:44 <-- zorro_valmunskin (3124829e@gateway/web/cgi-irc/kiwiirc.com/ip.49.36.130.158) has quit (Quit: Connection closed)
2020-06-13 16:27:44 <-- famubu (~famubu@42.111.146.152) has quit (Read error: Connection reset by peer)
2020-06-13 16:27:48 gnurenga shrini how to copy your sessions to text file ? is there a clean way to download you session notes in chat ??
2020-06-13 16:28:16 shrini all IRC clients give ways to download logs
2020-06-13 16:28:32 <-- kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has quit (Quit: Connection closed)
2020-06-13 16:28:48 shrini anyhow mohan43u will export and send alon with the minutes mail
2020-06-13 16:28:54 gnurenga ok thanks
2020-06-13 16:29:00 --> kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has joined #ilugc
2020-06-13 16:29:09 shrini ask stof9-9
2020-06-13 16:29:28 stof9-9 "I feel that I have missed a great life" .. may i ask how long yur todo list is? :)
2020-06-13 16:30:10 shrini stof9-9: 20k text file only
2020-06-13 16:30:19 shrini with around 650 line
2020-06-13 16:30:43 shrini using it for a month
2020-06-13 16:31:01 shrini after reading this https://www.williamhern.com/living-in-a-single-text-file.html last week
2020-06-13 16:31:17 shrini adding all my notes, todo, blog post drafts in a single file
2020-06-13 16:31:30 shrini so that we can keep all the stuff in one file
2020-06-13 16:32:02 shrini like, to-do, to-buy, to-call, notes, meeting minutes, URLs everything in a single file
2020-06-13 16:32:07 shrini under various heading
2020-06-13 16:32:22 shrini TAB is so useful to hide the unused heading
2020-06-13 16:32:29 rattlesnake ?
2020-06-13 16:32:33 shrini ask rattlesnake
2020-06-13 16:32:49 <-- Hell99 (~Hell@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 16:33:09 rattlesnake One thing that I have been missing while exploring note taking and todo with org mode is pictures
2020-06-13 16:33:19 --> famubu (~famubu@59.97.58.165) has joined #ilugc
2020-06-13 16:33:31 rattlesnake images in org mode file, what is the easy way to do that.
2020-06-13 16:33:33 shrini yes
2020-06-13 16:33:41 shrini all the things is text based only
2020-06-13 16:33:51 mbuf rattlesnake, you can link and view pictures in Org files
2020-06-13 16:34:13 shrini check http://plaintextproject.online/
2020-06-13 16:34:21 mbuf You can even generate output of code snippets, plot graphs using org-babel in an Org text file
2020-06-13 16:34:24 shrini to more about the good features of plaintext
2020-06-13 16:34:34 <-- kiwi_80 (9d32e573@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.229.115) has quit (Quit: Connection closed)
2020-06-13 16:34:50 shrini yes. emacs has all the wonders
2020-06-13 16:34:55 <-- linuxbaskar (~linuxbask@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 16:34:57 shrini we have to unlock one by one
2020-06-13 16:35:04 shrini start with baby steps
2020-06-13 16:35:20 rattlesnake I used a few specialised note taking applications earlier, I just used to paste images there. Was struggling for that on org mode. Will checkout the resources that you shared
2020-06-13 16:35:28 shrini it is a skill like GNU/Linux, cycling, cooking - skills that will help for our lifetime
2020-06-13 16:36:16 shrini I am done with my session
2020-06-13 16:36:28 stof9-9 thanks
2020-06-13 16:36:40 shrini thanks to mohan mohan43u for develpoing meetty
2020-06-13 16:36:41 mohan43u thank you shrini for the wonderful demo
2020-06-13 16:36:57 shrini and hosting on training.ilugc.in
2020-06-13 16:36:58 gnurenga @shrini thanks c+uparrow is a life saver I got to know
2020-06-13 16:37:05 humachine That was very nice and informational. Thanks shrini
2020-06-13 16:37:16 mohan43u we will have a 5 min break before we start the next session
2020-06-13 16:37:26 kushal6 Thank you shrini
2020-06-13 16:38:01 mohan43u next session is from kushal6 about "Contributing to LTP - Linux Test Project"
2020-06-13 16:38:36 gnurenga @shrini thanks ALT+uparrow is a life saver I got to know
2020-06-13 16:38:55 gnurenga sorry corrected my mistake
2020-06-13 16:40:20 --> linuxbaskar (~linuxbask@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 16:42:52 linuxbaskar ?
2020-06-13 16:43:19 kushal6 Hi everyone, this is Kushal here. I would like to begin with a note on how I got into my first open source contribution. I work for an organization in Chennai, we are constantly committed towards the contribution of many open source projects. I was assigned a task to write a test case for LTP (more on that soon) and that is how I got started. I am
2020-06-13 16:43:19 kushal6 a beginner with Linux and programming, so please correct me whenever you feel I am wrong.
2020-06-13 16:44:57 kushal6 And I guess I am gonna be sending long texts like the one above. So don't mind.
2020-06-13 16:46:25 kushal6 Let us begin with what is LTP
2020-06-13 16:47:04 <-- mohan43u-kiwi (~mohan43u-@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 16:47:54 kushal6 LTP is a testsuite which tests Linux kernel and other features.It was started by a group of organisations namely SGI, OSDL and Bull and is maintained by IBM, Cisco, Fujitsu, SUSE, Red Hat, Oracle. That is what their README tells.
2020-06-13 16:48:56 kushal6 Let us get back to the history of LTP and why it was started in the first place. You develop a project, test it and deploy it. What happens when the size of the project grows?
2020-06-13 16:49:28 --> mohan43u-kiwi (~mohan43u-@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 16:49:40 kushal6 You get to test a lot of code. You must keep adding to the tests. Because testing makes a project reliable. Linux was started like this. And soon it got so huge.
2020-06-13 16:49:51 kushal6 Imagine one side developers developing the code base which is going to be the heart of so many Operating Systems and on the other hand testing the features being added.
2020-06-13 16:50:13 kushal6 There was no such framework to test the kernel until LTP was launched. Developers used to do all the hard work by themselves.
2020-06-13 16:50:50 kushal6 The bugs were reported by users who used it for general purpose. This kind of testing is known as ad-hoc testing. wherein there is no documentation and planning for how test cases are written. Hence the need for a planned way of testing the kernel was required. That is where the need for LTP arises. Until LTP was framed there was little being done
2020-06-13 16:50:51 kushal6 to test the kernel in an efficient way. That is when these organisations joined hands to test the kernel. Through the development of an open source project like LTP, the contributors to test the kernel and the reliability, stability and robustness of the kernel increased.
2020-06-13 16:52:07 kushal6 So you might have an idea about what is Linux Test project (LTP), but asking why contribute to LTP, why test the kernel in the first place? There are many answers to this.
2020-06-13 16:53:14 kushal6 For an open source contributor it is easy to realise how adding one simple file or making a small change in the project results in enhancing the project, for a naive user like me it could be ensuring or fixing a bug, which they found out in an android device which runs on linux, which is in turn related to a bad syscall test case or something which
2020-06-13 16:53:14 kushal6 hasn’t tested yet. This user can at least report an issue of what happened.
2020-06-13 16:54:28 kushal6 It is all about making a piece of software a better version of itself with every push. And the Linux kernel is running on millions of devices and any failure or an unseen error can cause these many devices to be under threat. So the answer for a more stable kernel in its next release is contribution to LTP. Hence contributing to LTP results in a
2020-06-13 16:54:28 kushal6 robust kernel, which in turn is running on all the handheld smart devices.
2020-06-13 16:55:39 kushal6 Things to know before you get started with LTP: Compiling a custom kernel, basics of Linux system programming, basics of git.
2020-06-13 16:56:09 kushal6 The need to know how to compile a kernel is: Always test your code on a stable kernel, you might be writing tests which can run only on a given kernel version or it could be like the bug is applicable only for a particular kernel version.
2020-06-13 16:56:19 --> shrini1 (uid38773@gateway/web/irccloud.com/x-lptfsqtcsmbvwedx) has joined #ilugc
2020-06-13 16:56:24 <-- rattleshake (~rattlesha@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 16:56:55 kushal6 System programming is essential because in the end you will be testing syscalls, an understanding of syscalls and their role and how to implement them will give you a head start to test the syscall. You have to know the working of what you are testing, right? I shall talk about why git is required towards the end.
2020-06-13 16:57:51 kushal6 To start with there are issues posted on the git page of LTP. So anyone willing to contribute can get started easily through the issue description and documents related to writing test cases which are a part of the git repo.
2020-06-13 16:58:39 kushal6 To get started, we definitely have to clone the repo. Configure it and build it. Please ensure that the production system satisfies the dependencies for LTP before building it.
2020-06-13 16:59:38 kushal6 Guys I will try to disconnect and connect back
2020-06-13 16:59:41 kushal6 Just give me a moment
2020-06-13 17:00:30 --> kushalchand (~kushalcha@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:00:32 kushal6 Our main aim was to test a syscall particularly mmap(). So I will be sticking to where files related so syscalls are present and how to build them later in the talk.
2020-06-13 17:01:01 kushalchand So let us start with a demo
2020-06-13 17:01:10 kushalchand I will be posting here what is going on
2020-06-13 17:02:25 <-- mohan43u-kiwi (~mohan43u-@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 17:02:25 <-- kushal6 (~kushal6@2a01:4f9:c010:82aa::1) has quit (Remote host closed the connection)
2020-06-13 17:02:25 <-- kushalchand (~kushalcha@2a01:4f9:c010:82aa::1) has quit (Remote host closed the connection)
2020-06-13 17:02:25 <-- linuxbaskar (~linuxbask@2a01:4f9:c010:82aa::1) has quit (Remote host closed the connection)
2020-06-13 17:02:25 <-- shrini-chrome-me (~shrini-ch@2a01:4f9:c010:82aa::1) has quit (Remote host closed the connection)
2020-06-13 17:02:25 <-- Satheesh (~Satheesh@2a01:4f9:c010:82aa::1) has quit (Remote host closed the connection)
2020-06-13 17:02:25 <-- aswin (~aswin@2a01:4f9:c010:82aa::1) has quit (Remote host closed the connection)
2020-06-13 17:03:05 mohan43u kushal is having connectivity issues
2020-06-13 17:03:06 --> kiwi_80 (9d32f2c3@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.242.195) has joined #ilugc
2020-06-13 17:03:26 <-- kiwi_80 (9d32f2c3@gateway/web/cgi-irc/kiwiirc.com/ip.157.50.242.195) has quit (Client Quit)
2020-06-13 17:04:09 gnurenga Building kernel might be freezing his system
2020-06-13 17:05:07 --> kushalchand (~kushalcha@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:05:18 --> Satheesh (~Satheesh@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:05:26 mohan43u if training.ilugc.in disconnected for you. please reconnect
2020-06-13 17:05:52 kushalchand Hey
2020-06-13 17:06:04 --> aswin_28 (31ce7e27@49.206.126.39) has joined #ilugc
2020-06-13 17:06:04 kushalchand We can just make install and run all tests present inside LTP or even run a single test case. The build system is so robust that after you make install you can also run all the tests belonging to one given syscall.
2020-06-13 17:06:07 --> mohan43u-kiwi (~mohan43u-@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:06:11 kushalchand Continuing where I left
2020-06-13 17:06:24 --> Hell4 (~Hell@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:07:02 --> guest1212312 (~guest1212@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:07:11 kushalchand A key thing to keep in mind is you don’t install and run LTP on your work machine. I was advised to run it on a Virtual Machine, I will just tell you to ensure there are no important files in the machine you are going to run LTP and write test cases for the Linux kernel.
2020-06-13 17:07:11 --> stof999-kiwi (~stof999-k@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:07:52 <-- guest1212312 (~guest1212@2a01:4f9:c010:82aa::1) has quit (Client Quit)
2020-06-13 17:08:32 kushalchand we can now watch the presenter terminal
2020-06-13 17:08:47 --> linuxbaskar (~linuxbask@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:09:21 kushalchand So now I am cloning the git repo
2020-06-13 17:09:26 kushalchand https://github.com/linux-test-project/ltp.git
2020-06-13 17:10:20 --> aswin (~aswin@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:10:23 kushalchand the testcases directory are where all type of tests are kept
2020-06-13 17:10:50 kushalchand We are gonna concentrate on kernel so let us look what is inside this directory
2020-06-13 17:11:09 kushalchand I have entered syscalls
2020-06-13 17:11:16 <-- aswin_28 (31ce7e27@49.206.126.39) has quit (Remote host closed the connection)
2020-06-13 17:11:28 <-- Satheesh (~Satheesh@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 17:12:02 --> Satheesh (~Satheesh@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:12:32 kushalchand this is the list of syscall tested under LTP
2020-06-13 17:12:47 kushalchand I have navigated to the mmap dir.
2020-06-13 17:13:07 kushalchand One issue I face when testing all the test cases was time. You have to be patient. The system might not respond well during this phase and freeze at some particular instruction but if your goal can only be achieved by running the whole suite then please be patient. I ran all the test cases when i was just following their README but I had to abort
2020-06-13 17:13:07 kushalchand it because it didn’t go beyond a particular point in testing. Hence please make sure you grab your beverage of choice which has to be coffee before you start running LTP.
2020-06-13 17:13:23 <-- gnurenga (31cd4fc8@49.205.79.200) has quit (Remote host closed the connection)
2020-06-13 17:13:34 kushalchand One issue I face when testing all the test cases was time. You have to be patient. The system might not respond well during this phase and freeze at some particular instruction but if your goal can only be achieved by running the whole suite then please be patient. I ran all the test cases when i was just following their README but I had to abort
2020-06-13 17:13:35 kushalchand it because it didn’t go beyond a particular point in testing. Hence please make sure you grab your beverage of choice which has to be coffee before you start running LTP.
2020-06-13 17:13:47 --> gnurenga (~gnurenga@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:14:28 kushalchand Let us now try to build LTP
2020-06-13 17:15:54 mohan43u kushalchand: use 'sudo apt install make'
2020-06-13 17:16:01 kushalchand And yes there is an option to write test cases in a shell script. But I stuck to the C language.
2020-06-13 17:16:10 kushalchand Thankyou mohan43u
2020-06-13 17:16:53 kushalchand So you can navigate to the syscall you want to test, run make and execute the output file to see how they have built the system.
2020-06-13 17:16:54 mohan43u sudo apt install build-essential automake
2020-06-13 17:17:26 kushalchand And LTP is a vast project, I might be covering only what I have learnt and used. One can always read the docs to know more for one’s particular use case.
2020-06-13 17:18:47 kushalchand So I chose to write the test case in C. Most important thing, CODING STYLE. They follow the Linux kernel coding style and you have to stick to it. We might know what things to keep in mind when writing the test code, but running checkpatch.pl on your file after each time you make any change is the way to go for me.
2020-06-13 17:19:18 kushalchand So after installing the dependency errory
2020-06-13 17:19:22 kushalchand I am configuring the LTP now
2020-06-13 17:19:26 kushalchand with ./configure
2020-06-13 17:19:54 kushalchand Now let us try to run a test case
2020-06-13 17:19:58 --> shrini-kiwi (~shrini-ki@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:22:11 kushalchand Ok there are some issues
2020-06-13 17:22:14 kushalchand let us move on
2020-06-13 17:22:26 kushalchand So once you have found an issue or a syscall which is yet to be tested, what next?
2020-06-13 17:22:33 gnurenga there is an error
2020-06-13 17:22:36 kushalchand So once you have found an issue or a syscall which is yet to be tested, what next?
2020-06-13 17:23:01 kushalchand yes gnurenga
2020-06-13 17:23:32 gnurenga some dependency is missing
2020-06-13 17:23:39 gnurenga while you configure
2020-06-13 17:23:56 kushalchand Yes
2020-06-13 17:24:07 kushalchand I will try to fix it
2020-06-13 17:25:04 kushalchand ./configure: line 6111: syntax error near unexpected token `LIBMNL,' │···················································
2020-06-13 17:25:05 kushalchand ./configure: line 6111: ` PKG_CHECK_MODULES(LIBMNL, libmnl,
2020-06-13 17:25:08 kushalchand Oops sorry
2020-06-13 17:25:19 kushalchand There is a default test skeleton which the docs provide, which mostly does the job if you are going to write a basic test case.
2020-06-13 17:26:34 kushalchand The hands behind LTP have created a structure which handles all the testing process. You just have to initialise it with members according to your need.
2020-06-13 17:26:39 <-- linuxbaskar (~linuxbask@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 17:26:46 mohan43u try 'apt install libmnl-dev'
2020-06-13 17:26:57 mohan43u 'sudo apt install libmnl-dev'
2020-06-13 17:27:01 kushalchand since there are 17 mmap test cases
2020-06-13 17:27:14 kushalchand I will create a file called mmap18.c
2020-06-13 17:28:15 mohan43u sorry. need to fix the configure first to more forward
2020-06-13 17:28:45 gnurenga install pkg-config
2020-06-13 17:29:23 kushalchand Thank you
2020-06-13 17:29:37 kushalchand this is the skeleton of basic test case
2020-06-13 17:30:06 kushalchand Let’s say you are testing a syscall or a feature of a syscall which was added after a given particular kernel release. Then adding the test case with no minimum kernel requirement will result in a failure on older kernels.
2020-06-13 17:31:07 mohan43u kushalchand: we can do experiments after meeting. continue with the talk
2020-06-13 17:32:29 kushalchand There is a structure member for this where you can specify the minimum kernel the system should be running on, if the version isn’t met then the test fails automatically and gives a message telling you the configuration was not met.
2020-06-13 17:32:34 --> simpleganesh (9d2e07d7@157.46.7.215) has joined #ilugc
2020-06-13 17:33:00 kushalchand All this happens under the hood of LTP, You just have to enter the version and release number. And you are safe.
2020-06-13 17:33:01 kushalchand So there are other members like which function to be called when the test is run. You might be thinking isn’t there a main in every test case? No, the main() is within another file.
2020-06-13 17:33:30 kushalchand A quick insight which I’d like to share. Some test files do contain main(). Now I don’t know the reason why they have main() and how LTP is handling it. But one difference I found is they are using a different header file called test.h but the latest LTP doc tells us that main is in tst_test.h, these test cases might be old and a few have years
2020-06-13 17:33:31 kushalchand dating back to 2001. So that might be the reason. I didn’t look into the test.h file, so I can’t really tell how it is working.
2020-06-13 17:34:30 kushalchand So this is where the main is
2020-06-13 17:34:44 kushalchand All I know is stick to the latest guidelines which are on the git when you start writing a test case. Which will make it easier for you to write code without any confusions and make the people at LTP to accept the patch with fewer complications.
2020-06-13 17:35:05 kushalchand So simply put, you just have to add one function which will comprise one test case, assign the function name to the test_all member of the structure. You might invoke other functions with this single function.
2020-06-13 17:35:37 kushalchand So once you have written the basic structure. You have to output the results of the tests, this is done using the test framework itself. There is a function called tst_res which is part of the tst_test.h, and through the use of macros you can print an output message and the result of the test, whether it has passed or failed or there was a
2020-06-13 17:35:38 kushalchand configuration issue. I am not touching this in detail as there are lots of things to be taken care of.
2020-06-13 17:36:11 gnurenga !
2020-06-13 17:36:51 kushalchand Remember how you can run all test cases present in LTP by running the whole project? Well seems like the test case you just wrote won’t run on running LTP. For this you have to add the test case to the runtest directory within LTP. The runtest directory consists of all the executables which has to be run when ./runltp is called. So you just have
2020-06-13 17:36:52 kushalchand to add the executable name inside the directory for your syscall and the job is done.
2020-06-13 17:37:00 kushalchand yes gnurenga
2020-06-13 17:37:42 gnurenga in INSTALL file you will have all the dependencies mentioned for compilation
2020-06-13 17:37:48 gnurenga it is ltp/INSTALL
2020-06-13 17:38:34 gnurenga check on top
2020-06-13 17:38:36 mohan43u gnurenga: its is not the time to do fixing.
2020-06-13 17:38:53 gnurenga ok
2020-06-13 17:39:01 mohan43u gnurenga: we should have prepared the environment before. it our mistake
2020-06-13 17:39:23 mohan43u gnurenga: lets continue with the talk
2020-06-13 17:39:27 gnurenga ok
2020-06-13 17:39:28 mohan43u kushalchand: please continue
2020-06-13 17:39:36 kushalchand Remember how you can run all test cases present in LTP by running the whole project? Well seems like the test case you just wrote won’t run on running LTP. For this you have to add the test case to the runtest directory within LTP. The runtest directory consists of all the executables which has to be run when ./runltp is called. So you just have
2020-06-13 17:39:37 kushalchand to add the executable name inside the directory for your syscall and the job is done.
2020-06-13 17:40:24 kushalchand You might be wondering, I have written the test, compiled it, ran it and it was successful. What next? First and foremost check for coding-style errors using checkpatch. Once that is done. See the status of the git repo. There must be at least 3 files you changed. The testfile, gitignore file, file in the runtest directory
2020-06-13 17:40:39 kushalchand As per the guidelines it is better to have a single commit message for all the changes you have made. As a lot of commit messages will make the Log readable.
2020-06-13 17:41:05 kushalchand There are ways to merge all the commit messages into a single one, I used git rebase to perform this. It was quick to learn. It gives you a history of commit messages and you can merge them into one single commit from there. You might have to use this in circumstances where your patch is not accepted by LTP, so you have to make changes, add them,
2020-06-13 17:41:06 kushalchand commit them, merge two commits. This loop could run until ’n’ times. So it is better to learn it in the first commit.
2020-06-13 17:43:02 kushalchand Next comes generating the patch. I used the git format-patch command to do this. It was quite easy. It just takes the commit ID and generates the patch for you. You might be thinking the next step is to mail the patch to the LTP? Sadly no.
2020-06-13 17:43:45 kushalchand we have build it successfully this time
2020-06-13 17:43:57 kushalchand let us focus on the terminal for a while now
2020-06-13 17:44:06 kushalchand any questions until now?
2020-06-13 17:45:03 mohan43u kushalchand: sudo make install will not work
2020-06-13 17:45:06 kushalchand can someone provide me password for trainer?
2020-06-13 17:45:10 kushalchand oops
2020-06-13 17:45:11 kushalchand alright
2020-06-13 17:45:45 kushalchand let us run make here
2020-06-13 17:46:00 kushalchand you can see it is compiling all 17 files present
2020-06-13 17:46:16 kushalchand we now have the output files
2020-06-13 17:46:25 kushalchand we can run any testcase we wish to
2020-06-13 17:46:30 kushalchand let us run the first one
2020-06-13 17:46:57 kushalchand You can see the output. TPASS was set to indicate the test passed.
2020-06-13 17:47:12 kushalchand There are other flags inside LTP like TCONF, TFAIL
2020-06-13 17:47:30 kushalchand let us now create the mmap18.c
2020-06-13 17:47:35 kushalchand and write a sample test case
2020-06-13 17:47:42 <-- Satheesh (~Satheesh@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 17:48:13 kushalchand so this is the test case ltp provides us basically
2020-06-13 17:48:27 kushalchand you can see mmp18.c in the list
2020-06-13 17:48:35 kushalchand now if I run make
2020-06-13 17:48:47 kushalchand It is going to compile
2020-06-13 17:48:53 kushalchand and give us mmap18
2020-06-13 17:49:19 kushalchand let us run mmap18
2020-06-13 17:49:51 kushalchand so this test case does a simple job, print a message with TPASS macro
2020-06-13 17:49:57 kushalchand you can see
2020-06-13 17:50:12 kushalchand test_all is assigned to the function name we want to run
2020-06-13 17:50:20 --> cnus8n (~cnus8n@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:50:55 kushalchand if the kernel version is lower than this
2020-06-13 17:51:16 kushalchand LTP will automatically fail returning TCONF with appropriate error message
2020-06-13 17:51:39 kushalchand You can see the o/p of the test
2020-06-13 17:51:52 Guha can you open me a test_case
2020-06-13 17:51:56 kushalchand yes
2020-06-13 17:51:57 <-- stof999-kiwi (~stof999-k@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 17:52:00 kushalchand we shall soon
2020-06-13 17:52:23 kushalchand let us add the mmap18 to the .gitignore file now
2020-06-13 17:52:29 Guha i missed few initial sessions
2020-06-13 17:53:07 kushalchand That is alright I have just started the demo, because I ran in some issue
2020-06-13 17:53:20 kushalchand mmap18 not present initially
2020-06-13 17:53:52 <-- stof9-9 (~stof1@2401:4900:2322:ed1:47a:eb5e:b971:e010) has quit (Read error: Connection reset by peer)
2020-06-13 17:54:03 kushalchand so now we have added the executable to the gitignore file
2020-06-13 17:54:30 --> stof9-9 (~stof1@2401:4900:2322:ed1:47a:eb5e:b971:e010) has joined #ilugc
2020-06-13 17:54:47 kushalchand let us see the status of our local repo
2020-06-13 17:55:02 kushalchand there are 2 changes
2020-06-13 17:55:10 kushalchand we have added one file
2020-06-13 17:55:14 kushalchand and modified another
2020-06-13 17:55:31 kushalchand since we cannot build ltp now by using make install
2020-06-13 17:55:59 Hell4 on successul commit through git, how to view it in git reposirory
2020-06-13 17:56:06 kushalchand this is the test I wrote
2020-06-13 17:56:15 --> stof999-kiwi (~stof999-k@2a01:4f9:c010:82aa::1) has joined #ilugc
2020-06-13 17:56:22 kushalchand You can go to the issue and check
2020-06-13 17:56:30 Hell4 scroll down
2020-06-13 17:56:32 kushalchand or else you will get email responses from LTP
2020-06-13 17:56:45 mbuf kushalchand, you are way past your time limit! Please conclude soon.
2020-06-13 17:56:47 kushalchand I open two files
2020-06-13 17:57:26 kushalchand first mmap call
2020-06-13 17:57:36 kushalchand i receive a free address
2020-06-13 17:57:51 kushalchand provide the received address to second call
2020-06-13 17:58:33 kushalchand Any questions
2020-06-13 17:58:38 kushalchand I am planning to end the session
2020-06-13 17:58:53 kushalchand Next comes generating the patch. I used the git format-patch command to do this. It was quite easy. It just takes the commit ID and generates the patch for you. You might be thinking the next step is to mail the patch to the LTP? Sadly no.
2020-06-13 17:58:53 kushalchand Add a description of the patch, to the patch file itself, you must sign off your work, which is generally adding your name and email to the patch file. It is just like declaration that you as a developer are contributing under the open source license.
2020-06-13 17:59:01 kushalchand Still there is a lot to do, LTP prefers the patch to be mailed to their list directly. Hence you have to sign up for the mail list, configure your gitconfig file, use git send-email to finally send the patch. And if it gets accepted in the first version, then finally you get the good feeling of having a file in the local repository pushed to an
2020-06-13 17:59:02 kushalchand online repository. This was my first contribution to an open source project and it definitely feels special. I thank my organization and their goal towards contribution to open source projects which has set me on this path. I plan to work on such contributions during my free time.
2020-06-13 17:59:02 kushalchand Now I will touch on my testcase a little and issues faced.
2020-06-13 17:59:03 kushalchand We tested the mmap() syscall, which is used to create a mapping for a file or device in the virtual address space. Among various flags for mmap() we tested the MAP_FIXED_NOREPLACE which was developed as an enhancement to the MAP_FIXED flag. The MAP_FIXED flag is used to map files to the exact address provided. This flag discards any existing
2020-06-13 17:59:03 kushalchand mapping if present at the address specified. Hence MAP_FIXED_NOREPLACE was introduced so that it checks for any existing mapping and fails if any such mapping is present. Otherwise the MAP_FIXED_NOREPLACE flag behaves the same way as MAP_FIXED. We tested the same by mapping to a free address in the address space, then passing the same address with
2020-06-13 17:59:04 kushalchand MAP_FIXED_NOREPLACE flag and it resulted in a failure as expected.
2020-06-13 18:00:41 kushalchand eof
2020-06-13 18:02:01 <-- rattlesnake (~rattlesna@106.198.135.228) has quit (Ping timeout: 264 seconds)
2020-06-13 18:02:07 Guha Thanks. I found an interesting article to much know about git for project to work .https://www.digitalocean.com/community/tutorials/how-to-use-git-to-manage-your-writing-project
2020-06-13 18:02:22 mohan43u kushalchand: thank you for the talk and demo
2020-06-13 18:02:45 gnurenga @ku
2020-06-13 18:02:49 kushalchand I'm really sorry for taking more time than alotted
2020-06-13 18:02:55 gnurenga kushalchand thank you
2020-06-13 18:03:01 kushalchand I was thinking to extend it but couldn't inform you
2020-06-13 18:03:02 stof9-9 thanks
2020-06-13 18:03:31 --> rattlesnake (~rattlesna@103.95.83.118) has joined #ilugc
2020-06-13 18:03:33 kushalchand And the usage of VM, and switching back to the host consumed a lot of time
2020-06-13 18:04:03 stof9-9 i can imaging. it was a good session! thanks
2020-06-13 18:04:11 kushalchand Thank you
2020-06-13 18:04:18 kushalchand Also I hope to be back here soon
2020-06-13 18:04:33 mohan43u since the time run out, I'm posponding my talk to next occation (i'm planning to host sessions in training.ilugc.in every week)
2020-06-13 18:04:34 kushalchand I have found a new issue and going to contribute to that this weekend
2020-06-13 18:04:43 kushalchand Next time I shall keep it precise.
2020-06-13 18:04:57 mbuf kushalchand, if you had thought of a demo, it could have been mentioned in the talk, and you could have tested the same prior to the session; nevertheless, it was quite informative; thank you for the session
2020-06-13 18:05:13 kushalchand I didn't knw that we could give demos like this
2020-06-13 18:05:21 kushalchand As I'm very new to this setup.
2020-06-13 18:05:44 gnurenga kushalchand Cheers no worries
2020-06-13 18:05:44 kushalchand I realised fixing dependency issues can kill time
2020-06-13 18:05:50 kushalchand (y)
2020-06-13 18:05:55 mohan43u kushalchand: no issues, next time we will prepare the env better
2020-06-13 18:06:01 kushalchand Thank you for your support
2020-06-13 18:06:12 kushalchand No the environment wasn't the issue
2020-06-13 18:06:39 mbuf kushalchand, there is always something to learn every day! it is always good to have new speakers to present anything F/OSS-related and we encourage that
2020-06-13 18:06:52 kushalchand Thank you
2020-06-13 18:07:16 mbuf Let's wrap it up with a round of introductions, and then you can enjoy your Saturday evening
2020-06-13 18:07:34 mohan43u I would like everyone to introduce yourself by typing '/me name,place-from,occupation,about-yourself'
2020-06-13 18:08:32 kushalchand Kushal, Chennai, Engineer, I am a tech enthusiast, still a beginner, lots to learn.
2020-06-13 18:08:37 <-- stof999-kiwi (~stof999-k@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 18:08:45 * mohan43u Mohan R, Chennai, Dev, FOSS enthusiasist and like to learn anything related to Linux/FOSS communities
2020-06-13 18:08:50 * mbuf Shakthi Kannan, Chennai, Researcher @ IIT Madras, Work on anything Free Software
2020-06-13 18:09:46 * gnurenga Rengaraj, Chennai, Senior Engineer Gogoair, GNU/Linux user
2020-06-13 18:09:55 mbuf Please feel free to hang in the channel whenever you are online, listen in to conversations, participate in discussions and learn from each other.
2020-06-13 18:10:14 mbuf We also organize the Emacs Asia-Pacific (APAC) virtual meet-up on fourth Saturday of every month. Detail announcement will be made on ILUG-C mailing list and on IRC (#emacs, #ilugc).
2020-06-13 18:10:44 mohan43u kushalchand: how did you fixed that build issue? I missed that part, you moved quickly to next
2020-06-13 18:10:52 * aswin Aswin, Chennai, Software Developer at a private company
2020-06-13 18:11:08 * humachine ranjith, trichy, system admin in private company, love to work in linux and FOSS
2020-06-13 18:11:26 kushalchand I hadn't done anything mohan43u I just started a fresh.
2020-06-13 18:11:27 * stof9-9 stof, chennai, trying to have as less TODO as possible, gives a good mood (mood.cmdt.ch) :)
2020-06-13 18:11:37 * shrini shrinivasan, Chennai, DevOps, Kaniyam.com
2020-06-13 18:11:48 mohan43u kushalchand: god damit make :0
2020-06-13 18:12:11 gnurenga kushalchand did you cleaned it
2020-06-13 18:12:20 <-- shrini-kiwi (~shrini-ki@2a01:4f9:c010:82aa::1) has quit (Quit: Client closed)
2020-06-13 18:12:25 kushalchand I just sent something huge to read, and tried it in the background.
2020-06-13 18:12:29 kushalchand No.
2020-06-13 18:12:45 kushalchand see I have two dirs project and ltp
2020-06-13 18:13:32 gnurenga hmmm
2020-06-13 18:14:10 kushalchand I just thought it might work. So gave it a shot
2020-06-13 18:14:21 mbuf Let's end the meet-up. The floor is open for any Q&A and discussions. Thanks everyone for attending!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment