Table of Contents

Labtest Mode (Laptop Edition)

Laptop Labtest brings some of the functionality of desktop labtest to tech-managed laptops in our labs. Laptop labtest provides a secure computing environment where students have access to the software on our laptops, without having access to their files, the Internet, printing, or email. Students view the test question from a secure web server. They submit their work using a web-based submit tool.

Requesting Laptop Labtest

In order to place laptops into labtest mode, faculty must provide various information to tech. Laptop labtest was only handled in William Small center In order to place a laptop in labtest mode, they must be connnected to the wired network
As of September 2018, laptops are replaced by desktops with linux running on the native box. You will know when the desktop goes into labtest mode because you will have to click OK for labtest mode Tech will create the schedule adding the desktops for 106/108 WSC

View the current lab booking schedule here.

Please contact tech as soon as possible to schedule your laptop labtest sessions or if there is a discrepancy in your scheduled test.

Setting Up Your Labtest

Create a top level directory to host your web files:

% mkdir /eecs/dept/www/course/<course number>

Make the permissions group and world readeable,executable

% chmod 755 /eecs/dept/www/course/<course number>

Create a “labtest” directory inside your course web directory:

% mkdir /eecs/dept/www/course/9999/labtest

Make it owned by “labtest” group:

% chgrp labtest /eecs/dept/www/course/9999/labtest

Makes sure that nobody but you can access your labtest directory while you are preparing it:

% chmod 700 /eecs/dept/www/course/9999/labtest

Place files in your labtest directory which will be viewable by students in labtest mode. You can use HTML, CGI, PHP, and more.

WARNING: Students will only be able to view your labtest page via the web when they are on a laptop that is in labtest mode. However, if you don't secure the permission on the labtest web directory, students who have access to EECS infrastructure will still be able to view your page by visiting your course web directory from the command line.

Authentication in Labtest

Students will view your labtest page from a web browser on a laptop that is in labtest mode. By default, students will not need to authenticate to view the test page. You may wish to require students to authenticate via Passport York or EECS account as follows:

Passport York Authentication

In order to authenticate students via Passport York account, Create a .htaccess file in the labtest web directory containing:

AuthType Basic
AuthName "EECS Laptop Labtest" <- can be whatever you like
AuthType PYork
Require valid-user
PYorkAppID "eecs-labtest"
Require valid-user

Make sure the file is readable:

% chmod 644 /eecs/dept/www/course/9999/labtest/.htaccess

If you authenticate students via their Passport York account, when they go to submit using web submit, they won't have to login again!

EECS Authentication

In order to authenticate students via EECS login, Create a .htaccess file in the labtest web directory containing:

AuthType Basic
AuthName "Authorization Required"
AuthBasicProvider external
AuthExternal eecs
Require valid-user

Securing Your Labtest

To make your labtest available, run “ltenable”:

% ltenable /eecs/dept/www/course/9999/labtest

To disable your labtest, run “ltdisable”:

% ltdisable /eecs/dept/www/course/9999/labtest

Submission During Labtest

During labtest, students will be able to submit files using Web Submit. For additional configuration information on Web Submit, see here. In short, you can include a link to your submission page from your labtest start page. It will look something like this:

(You can add “&ppy” to the end if you want Passport York authentication selected by default.)

Setting Up A Submit Directory

Create a submit directory in your course directory:

% mkdir /eecs/dept/course/9999/submit

This directory should be available to anyone:

% chmod 755 /eecs/dept/course/9999/submit

Create a directory to accept submissions for your labtest:

% mkdir /eecs/dept/course/9999/submit/lab1

The submission directory must be group labtest:

% chgrp labtest /eecs/dept/course/9999/submit/lab1

To enable submissions on the day of your test:

% chmod 770 /eecs/dept/course/9999/submit/lab1

To disable submissions after your test is done:

% chmod 700 /eecs/dept/course/9999/submit/lab1

For additional information on submit including options to enable/disable previews, logging, and custom IP address limits, please refer to this page.

Access to Previously Submitted Data In A Labtest

From time to time, you may wish to allow students in labtest mode to access previously submitted content from outside labtest mode. In order to make this happen, all you need to do is change the group of the submit assignment directory from submit to labtest, and remove write permission. Now, during your labtest, students will be able to view the content of their previous submission.

For example:

% chgrp -R labtest /eecs/course/9999/submit/a1
% chmod 750 /eecs/course/9999/submit/a1

Labtest Account Customization

Your labtest may require students to download and unarchive files, or run a set of commands before they can start working. This may introduce problems in your test if students don't follow your instructions carefully. You can provide a directory of files in your labtest directory that will be copied to the laptop. In addition, you can optionally write a shell script that will run on the laptop which can do various initialization including unarchiving files to the proper directory, or running additional setup commands. This simplifies the labtest initialization process for students, making sure that everyone starts off with exactly the same environment.

Create a directory for labtest initialization in your course web directory:

% mkdir /eecs/dept/www/course/9999/labtest/ltinit

Since your labtest directory should already restrict access to group labtest only, the ltinit directory can be completely open:

% chmod 755 /eecs/dept/www/course/9999/labtest/ltinit

Copy files into the ltinit directory:

% cp ~/l1/ltinit/* /eecs/dept/www/course/9999/labtest/ltinit
% chmod 644 /eecs/dept/www/course/9999/labtest/ltinit/*

You can optionally create a custom shell script called “labtest.sh” in the ltinit directory. This file will be downloaded by the laptop, and executed. For example, labtest.sh might contain:

#!/bin/sh

mkdir ~/a1
cp ~/ltinit/a1/a1.java ~ltinit/a1 

Makes sure that labtest.sh is readable. When the file is downloaded, it will be automatically made executable before it is run:

% chmod 644 /eecs/dept/www/course/9999/labtest/ltinit/labtest.sh

You must include an .htaccess file in the ltinit directory as follows, or the laptop will not be able to download the files:

% echo "Require all granted" > /eecs/dept/www/course/9999/labtest/ltinit/.htaccess
% chmod 644 /eecs/dept/www/course/9999/labtest/ltinit/.htaccess

Testing Your Labtest Setup

For information on testing your labtest setup, please see here.

On The Day of Your Labtest

At the time of your labtest, a system process will enable the laptops that you've booked to go into labtest mode. Unlike desktop labtest mode, the laptops will not go into labtest mode automatically. Instead, you or your TA will need to manually boot the laptops. As part of securing the laptop into labtest mode, in the middle of the boot sequence, the laptop will reboot a second time. After booting, it will display a message: “Labtest mode is now active”. Only then can you be assured that the machine is in labtest mode. At this time, there is no other indication that a laptop is in labtest mode. In between tests, the laptops will need to be rebooted manually to return them to a clear state.

Since EECS laptops don't mount /eecs from our file server, the laptop does not have access to /eecs/dept/www or /eecs/course. As a result, a web server, labtest.eecs.yorku.ca serves your labtest page to the student.

Students should start the eecs-vbox-common-lab virtual machine, and then start Firefox which will display the labtest start page - https://labtest.eecs.yorku.ca. The start page includes the standard Labtest disclaimer, then has a link at the bottom: “Start Lab Test”. This link will look like: https://labtest.eecs.yorku.ca/host/<hostname>. The student clicks on the link, and is directed to your labtest page. If the student tries to visit the labtest page from a machine not in labtest mode, the following message will be displayed: “Please visit this site when your computer is in labtest mode.”. Note that if the student tries to visit the labtest start page for another host, access will be denied.

In order to submit files, the student should visit: https://labtest.eecs.yorku.ca/submit Please make sure that your submit directory is writable by group labtest, or students will be unable to submit.

During labtest mode, the laptop networking is severely restricted. Access to any web resources will be redirected back to the labtest start page.

At the end of your labtest, a system process will disable the laptops from entering labtest mode, but you or your TA must reboot the laptops connected to the wired network in order to make them go back to standard Linux mode. If a laptop is returned to the lab monitor without being set back to linux mode, then the laptop will remain in labtest mode until it is connected to a wired network drop on a VLAN managed by EECS.

Application Notes

This section will include notes on user experiences using different applications in labtest mode.

Other Information

Laptop Labtest FAQ

How can I test my labtest?
  1. Borrow a laptop from the PRISM Lab (LAS1006).
  2. Let tech know the name of the laptop that you've borrowed, and where you will be running the test. The laptop will need an IP address on the subnet where you will be doing the testing, and will need to be placed into labtest mode by tech.
  3. Connect the laptop to the network with an Ethernet cable, and turn it on. The laptop should report that it's in labtest mode.
How can students access additional resources like Java API, etc. during labtest mode?

The same set of resources that is available outside labtest mode here: https://www.eecs.yorku.ca/teaching/common is available in labtest mode if you include a link in your web page to “/common”.