How to Write Tests for the AGL HW Test Infra. Jan-Simon Möller AGL Release Manager

Size: px
Start display at page:

Download "How to Write Tests for the AGL HW Test Infra. Jan-Simon Möller AGL Release Manager"

Transcription

1 How to Write Tests for the AGL HW Test Infra AGL AMM Oct 2017 Jan-Simon Möller AGL Release Manager

2 Introduction, Topics

3 Introduction Dipl.-Ing. Jan-Simon Möller 'DL9PF' on #freenode AGL Release Manager, EG CIAT Lead

4 This talk is about: Intro AGL HW Test Infra overview Lava jobs Lava test-definitions AGL qa-testdefinitions repo AGL specifics Testing platform code (libraries/binaries) Testing single applications What about complex testsuites? A simple example & demo

5 AGL HW Test Infra overview

6 CI / Test Infra overview

7 From the AMM 2016 talk... e.g. AGL XDS WIP eval tooling Fuego WIP option / later

8 Lava jobs

9 Lava Job Definition sample-job.yaml metadata, notifier Is a yaml style file contains metadata for the job action/deploy section files to be used boot section test section action / deploy boot test

10 Metadata / Notifier Keeps track of metadata job metadata, links, labels any (text) data can be recorded Keeps track of notifiers used e.g. for KernelCI integration

11 Action section Determins what actions need to be taken to prepare for the boot of the board file downloads location of files method to share files

12 Boot section Configures boot method prompts (bootloader) bootloader commands prompts (login) login username test overlay transfer

13 Test section One or multiple inline from git repo uses yaml files lava-test-* are markers for visualizing in LAVA for visualizing in kernelci for cross-referencing

14 Test section details (inline/git) - test: [..] definitions: - repository: metadata: format: Lava-Test Test Definition 1.0 name: smoke-tests-basic description: "Basic test command for AGL images" run: INLINE METHOD steps: - agl-basic-test-shell-command from: inline name: agl-dut-inline-basic path: inline/agl-dut-inline-fake-filename.yaml - repository: git://git.automotivelinux.org/src/qa-testdefinitions.git from: git path: test-suites/short-smoke/smoke-tests-basic.yaml name: smoke-tests-basic - repository: from: git path: test-suites/short-smoke/service-check.yaml name: service-check git repo method

15 AGL tooling / wrapper AGL develops a templating tool leveraging jinja2 to simplify submitting test plans to the CIAT infrastructure URL: 'create-jobs.py' can generate the lava job yaml based on cmdline input for machine Lava instance KernelCI instance rootfs/kernel/dtb tests to be executed See talk from Baylibre and separate tutorial on friday!!!

16 Lava test-definitions

17 Lava test definitions Usually hosted in git repo yaml file describing the (set of) test(s) and scripts to execute the test(s) E.g.

18

19 busybox.yaml metadata execution parsing of output (deprecated!)

20 busybox.sh

21 lava-test-case (inline example) lava-test-case is a helper script lava-test-case records the results of a single test case. For example: steps: - "lava-test-case simpletestcase --result pass" - "lava-test-case fail-test --shell false"

22 lava-test-case (script example) for i in cynara.socket afm-system-daemon.service; do systemctl is-active ${i} >/dev/null 2>&1 if [ $? -eq 0 ] ; then RESULT="pass" else RESULT="fail" fi lava-test-case ${i} --result ${RESULT} done

23 lava-test-case --shell (inline) #Inline shortcut. Uses return value of command for pass/fail. run: steps: - lava-test-case test-ls-command --shell ls /usr/bin/sort - lava-test-case test-ls-fail --shell ls /user/nowhere/

24 lava-test-case (measurement/units) # inline example run: steps: - "lava-test-case simpletestcase --result pass" - "lava-test-case bottle-count --result pass \ --measurement 99 --units bottles"

25 lava-background-process-start This starts a process in the background The arguments are: The name that is used to identify the process later in lava-backgroundprocess-stop The command line for the process to be run in the background for example: steps: - lava-background-process-start MEM --cmd "free -m grep Mem >> /tmp/musage" - lava-background-process-start CPU --cmd "grep 'cpu ' /proc/stat"

26 lava-background-process-stop This stops a process previously started in the background using lava-background-process-start. The user can attach files to the test run if there is a need. The arguments are: The name that was specified in lava-background-process-start (optional) An indication that you want to attach file(s) to the test run with specified mime type. For example:

27 lava-background-process-stop steps: uname -a - lava-background-process-stop CPU - lava-background-process-stop MEM \ --attach /tmp/musage text/plain \ --attach /proc/meminfo application/octet-stream

28 AGL qa-testdefinitions git repo

29 qa-testdefinitions git repo src/qa-testdefinitions> tree is the repo holding test definitions for AGL and what we can use within the LAVA job template We host the scripts in common/scripts and the yaml file under test-suites/<name>/. common scripts busybox.sh lshw.sh service-check-gfx.sh service-check-nogfx.sh doc skeleton.sh skeleton.yaml LICENSE README.md staging kernel-version.yaml scripts kernel-version.sh test-suites short-smoke check the doc/ folder busybox.yaml submit your tests as usual through gerrit smoke-tests-basic.yaml service-check-nogfx.yaml service-check.yaml 7 directories, 14 files

30 Testing platform code

31 Platform components A 'platform component' in AGL is software that comes as part of the profile/packagegroups into the image. These are the essential tools, the standard libraries, drivers, the middleware. AGL Applications are no platform components (even if we have yocto recipes for them) E.g. glibc, basic userspace tools, application framework, support libraries (libxml2), wayland/weston, qt5

32 Testing platform components For platform components, there is an excellent mechanism available using the Yocto Project. It is called 'ptest'. A ptest is a runtime test that can be defined within the YP recipe. E.g. the 'make test' of the software package. It will produce a separate 'ptest' sub-package that can be installed and executed with 'ptest-runner' at runtime. Thus all of our platform components should ship such a ptest! No excuses.

33 Wrapping ptest for CIAT We work on a method to wrap the ptest's for use in the AGL CIAT infrastructure. This means that if your component provides a (self-)test and uses the YP ptest methods, we can easily/automagically add it to the CI Loop and execute it on all targets. The wrapping is mainly needed to facilitate the aggregation/evaluation/visualization of the results.

34 Example of ptest in bitbake recipe Example from poky/meta/recipes-support/attr/acl_ bb SRC_URI += "file://run-ptest" [ ] inherit ptest do_install_ptest() { tar -c --exclude=nfs test/ ( cd ${D}${PTEST_PATH} && tar -xf - ) mkdir ${D}${PTEST_PATH}/include cp ${S}/include/builddefs ${S}/include/buildmacros \ ${S}/include/buildrules ${D}${PTEST_PATH}/include/ } RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle \ perl-module-getopt-std perl-module-posix shadow"

35 Example of ptest in bitbake recipe poky/meta/recipes-core/kbd/kbd_2.0.4.bb SRC_URI += "file://run-ptest" inherit ptest do_compile_ptest() { oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta } do_install_ptest() { install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \ -e '/libkeymap_.*_sources =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \; find ${S}/tests \( -name \*.map -o -name \*.bin -o -name \*.output \) -exec install {} ${D}${PTEST_PATH}/tests \; install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver }

36 run-ptest Is a simple wrapper script > cat poky/meta/recipes-core/kbd/kbd/run-ptest #!/bin/sh CURDIR=$(dirname `readlink -f $0`) make -k -C ${CURDIR}/tests check-tests > cat poky/meta/recipes-support/attr/files/run-ptest #!/bin/sh make -C test -k tests root-tests sed \ -e 's ^\[.*\] \(.*\) -- ok$ PASS: \1 ' \ -e 's ^\[.*\] \(.*\) -- failed FAIL: \1 '

37 Testing single applications

38 AGL application lifecycle The basic application lifecycle can be easily tested with a lava job: uninstall / install start / stop

39 Functional tests for AGL applications The more interesting case is to do actual functional tests of the applications. Will likely depend on the upcoming appfw introspection Applications will need to define these tests We need a way to ship these (logic choice would be also as wgt) TODO!!

40 What about complex testsuites?

41 Complex testsuites Multiple options available depends on requirements Fuego can e.g. run most of LTP can do sophisticated parsing and post-processing we want to capture the results also in the AGL KernelCI currently does not support multi-node test currently does not support 'distributed'/remote tests Lava has multi-node capabilities can request and drive tests across multiple DUTs (local/remote/distributed) can handle tests with different external HW attached (labels) result is limited to pass/fail or a value for measurements, but we can upload result files for later processing work to be done to support all sorts of use-cases anyway regardless of tool!

42 A simple example & demo

43 The skeleton example We'll create a hello-world testdefinition consisting out of: the yaml file (=skeleton.yaml) the script running the test(s) (=skeleton.sh)

44 skeleton.yaml (part 1) metadata: name: skeleton format: "Lava-Test-Shell Test Definition 1.0" description: "A test skeleton" os: - openembedded scope: - functional

45 skeleton.yaml (part 2) run: steps: - "cd doc/" - "./skeleton.sh"

46 skeleton.sh #!/bin/bash result=unkown get_result () { if [ $? -eq "0" ]; then echo "pass" else echo "fail" fi } # Reporting commands results as they get executed lava-test-set start print-to-log echo "Hello" result=$(get_result) lava-test-case echo-hello --result $result echo "World!" result=$(get_result) lava-test-case echo-world --result $result ls result=$(get_result) lava-test-case ls --result $result lava-test-set stop print-to-log exit 0

47 Demo

48 Questions? Go visit the related talks and the friday tutorial!

49 Links/References: AGL repos: Lava/Linaro repo with testdefinitions:

Testing your AGL, yocto ptest, lava and more

Testing your AGL, yocto ptest, lava and more Testing your AGL, yocto ptest, lava and more ALS 2018 Jan-Simon Möller Release Manager, AGL, The Linux Foundation jsmoeller@linuxfoundation.org, DL9PF @IRC and elsewhere Image: public domain Dipl.-Ing.

More information

Tutorial: Howto setup a Remote Test Lab (not only) within the AGL CI Infrastructure

Tutorial: Howto setup a Remote Test Lab (not only) within the AGL CI Infrastructure Tutorial: Howto setup a Remote Test Lab (not only) within the AGL CI Infrastructure ALS Jun 2017 Jan-Simon Möller Introduction Name: Jan-Simon Möller Email: jsmoeller@linuxfoundation.org IRC: dl9pf, #automotive

More information

Tutorial: Howto setup a. Remote Test Lab. for the AGL Infrastructure

Tutorial: Howto setup a. Remote Test Lab. for the AGL Infrastructure Tutorial: Howto setup a Remote Test Lab for the AGL Infrastructure AMM Feb 2017 Jan-Simon Möller Introduction Name: Jan-Simon Möller Email: jsmoeller@linuxfoundation.org IRC: dl9pf, #automotive on freenode

More information

DAVE LIDDAMENT INTRODUCTION TO BASH

DAVE LIDDAMENT INTRODUCTION TO BASH DAVE LIDDAMENT INTRODUCTION TO BASH @daveliddament FORMAT Short lectures Practical exercises (help each other) Write scripts LEARNING OBJECTIVES What is Bash When should you use Bash Basic concepts of

More information

KERNEL C.I. USING LINARO S AUTOMATED VALIDATION ARCHITECTURE. Wednesday, September 11, 13

KERNEL C.I. USING LINARO S AUTOMATED VALIDATION ARCHITECTURE. Wednesday, September 11, 13 KERNEL C.I. USING LINARO S AUTOMATED VALIDATION ARCHITECTURE TYLER BAKER TECHNICAL ARCHITECT HTTP://WWW.LINARO.ORG LAVA DEVELOPER LAVA EVANGELIST FORMER PLATFORM ENGINEER KERNEL HACKER MT. BAKER, WA LAVA

More information

The Automotive Grade Linux Build Service. ALS Tokyo '14, Jan-Simon Möller

The Automotive Grade Linux Build Service. ALS Tokyo '14, Jan-Simon Möller The Automotive Grade Linux Build Service ALS Tokyo '14, Jan-Simon Möller The Automotive Grade Linux (AGL) initiative... is about improving open source components for automotive use cases using a common

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

Chapter 4. Unix Tutorial. Unix Shell

Chapter 4. Unix Tutorial. Unix Shell Chapter 4 Unix Tutorial Users and applications interact with hardware through an operating system (OS). Unix is a very basic operating system in that it has just the essentials. Many operating systems,

More information

Part 1: Basic Commands/U3li3es

Part 1: Basic Commands/U3li3es Final Exam Part 1: Basic Commands/U3li3es May 17 th 3:00~4:00pm S-3-143 Same types of questions as in mid-term 1 2 ls, cat, echo ls -l e.g., regular file or directory, permissions, file size ls -a cat

More information

UNIX System Programming Lecture 3: BASH Programming

UNIX System Programming Lecture 3: BASH Programming UNIX System Programming Outline Filesystems Redirection Shell Programming Reference BLP: Chapter 2 BFAQ: Bash FAQ BMAN: Bash man page BPRI: Bash Programming Introduction BABS: Advanced Bash Scripting Guide

More information

Today. Review. Unix as an OS case study Intro to Shell Scripting. What is an Operating System? What are its goals? How do we evaluate it?

Today. Review. Unix as an OS case study Intro to Shell Scripting. What is an Operating System? What are its goals? How do we evaluate it? Today Unix as an OS case study Intro to Shell Scripting Make sure the computer is in Linux If not, restart, holding down ALT key Login! Posted slides contain material not explicitly covered in class 1

More information

CSE 15L Winter Midterm :) Review

CSE 15L Winter Midterm :) Review CSE 15L Winter 2015 Midterm :) Review Makefiles Makefiles - The Overview Questions you should be able to answer What is the point of a Makefile Why don t we just compile it again? Why don t we just use

More information

Linux Systems Administration Shell Scripting Basics. Mike Jager Network Startup Resource Center

Linux Systems Administration Shell Scripting Basics. Mike Jager Network Startup Resource Center Linux Systems Administration Shell Scripting Basics Mike Jager Network Startup Resource Center mike.jager@synack.co.nz These materials are licensed under the Creative Commons Attribution-NonCommercial

More information

The Unix Shell & Shell Scripts

The Unix Shell & Shell Scripts The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises

More information

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

More Raspian. An editor Configuration files Shell scripts Shell variables System admin More Raspian An editor Configuration files Shell scripts Shell variables System admin Nano, a simple editor Nano does not require the mouse. You must use your keyboard to move around the file and make

More information

EE516: Embedded Software Project 1. Setting Up Environment for Projects

EE516: Embedded Software Project 1. Setting Up Environment for Projects EE516: Embedded Software Project 1. Setting Up Environment for Projects By Dong Jae Shin 2015. 09. 01. Contents Introduction to Projects of EE516 Tasks Setting Up Environment Virtual Machine Environment

More information

Practical 02. Bash & shell scripting

Practical 02. Bash & shell scripting Practical 02 Bash & shell scripting 1 imac lab login: maclab password: 10khem 1.use the Finder to visually browse the file system (single click opens) 2.find the /Applications folder 3.open the Utilities

More information

Automation beyond Testing and Embedded System Validation

Automation beyond Testing and Embedded System Validation Automation beyond Testing and Embedded System Validation Embedded Linux Conference Europe Jan Lübbe Slide 1 - http://www.pengutronix.de 2017-10-23 Some Background Embedded Linux

More information

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

CS 143A. Principles of Operating Systems. Instructor : Prof. Anton Burtsev

CS 143A. Principles of Operating Systems. Instructor : Prof. Anton Burtsev CS 143A Principles of Operating Systems Instructor : Prof. Anton Burtsev (aburtsev@uci.edu) Assistants : Junjie Shen junjies1@uci.edu Vikram Narayanan narayav1@uci.edu Biswadip Maity (Deep) Email : maityb@uci.edu

More information

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze EECS 2031 Software Tools Prof. Mokhtar Aboelaze Footer Text 1 EECS 2031E Instructor: Mokhtar Aboelaze Room 2026 CSEB lastname@cse.yorku.ca x40607 Office hours TTH 12:00-3:00 or by appointment 1 Grading

More information

How we added software updates to AGL

How we added software updates to AGL How we added software updates to AGL Phil Wise 2017 ATS Advanced Telematic Systems GmbH ATS Advanced Telematic Systems. Open source and open standard for connected mobility. Page 2 AGL Automotive Grade

More information

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater) CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater) 28 January 2013 Jason Yosinski Original slides available under Creative Commons Attribution-ShareAlike 3.0

More information

Introduction to the Shell

Introduction to the Shell [Software Development] Introduction to the Shell Davide Balzarotti Eurecom Sophia Antipolis, France What a Linux Desktop Installation looks like What you need Few Words about the Graphic Interface Unlike

More information

Shell Programming Systems Skills in C and Unix

Shell Programming Systems Skills in C and Unix Shell Programming 15-123 Systems Skills in C and Unix The Shell A command line interpreter that provides the interface to Unix OS. What Shell are we on? echo $SHELL Most unix systems have Bourne shell

More information

Introduction to UNIX Command Line

Introduction to UNIX Command Line Introduction to UNIX Command Line Files and directories Some useful commands (echo, cat, grep, find, diff, tar) Redirection Pipes Variables Background processes Remote connections (e.g. ssh, curl) Scripts

More information

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples EECS2301 Title Unix/Linux Introduction These slides are based on slides by Prof. Wolfgang Stuerzlinger at York University Warning: These notes are not complete, it is a Skelton that will be modified/add-to

More information

Yocto Project components

Yocto Project components Lecture 3 3 Yocto Project components 25 octombrie 2016 Exam questions 1. Please write al least four of the described components of a GNU toolchain 2. List the components which define a Linux distribution

More information

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Shell Scripting. Winter 2019

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Shell Scripting. Winter 2019 CSCI 2132: Software Development Shell Scripting Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Reading Glass and Ables, Chapter 8: bash Your Shell vs Your File Manager File manager

More information

sottotitolo A.A. 2016/17 Federico Reghenzani, Alessandro Barenghi

sottotitolo A.A. 2016/17 Federico Reghenzani, Alessandro Barenghi Titolo presentazione Piattaforme Software per la Rete sottotitolo BASH Scripting Milano, XX mese 20XX A.A. 2016/17, Alessandro Barenghi Outline 1) Introduction to BASH 2) Helper commands 3) Control Flow

More information

Ftp Command Line Commands Linux Example Windows Put

Ftp Command Line Commands Linux Example Windows Put Ftp Command Line Commands Linux Example Windows Put Examples of typical uses of the command ftp. This lists the commands that you can use to show the directory contents, transfer files, and delete files.

More information

INd_rasN SOME SHELL SCRIPTING PROGRAMS. 1. Write a shell script to check whether the name passed as first argument is the name of a file or directory.

INd_rasN SOME SHELL SCRIPTING PROGRAMS. 1. Write a shell script to check whether the name passed as first argument is the name of a file or directory. 1. Write a shell script to check whether the name passed as rst argument is the name of a le or directory. Ans: #!/bin/bash if [ -f $1 ] echo "$1 is a le" echo "$1 is not a le" 2. Write a shell script

More information

Please choose the best answer. More than one answer might be true, but choose the one that is best.

Please choose the best answer. More than one answer might be true, but choose the one that is best. Introduction to Linux and Unix - endterm Please choose the best answer. More than one answer might be true, but choose the one that is best. SYSTEM STARTUP 1. A hard disk master boot record is located:

More information

I/O and Shell Scripting

I/O and Shell Scripting I/O and Shell Scripting File Descriptors Redirecting Standard Error Shell Scripts Making a Shell Script Executable Specifying Which Shell Will Run a Script Comments in Shell Scripts File Descriptors Resources

More information

CSNB113: System Administration - 8 th Topic: Shell Scripts Programming I

CSNB113: System Administration - 8 th Topic: Shell Scripts Programming I CSNB113: System Administration - 8 th Topic: Shell Scripts Programming I The prompt is a prompt is a prompt and a program input It is possible to write and run a program directly on the command prompt!

More information

Essentials for Scientific Computing: Bash Shell Scripting Day 3

Essentials for Scientific Computing: Bash Shell Scripting Day 3 Essentials for Scientific Computing: Bash Shell Scripting Day 3 Ershaad Ahamed TUE-CMS, JNCASR May 2012 1 Introduction In the previous sessions, you have been using basic commands in the shell. The bash

More information

Chap2: Operating-System Structures

Chap2: Operating-System Structures Chap2: Operating-System Structures Objectives: services OS provides to users, processes, and other systems structuring an operating system how operating systems are designed and customized and how they

More information

Useful Unix Commands Cheat Sheet

Useful Unix Commands Cheat Sheet Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List

More information

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011) UoW HPC Quick Start Information Technology Services University of Wollongong ( Last updated on October 10, 2011) 1 Contents 1 Logging into the HPC Cluster 3 1.1 From within the UoW campus.......................

More information

swiftenv Documentation

swiftenv Documentation swiftenv Documentation Release 1.3.0 Kyle Fuller Sep 27, 2017 Contents 1 The User Guide 3 1.1 Installation................................................ 3 1.2 Getting Started..............................................

More information

Processes and Shells

Processes and Shells Shell ls pico httpd CPU Kernel Disk NIC Processes Processes are tasks run by you or the OS. Processes can be: shells commands programs daemons scripts Shells Processes operate in the context of a shell.

More information

Platform Migrator Technical Report TR

Platform Migrator Technical Report TR Platform Migrator Technical Report TR2018-990 Munir Contractor mmc691@nyu.edu Christophe Pradal christophe.pradal@inria.fr Dennis Shasha shasha@cs.nyu.edu May 12, 2018 CONTENTS: 1 Abstract 4 2 Platform

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Unit -1: Introduction to UNIX/LINUX Operating System Practical Practice Questions: Find errors (if any) otherwise write output or interpretation of following commands. (Consider default shell is bash shell.)

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Exercise 1: Basic Tools

Exercise 1: Basic Tools Exercise 1: Basic Tools This exercise is created so everybody can learn the basic tools we will use during this course. It is really more like a tutorial than an exercise and, you are not required to submit

More information

SANJAY GHODAWAT POLYTECHNIC

SANJAY GHODAWAT POLYTECHNIC EXPERIMENT NO. 01 Name of Experiment Implement following commands with their options: ps and kill. df and du mount and umount. (4 Hours) Prerequisite of. / execution of Basic knowledge about linux command.

More information

22-Sep CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control. Faculty of Computer Science, Dalhousie University

22-Sep CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control. Faculty of Computer Science, Dalhousie University Lecture 8 p.1 Faculty of Computer Science, Dalhousie University CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control 22-Sep-2017 Location: Goldberg CS 127 Time: 14:35 15:25 Instructor:

More information

CS197U: A Hands on Introduction to Unix

CS197U: A Hands on Introduction to Unix CS197U: A Hands on Introduction to Unix Lecture 11: WWW and Wrap up Tian Guo University of Massachusetts Amherst CICS 1 Reminders Assignment 4 was graded and scores on Moodle Assignment 5 was due and you

More information

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo UNIX COMMANDS AND SHELLS UNIX Programming 2015 Fall by Euiseong Seo What is a Shell? A system program that allows a user to execute Shell functions (internal commands) Other programs (external commands)

More information

Lab 4: Shell Scripting

Lab 4: Shell Scripting Lab 4: Shell Scripting Nathan Jarus June 12, 2017 Introduction This lab will give you some experience writing shell scripts. You will need to sign in to https://git.mst.edu and git clone the repository

More information

Shell Programming (Part 2)

Shell Programming (Part 2) i i Systems and Internet Infrastructure Security Institute for Networking and Security Research Department of Computer Science and Engineering Pennsylvania State University, University Park, PA Shell Programming

More information

EECS2301. Lab 1 Winter 2016

EECS2301. Lab 1 Winter 2016 EECS2301 Lab 1 Winter 2016 Lab Objectives In this lab, you will be introduced to the Linux operating system. The basic commands will be presented in this lab. By the end of you alb, you will be asked to

More information

LING 408/508: Computational Techniques for Linguists. Lecture 5

LING 408/508: Computational Techniques for Linguists. Lecture 5 LING 408/508: Computational Techniques for Linguists Lecture 5 Last Time Installing Ubuntu 18.04 LTS on top of VirtualBox Your Homework 2: did everyone succeed? Ubuntu VirtualBox Host OS: MacOS or Windows

More information

Introduction to the UNIX command line

Introduction to the UNIX command line Introduction to the UNIX command line Steven Abreu Introduction to Computer Science (ICS) Tutorial Jacobs University s.abreu@jacobs-university.de September 19, 2017 Overview What is UNIX? UNIX Shell Commands

More information

Containers. Pablo F. Ordóñez. October 18, 2018

Containers. Pablo F. Ordóñez. October 18, 2018 Containers Pablo F. Ordóñez October 18, 2018 1 Welcome Song: Sola vaya Interpreter: La Sonora Ponceña 2 Goals Containers!= ( Moby-Dick ) Containers are part of the Linux Kernel Make your own container

More information

Php Scripts If Then Else Linux Bash Shell

Php Scripts If Then Else Linux Bash Shell Php Scripts If Then Else Linux Bash Shell I am using awk as part of and if then else statement. KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here. I just wrote

More information

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

If you had a freshly generated image from an LCI instructor, make sure to set the hostnames again:

If you had a freshly generated image from an LCI instructor, make sure to set the hostnames again: Storage Node Setup A storage node (or system as your scale) is a very important unit for an HPC cluster. The computation is often about the data it produces and keeping that data safe is important. Safe

More information

Shell Scripting. With Applications to HPC. Edmund Sumbar Copyright 2007 University of Alberta. All rights reserved

Shell Scripting. With Applications to HPC. Edmund Sumbar Copyright 2007 University of Alberta. All rights reserved AICT High Performance Computing Workshop With Applications to HPC Edmund Sumbar research.support@ualberta.ca Copyright 2007 University of Alberta. All rights reserved High performance computing environment

More information

LOG ON TO LINUX AND LOG OFF

LOG ON TO LINUX AND LOG OFF EXPNO:1A LOG ON TO LINUX AND LOG OFF AIM: To know how to logon to Linux and logoff. PROCEDURE: Logon: To logon to the Linux system, we have to enter the correct username and password details, when asked,

More information

SHELL Hacking. 阿里云 - wzt

SHELL Hacking. 阿里云 - wzt SHELL Hacking 阿里云 - wzt When control a unix-like system, Than? [root@localhost fucking_rootkit]# ls Makefile furootkit.c [root@localhost fucking_rootkit]# make make -C /lib/modules/2.6.32/build M=/root/lkm/fucking_rootkit

More information

A shell can be used in one of two ways:

A shell can be used in one of two ways: Shell Scripting 1 A shell can be used in one of two ways: A command interpreter, used interactively A programming language, to write shell scripts (your own custom commands) 2 If we have a set of commands

More information

CS Unix Tools & Scripting

CS Unix Tools & Scripting Cornell University, Spring 2014 1 February 24, 2014 1 Slides evolved from previous versions by Hussam Abu-Libdeh and David Slater A note on awk for (item in array) The order in which items are returned

More information

Shells and Shell Programming

Shells and Shell Programming Shells and Shell Programming 1 Shells A shell is a command line interpreter that is the interface between the user and the OS. The shell: analyzes each command determines what actions are to be performed

More information

Agenda. Several projects are using GIT Developer(s) Junio Hamano, Linus Torvalds. Qt Stable release (January 31, 2011)

Agenda. Several projects are using GIT Developer(s) Junio Hamano, Linus Torvalds. Qt Stable release (January 31, 2011) Basic Agenda 1 Project information Who is ussing 2 14 Oct 2011 3 Basic Data Transport Work ow 4 Con gure 5 Basic Project information Who is ussing Project information Who is ussing Project information

More information

Review of Fundamentals

Review of Fundamentals Review of Fundamentals 1 The shell vi General shell review 2 http://teaching.idallen.com/cst8207/14f/notes/120_shell_basics.html The shell is a program that is executed for us automatically when we log

More information

Digi Embedded Yocto 1.6. First Steps Guide

Digi Embedded Yocto 1.6. First Steps Guide Digi Embedded Yocto 1.6 First Steps Guide Revision history 90001423 Revision Date Description E July, 2015 Updated to Digi Embedded Yocto 1.6.6 F October, 2015 Updated to Digi Embedded Yocto 1.6.7 G November,

More information

Exercise sheet 1 To be corrected in tutorials in the week from 23/10/2017 to 27/10/2017

Exercise sheet 1 To be corrected in tutorials in the week from 23/10/2017 to 27/10/2017 Einführung in die Programmierung für Physiker WS 207/208 Marc Wagner Francesca Cuteri: cuteri@th.physik.uni-frankfurt.de Alessandro Sciarra: sciarra@th.physik.uni-frankfurt.de Exercise sheet To be corrected

More information

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2 Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working

More information

Shifter Configuration Guide 1.0

Shifter Configuration Guide 1.0 Shifter Configuration Guide 1.0 Contents Contents About Shifter Configuration Guide...3 Configure the Docker Daemon...4 Configure Shifter...7 Rebuild the Compute Node initramfs and cpio Files...10 Configure

More information

DevOps examples on NonStop Tools Overview. Cor Geboers, ATC Consultant

DevOps examples on NonStop Tools Overview. Cor Geboers, ATC Consultant DevOps examples on NonStop Tools Overview Cor Geboers, ATC Consultant About me Cor Geboers Senior Consultant in NonStop ATC, based in Belgium 35+ years in IT development and support 25+ years NonStop experience

More information

Dandified way to package management in Yocto Project

Dandified way to package management in Yocto Project Dandified way to package management in Yocto Project Jun 21th, 2018 Zheng Ruoqin, Fujitsu zhengrq.fnst@cn.fujitsu.com whoami Zheng Ruoqin, Fujitsu Ltd. Embedded Linux Developer In-House Embedded Linux

More information

WORKING WITH THE LINUX KERNEL IN THE YOCTO PROJECT SEAN HUDSON EMBEDDED LINUX ARCHITECT

WORKING WITH THE LINUX KERNEL IN THE YOCTO PROJECT SEAN HUDSON EMBEDDED LINUX ARCHITECT WORKING WITH THE LINUX KERNEL IN THE YOCTO PROJECT SEAN HUDSON EMBEDDED LINUX ARCHITECT BIO Developing software for embedded devices since 1996 Started using Linux in 1999 to create a NAT router for my

More information

Docker task in HPC Pack

Docker task in HPC Pack Docker task in HPC Pack We introduced docker task in HPC Pack 2016 Update1. To use this feature, set the environment variable CCP_DOCKER_IMAGE of a task so that it could be run in a docker container on

More information

EECS2301. Example. Testing 3/22/2017. Linux/Unix Part 3. for SCRIPT in /path/to/scripts/dir/* do if [ -f $SCRIPT -a -x $SCRIPT ] then $SCRIPT fi done

EECS2301. Example. Testing 3/22/2017. Linux/Unix Part 3. for SCRIPT in /path/to/scripts/dir/* do if [ -f $SCRIPT -a -x $SCRIPT ] then $SCRIPT fi done Warning: These notes are not complete, it is a Skelton that will be modified/add-to in the class. If you want to us them for studying, either attend the class or get the completed notes from someone who

More information

Vi & Shell Scripting

Vi & Shell Scripting Vi & Shell Scripting Comp-206 : Introduction to Week 3 Joseph Vybihal Computer Science McGill University Announcements Sina Meraji's office hours Trottier 3rd floor open area Tuesday 1:30 2:30 PM Thursday

More information

Shells and Shell Programming

Shells and Shell Programming Shells and Shell Programming Shells A shell is a command line interpreter that is the interface between the user and the OS. The shell: analyzes each command determines what actions are to be performed

More information

Lab Working with Linux Command Line

Lab Working with Linux Command Line Introduction In this lab, you will use the Linux command line to manage files and folders and perform some basic administrative tasks. Recommended Equipment A computer with a Linux OS, either installed

More information

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018 GNU/Linux 101 Casey McLaughlin Research Computing Center Spring Workshop Series 2018 rccworkshop IC;3df4mu bash-2.1~# man workshop Linux101 RCC Workshop L101 OBJECTIVES - Operating system concepts - Linux

More information

Shell Programming. Introduction to Linux. Peter Ruprecht Research CU Boulder

Shell Programming. Introduction to Linux. Peter Ruprecht  Research CU Boulder Introduction to Linux Shell Programming Peter Ruprecht peter.ruprecht@colorado.edu www.rc.colorado.edu Downloadable Materials Slides and examples available at https://github.com/researchcomputing/ Final_Tutorials/

More information

Topic 2: More Shell Skills. Sub-Topic 1: Quoting. Sub-Topic 2: Shell Variables. Difference Between Single & Double Quotes

Topic 2: More Shell Skills. Sub-Topic 1: Quoting. Sub-Topic 2: Shell Variables. Difference Between Single & Double Quotes Topic 2: More Shell Skills Sub-Topic 1: Quoting Sub-topics: 1 quoting 2 shell variables 3 sub-shells 4 simple shell scripts (no ifs or loops yet) 5 bash initialization files 6 I/O redirection & pipes 7

More information

Manual Shell Script Linux If Not Equal String Comparison

Manual Shell Script Linux If Not Equal String Comparison Manual Shell Script Linux If Not Equal String Comparison From the Linux ping manual: If mkdir d failed, and returned a non-0 exit code, Bash will skip the next command, and we will stay in the current

More information

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80 CSE 303 Lecture 2 Introduction to bash shell read Linux Pocket Guide pp. 37-46, 58-59, 60, 65-70, 71-72, 77-80 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Unix file system structure

More information

Virtual Data Center (vdc) Manual

Virtual Data Center (vdc) Manual Virtual Data Center (vdc) Manual English Version 1.0 Page 1 of 43 Content 1 HOW TO USE CLOUD PORTAL (VMWARE VIRTUAL DATA CENTER)... 3 2 VMWARE SYSTEM DETAILS... 5 3 HOW TO MANAGE VIRTUAL MACHINE... 6 Edit

More information

Introduction: What is Unix?

Introduction: What is Unix? Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix

More information

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

ENHANCE FUEGO TEST EFFICIENCY BY APPLYING ADDITIONAL SOFTWARE AND HARDWARE SOLUTIONS

ENHANCE FUEGO TEST EFFICIENCY BY APPLYING ADDITIONAL SOFTWARE AND HARDWARE SOLUTIONS ENHANCE FUEGO TEST EFFICIENCY BY APPLYING ADDITIONAL SOFTWARE AND HARDWARE SOLUTIONS OPEN SOURCE SUMMIT JAPAN 2017 2017/05/31 KHIEM NGUYEN STAFF ENGINEER, SOFTWARE ENGINEERING DIVISION, RENESAS DESIGN

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to UNIX environment and tools 0.1 Getting started with the environment and the bash shell interpreter Desktop computers are usually operated from a graphical

More information

COMP 4/6262: Programming UNIX

COMP 4/6262: Programming UNIX COMP 4/6262: Programming UNIX Lecture 12 shells, shell programming: passing arguments, if, debug March 13, 2006 Outline shells shell programming passing arguments (KW Ch.7) exit status if (KW Ch.8) test

More information

Shells & Shell Programming (Part B)

Shells & Shell Programming (Part B) Shells & Shell Programming (Part B) Software Tools EECS2031 Winter 2018 Manos Papagelis Thanks to Karen Reid and Alan J Rosenthal for material in these slides CONTROL STATEMENTS 2 Control Statements Conditional

More information

Last Time. on the website

Last Time. on the website Last Time on the website Lecture 6 Shell Scripting What is a shell? The user interface to the operating system Functionality: Execute other programs Manage files Manage processes Full programming language

More information

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP Unix Guide Meher Krishna Patel Created on : Octorber, 2017 Last updated : December, 2017 More documents are freely available at PythonDSP Table of contents Table of contents i 1 Unix commands 1 1.1 Unix

More information

Shell Programming (bash)

Shell Programming (bash) Shell Programming Shell Programming (bash) Commands run from a file in a subshell A great way to automate a repeated sequence of commands. File starts with #!/bin/bash absolute path to the shell program

More information

Sub-Topic 1: Quoting. Topic 2: More Shell Skills. Sub-Topic 2: Shell Variables. Referring to Shell Variables: More

Sub-Topic 1: Quoting. Topic 2: More Shell Skills. Sub-Topic 2: Shell Variables. Referring to Shell Variables: More Topic 2: More Shell Skills Plan: about 3 lectures on this topic Sub-topics: 1 quoting 2 shell variables 3 sub-shells 4 simple shell scripts (no ifs or loops yet) 5 bash initialization files 6 I/O redirection

More information

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND Prof. Michael J. Reale Fall 2014 Finding Files in a Directory Tree Suppose you want to find a file with a certain filename (or with a filename matching

More information

SOFTWARE ARCHITECTURE 3. SHELL

SOFTWARE ARCHITECTURE 3. SHELL 1 SOFTWARE ARCHITECTURE 3. SHELL Tatsuya Hagino hagino@sfc.keio.ac.jp slides URL https://vu5.sfc.keio.ac.jp/sa/login.php 2 Software Layer Application Shell Library MIddleware Shell Operating System Hardware

More information

# use temporary files to store partial results # remember to delete these temporary files when you do not need them anymore

# use temporary files to store partial results # remember to delete these temporary files when you do not need them anymore #!/bin/bash/ #Man entry # Script that reads a file and outputs a list of unique words # in the file, their frequency and total number # Usage: wsc.sh file finalres # This solution es not assume that we

More information

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2)

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2) BANK ON & SHELL PROGRAMMING-502 (CORE PAPER-2) TOPIC 1: VI-EDITOR MARKS YEAR 1. Explain set command of vi editor 2 2011oct 2. Explain the modes of vi editor. 7 2013mar/ 2013 oct 3. Explain vi editor 5

More information

Introduction to Linux Workshop 1

Introduction to Linux Workshop 1 Introduction to Linux Workshop 1 The George Washington University SEAS Computing Facility Created by Jason Hurlburt, Hadi Mohammadi, Marco Suarez hurlburj@gwu.edu Logging In The lab computers will authenticate

More information